Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (VoroneTZ), 1,234 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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