Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 533 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Dynamically extend Lookback period #487021
12/28/22 16:09
12/28/22 16:09
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online OP
Serious User
AndrewAMD  Online OP
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
LookBack can currently be set to a fixed value (i.e. 0, 500).

But sometimes I have a series() that accumulate elements under strange occasions. I can identify programmatically when I have enough elements.

So it can work like this:

Script calls extendLookBack(1) when more lookback is needed to accumulate enough series elements.
Script later calls extendLookBack(0) when enough elements are accumulated. At the end of this run, Logfile will read, "End of lookback period".

Re: Dynamically extend Lookback period [Re: AndrewAMD] #487031
01/02/23 09:27
01/02/23 09:27
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
That would be difficult to implement, because many functions rely on a fixed download period. You could either use a download period that covers the maximum elements of that series, or calculate the number of elements before setting LookBack, or use a flag that prevents trading until the series is filled.


Moderated by  Petra 

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

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

Powered by UBB.threads™ PHP Forum Software 7.7.1