Gamestudio Links
Zorro Links
Newest Posts
OptimialF values in .fac file mostly zero
by SBGuy
6 minutes 52 seconds ago
wanted to share my working player/camera control action C++ app
by rayp
Today at 14:37
Votes for future features
by AndrewAMD
Today at 14:06
Transaction Cost
by jcl
Today at 09:42
Indicator RSI
by jcl
Today at 09:36
Is it possible to do Trade Mode without live brokerage account?
by AndrewAMD
Yesterday at 20:36
MED (or any tool) - change base frame / pose of frame 0 ?
by rayp
Yesterday at 17:55
AUM Magazine
Latest Screens
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Who's Online
14 registered (SBGuy, kvm, cepturion, alibaba, Mio, AndrewAMD, ChrstphFr, 20BN, 2 invisible), 465 Guests and 4 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
Mio, thewalruss, jiffdbf, jgtrader, Chefmac
18081 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 Online

Chief Engineer

Registered: 07/22/00
Posts: 26532
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 Online

Chief Engineer

Registered: 07/22/00
Posts: 26532
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 Online

Chief Engineer

Registered: 07/22/00
Posts: 26532
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