Market On Open orders,How to know bar is last bar of session

Questions about MultiCharts and user contributed studies.
justme
Posts: 56
Joined: 08 Jan 2015
Has thanked: 9 times
Been thanked: 3 times

Market On Open orders,How to know bar is last bar of session

Postby justme » 15 Jan 2015

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

User avatar
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

Postby TJ » 15 Jan 2015

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
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.

How many early closing days are there in the World?

People trades different markets; how many early closing days are there in your markets?

User avatar
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

Postby TJ » 15 Jan 2015

ps. there is an indicator for holidays, you can probably adapt the code for your purposes.


Return to “MultiCharts”