Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, degenerate_762), 1,309 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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