Gamestudio Links
Zorro Links
Newest Posts
New Zorro version 1.83
by jrath
Today at 11:53
New Aum and few things
by George
Today at 09:19
Transfer free license to different device?
by Raisinbran
Yesterday at 21:59
New BrokerCommand: SET_TRIGGER_PIPE
by AndrewAMD
Yesterday at 18:18
What are you working on?
by NeoDumont
Yesterday at 15:43
Beta Version Download does not work
by MatPed
Yesterday at 14:35
Camera Glide Works Over Water, But Not Under Water
by Ruben
Yesterday at 10:04
AUM Magazine
Latest Screens
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Forgotten Tales - Demo version
RPG PARTY
Who's Online
13 registered (byakuren81, MatPed, Sphin, 3run, firecrest, FLD, Dbat, AndrewAMD, JeyKey II, mk_1), 504 Guests and 3 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
mbullied, Raisinbran, Grodt, drack, Paul_der_Zweite
17982 Registered Users
Topic Options
Rate This Topic
#470709 - 02/01/18 00:02 Slider
kujo Offline
Member

Registered: 12/03/17
Posts: 129
Loc: Halifax, NS
Manual says on the Slider's page the following:
Quote:
The sliders jump to their default positions (pos parameter) when the script is started the first time, or when [Script], [Asset], or [Edit] was clicked. Otherwise the sliders keep their previous position. For testing a script with a certain slider position, click [Test], wait until the sliders appear, then click [Stop], put the sliders to the desired position and click [Test] again. In [Trade] mode the sliders are stored in the .trd file and thus always 'remember' their last position.


It seems that this part isn't true anymore:
Quote:
or when [Script], [Asset], or [Edit] was clicked



This part is a bit inaccurate:
Quote:
For testing a script with a certain slider position, click [Test], wait until the sliders appear, then click [Stop], put the sliders to the desired position and click [Test] again.

It isn't enough to simply wait until the sliders appear. One should wait until the INITRUN is over and "Test: <script name>" message appears.

When it comes to the Trade mode, the logic is different and .trd file is used as mentioned in the manual. But what happens during the first run of a strategy when there is no trd file? According to my observations, when running a script for the first time in the Trade mode a desired slider position could be set using 2 options:
  • 1st option: Start Test. Wait until INITRUN is over and "Test: ..." message is shown. Stop it. Set the slider. Then Trade a script. The slider won't be overwritten by the default value.
  • 2nd option. Run a script with the default slider in the Trade mode. Simply change the slider while running in the Trade mode.

Top
#470712 - 02/01/18 11:27 Re: Slider [Re: kujo]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26363
Loc: Frankfurt
You can move a slider as soon as it appears. This happens in the INITRUN when the slider name is assigned.

Top
#470716 - 02/01/18 12:14 Re: Slider [Re: jcl]
kujo Offline
Member

Registered: 12/03/17
Posts: 129
Loc: Halifax, NS
Quote:
You can move a slider as soon as it appears.

Indeed, if you move it during run without hitting Stop. However, if you click Stop it's a different story. See below


Quote:
For testing a script with a certain slider position, click [Test], wait until the sliders appear, then click [Stop], put the sliders to the desired position and click [Test] again.


I've tried this with my script and logged every step. It doesn't work if I click Stop immediately after the slider appear. I change the slider but after I reTest a script the slider returns back. Above mentioned condition isn't enough. One should wait a bit longer and then hit Stop.


Edited by kujo (02/01/18 12:30)

Top
#470789 - 02/06/18 17:20 Re: Slider [Re: kujo]
kujo Offline
Member

Registered: 12/03/17
Posts: 129
Loc: Halifax, NS
Aside from above-mentioned there is one more question
Quote:
If the script needs to be recompiled, or if it contains any global or static variables that must be reset, click [Edit] before [Test]. This also resets the sliders to their default values. Otherwise the static and global variables and the sliders keep their settings from the previous test run.


Clicking Edit doesn't work as stated. So, what's the legit method to reset sliders and variables now? Should I click Edit and then Run in N++ to start a new instance of Zorro?


Edited by kujo (02/06/18 17:24)

Top
#470802 - 02/07/18 11:53 Re: Slider [Re: kujo]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26363
Loc: Frankfurt
To recompile and reset sliders and variables, click [Edit], then [Test]. Or click on the script scrollbox and select the script again. What did not work?

Top
#470818 - 02/07/18 16:48 Re: Slider [Re: jcl]
kujo Offline
Member

Registered: 12/03/17
Posts: 129
Loc: Halifax, NS
Originally Posted By: jcl
To recompile and reset sliders and variables, click [Edit], then [Test]. Or click on the script scrollbox and select the script again. What did not work?


Oh, shoot! It does work. Sorry for confusion!

The only thing that doesn't work is:
Quote:
For testing a script with a certain slider position, click [Test], wait until the slider names appear, then click [Stop], put the sliders to the desired position and click [Test] again.


Try this:
- Start Zorro
- Select Z3
- Click Test and immediately after the sliders names appear click Stop
- Change Capital to 2100
- Click Test
- Capital is back to 2000

I just want to say that it's not enough to wait until sliders names appear, you should wait a little bit longer. That's it laugh

Top
#470819 - 02/07/18 16:57 Re: Slider [Re: kujo]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26363
Loc: Frankfurt
Ah, ok. I'll check where this additional little bit time comes from. Possibly still some initialization, such as asset loading.

Top


Moderator:  aztec, Inestical, Matt_Coles, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de