Gamestudio Links
Zorro Links
Newest Posts
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
folder management functions
by 7th_zorro. 04/15/24 10:10
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
LPDIRECT3DCUBETEXTUR
E9

by Ayumi. 04/12/24 11:00
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 04/11/24 14:56
SGT_FW
by Aku_Aku. 04/10/24 16:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (7th_zorro, Quad), 373 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
11honza11, ccorrea, sakolin, rajesh7827, juergen_wue
19045 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