Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, alibaba, Quad), 761 guests, and 2 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
Entry at opening price #481322
08/26/20 22:30
08/26/20 22:30
Joined: Aug 2020
Posts: 1
M
MagnusM Offline OP
Guest
MagnusM  Offline OP
Guest
M

Joined: Aug 2020
Posts: 1
Hi,

I'm new to Zorro. I'm trying to make a backtest script based on gap percentage on a daily chart. So if the stock gap up more then let's say 2% in the morning, enter long. The issue is that the enter long funtion is entering at the closing price of the candle, it should trigger at the opening price instead . Any ideas?

Last edited by MagnusM; 08/26/20 22:30.
Re: Entry at opening price [Re: MagnusM] #481325
08/27/20 14:13
08/27/20 14:13
Joined: Oct 2017
Posts: 52
Brazil
J
jmlocatelli Offline
Junior Member
jmlocatelli  Offline
Junior Member
J

Joined: Oct 2017
Posts: 52
Brazil
HI,

In TestMode you can check the next day open price using priceOpen(-1) and SET(PEEK).
Then use Fill = 3 before EnterLong/EnterShort to open the position at open next bar.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1