Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by M_D. 04/26/24 20:22
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (M_D, Quad, Ayumi), 813 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Validating Lookback #479965
05/10/20 04:39
05/10/20 04:39
Joined: May 2020
Posts: 2
Claremore
H
Herrwolf1 Offline OP
Guest
Herrwolf1  Offline OP
Guest
H

Joined: May 2020
Posts: 2
Claremore
The manual indicates trading won't happen until the lookback threshold has been reached. Is there a way to check the look back and return out of a function if the lookback threshold hasn't been reached?

For example

void run()
// Set look back

I'd like to validate the lookback here and return if it's not ready.
// Consider trading logic

// Enter/exit trade.

thanks.

Re: Validating Lookback [Re: Herrwolf1] #479966
05/10/20 04:45
05/10/20 04:45
Joined: Dec 2014
Posts: 206
Germany
Smon Offline
Member
Smon  Offline
Member

Joined: Dec 2014
Posts: 206
Germany
if(is(LOOKBACK)) return;


Make sure, you put this after the last series!

Re: Validating Lookback [Re: Smon] #479993
05/11/20 19:09
05/11/20 19:09
Joined: May 2020
Posts: 2
Claremore
H
Herrwolf1 Offline OP
Guest
Herrwolf1  Offline OP
Guest
H

Joined: May 2020
Posts: 2
Claremore
Thanks for the response.

I did this:

vars _prices = series(priceClose(0));
if (is(LOOKBACK)) return;

Then I received the following error. Is this what you meant by "series"? It works otherwise.

Zorro S 2.25.3
(c) oP group Germany 2020
Registered: Zorro S Subscription


CIFEM_SumUp.dll mounted
SumUp Ver 1.1
Error 055: EUR/USD no 2020 history (History\EURUSD_2020.t6)
Test: CIFEM_SumUp EUR/USD 2012..2020
Error 041: Wrong series usage!
Bar 7999: 1 - bar 8000: 15

Re: Validating Lookback [Re: Herrwolf1] #479998
05/12/20 05:20
05/12/20 05:20
Joined: Mar 2019
Posts: 357
D
danatrader Offline
Senior Member
danatrader  Offline
Senior Member
D

Joined: Mar 2019
Posts: 357
You need to share more of your code.
Without context I assume it is impossible to analyze what the cause is.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1