Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Akow, TipmyPip, tomaslolo), 788 guests, and 11 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 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