Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (7th_zorro, TipmyPip, RealSerious3D), 892 guests, and 4 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
Trade at bar open #487423
04/13/23 19:43
04/13/23 19:43
Joined: Oct 2022
Posts: 13
N/A
J
juanex Offline OP
Newbie
juanex  Offline OP
Newbie
J

Joined: Oct 2022
Posts: 13
N/A
Hello, I am trying to backtest an intraday / overnight strategy with daily bars and would like to set up trade functions at both candle open and candle close, from my understanding, BarOffset can be used to accomplish this however when I set it to trade at market open it still uses the closing price. I am also using Fill = 0 and have set(TICKS) just to compare the prices as close as possible to historical data

can someone guide me on how I can use the opening price as my traded price?

See attachment for trade logs and historical price.

Attached Files Screenshot 2023-04-13 154228.pngScreenshot 2023-04-13 154202.png
Re: Trade at bar open [Re: juanex] #487430
04/17/23 14:19
04/17/23 14:19
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt

Re: Trade at bar open [Re: jcl] #487431
04/17/23 14:57
04/17/23 14:57
Joined: Oct 2022
Posts: 13
N/A
J
juanex Offline OP
Newbie
juanex  Offline OP
Newbie
J

Joined: Oct 2022
Posts: 13
N/A
I thought that something with Fill would be the answer, however, that would make every trade execute at the next candle open, ideally, I want to test the price movement between candle open to candle close and vice versa, not candle open to candle open.

Re: Trade at bar open [Re: juanex] #487434
04/18/23 12:52
04/18/23 12:52
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
For testing the price movement, use M1 history. You need then no special fill mode. Just enter the position one minute after market open.

Re: Trade at bar open [Re: juanex] #487455
04/28/23 15:07
04/28/23 15:07
Joined: Oct 2022
Posts: 13
N/A
J
juanex Offline OP
Newbie
juanex  Offline OP
Newbie
J

Joined: Oct 2022
Posts: 13
N/A
Forgive me if this sounds like a dumb question but when you say use M1 history, are you referring to simply changing the BarPeriod from 1440 (for daily ) to 1 or are you talking about downloading 1-minute data? if it is the latter I only have daily data at the moment which is why I was trying to look for a workaround by using the opening price of the candle.

Re: Trade at bar open [Re: juanex] #487456
04/28/23 15:21
04/28/23 15:21
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Both. You need intraday history for intraday backtesting, and you need BarPeriod=1 for one minute bars.

Re: Trade at bar open [Re: juanex] #487457
04/28/23 16:15
04/28/23 16:15
Joined: Oct 2022
Posts: 13
N/A
J
juanex Offline OP
Newbie
juanex  Offline OP
Newbie
J

Joined: Oct 2022
Posts: 13
N/A
Yeah that would be the best option if I had that data at the moment.

But to go back to my original question, is there no way to test trading with the bar open price instead of the close?


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1