Hi-
When using intraday data, early closes will cause issues with Market on open orders along the lines of
if time=sessionEndTime then Sell next bar market
I have resolved this issue in the past by reading in data that will update what the session's closing time actually was for each day, but I would like to streamline it and keep it all to the data found in the chart itself. I was hoping that MC would have some built in functionality which will inform that the session has closed and so I could then fire off the sell next bar order, but I haven't found anything.
What are the different ways that I can work around this? There has to be a work around that would allow the needed information be gathered within the chart. As I need to stay true to trade what you test, I need this to work in realtime and also during historical simulations.
Thanks. Gordon
Market On Open orders,How to know bar is last bar of session
- TJ
- Posts: 7742
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Market On Open orders,How to know bar is last bar of ses
You have to create a database of "early close days", because I don't know of any datafeed that has such information as an integral part of their feed.Hi-
When using intraday data, early closes will cause issues with Market on open orders along the lines of
if time=sessionEndTime then Sell next bar market
I have resolved this issue in the past by reading in data that will update what the session's closing time actually was for each day, but I would like to streamline it and keep it all to the data found in the chart itself. I was hoping that MC would have some built in functionality which will inform that the session has closed and so I could then fire off the sell next bar order, but I haven't found anything.
What are the different ways that I can work around this? There has to be a work around that would allow the needed information be gathered within the chart. As I need to stay true to trade what you test, I need this to work in realtime and also during historical simulations.
Thanks. Gordon
How many early closing days are there in the World?
People trades different markets; how many early closing days are there in your markets?
- TJ
- Posts: 7742
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Market On Open orders,How to know bar is last bar of ses
ps. there is an indicator for holidays, you can probably adapt the code for your purposes.