Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,561 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Annoyances with script compilation and sliders #468036
09/14/17 13:36
09/14/17 13:36
Joined: Aug 2017
Posts: 40
J
johnnyp Offline OP
Newbie
johnnyp  Offline OP
Newbie
J

Joined: Aug 2017
Posts: 40
I have a script which I usually run on 1 minute bars. Suppose I make a change to the script that causes compilation to fail, then I press Test, it tells me of the error and resets the bar period slider to 60 and the other sliders to their default values. So I fix the code and then I have to adjust the sliders again before pressing Test.

Does no one else find this exasperating?

A compilation failure should not reset the sliders, or am I doing it all wrong?

Re: Annoyances with script compilation and sliders [Re: johnnyp] #468037
09/14/17 13:45
09/14/17 13:45
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Sliders are not reset by a compilation failure. They are reset when you modify the code.

Re: Annoyances with script compilation and sliders [Re: jcl] #468041
09/14/17 16:13
09/14/17 16:13
Joined: Aug 2017
Posts: 40
J
johnnyp Offline OP
Newbie
johnnyp  Offline OP
Newbie
J

Joined: Aug 2017
Posts: 40
Nope. Code modification usually does not cause slider reset. Given how my teeth grind together each time the sliders are reset, I think I would have noticed. Besides, I have just tested adding a printf line to my script - the sliders did not move.

This test was realised using the latest beta version 1.62.1, downloaded today.

Re: Annoyances with script compilation and sliders [Re: johnnyp] #468044
09/14/17 16:46
09/14/17 16:46
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
If not by code modifying, then your sliders were probably reset by something else, like selecting a different script? I don't think that sliders know about compilation errors.

Re: Annoyances with script compilation and sliders [Re: jcl] #468051
09/14/17 19:10
09/14/17 19:10
Joined: Aug 2017
Posts: 40
J
johnnyp Offline OP
Newbie
johnnyp  Offline OP
Newbie
J

Joined: Aug 2017
Posts: 40
My mistake. I need to be more specific. Compilation errors don't cause the sliders to reset, but some runtime errors do.

I'll report back when I find an example.

Re: Annoyances with script compilation and sliders [Re: johnnyp] #468052
09/14/17 19:59
09/14/17 19:59
Joined: Aug 2017
Posts: 40
J
johnnyp Offline OP
Newbie
johnnyp  Offline OP
Newbie
J

Joined: Aug 2017
Posts: 40
Here is a weird one.
I have t6 file containing data starting on the 7th September this year. I have a script that compiles ok, but when run gives the following error 055 binEURUSD 2016 (binEURUSD_2016.bar) history missing.

I move the bar period slider to 1, and press test. Same error, and the slider jumps back to 60.

I add BarPeriod = 1; to the script and press test. Hey presto, no error, the script works fine.

Question: why did it try running the script with period 60 when I had explicitly set the period slider to 1?

Similar question: why do I need to run a script once before I can set any custom sliders? Until I have successfully run the script the sliders are all called "SliderX" where X is 1, 2 or 3.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1