Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, dr_panther), 791 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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