Page 1 of 1

Placing Orders on Session Open

Posted: Jan 11 2014
by joshweaver05
since multicharts does pretty much everything next bar open in real time it seems to be causing me some issues from one session to the next. for example if we have a market like the ES, and it is open from 1700 - 1615, and an order is generated on the last bar of the day at 1615 it won't get sent to the broker and it won't get sent on the first bar at 1700 either. I have looked around to find similar post but could not find anything. if any one could give me suggestions on what to do or a link please do so. I am just looking for a way to get that order out at 1700.

the only possible solution i could come up with was IOG, hoping there is a better once since IOG has terrible performance in MC.

Re: Placing Orders on Session Open

Posted: Jan 11 2014
by TJ
since multicharts does pretty much everything next bar open in real time it seems to be causing me some issues from one session to the next. for example if we have a market like the ES, and it is open from 1700 - 1615, and an order is generated on the last bar of the day at 1615 it won't get sent to the broker and it won't get sent on the first bar at 1700 either.
::
Why won't it get sent on the first bar at 1700?
What does the log say?

Do you have your broker side setting to accept after hour orders?

Re: Placing Orders on Session Open

Posted: Jan 11 2014
by joshweaver05
there are no after hour orders on the CME, unless your broker holds the order. the issue is at 1615 the order is placed ment for 1700 hour but but gets rejected so when 1700 comes around there are no order. it won't send new order till 1705 ( 5 min bars) since it thought it already send the 1700 bar order.

Re: Placing Orders on Session Open

Posted: Jan 12 2014
by joshweaver05
was thinking of ideas and thought this might be a way around it, what do you think? its not complete code just quick jot to kinda get the idea on paper.

Code: Select all

if currenttime = 1710 then begin //current time = first bar for session
Recalculate;
end;

if MarketPosition_at_Broker <> Marketposition then begin
if Marketposition = 1 then buy this bar close;
if Marketposition = -1 then sellshort this bar close;
end;
all positions close EOD so something like this if it works would not affect other positions.

Re: Placing Orders on Session Open  [SOLVED]

Posted: Jan 13 2014
by Andrew MultiCharts
Hello Josh,

As we discussed it in the live chat, it is possible with the help of IOG mode and RecalcLastBarAfter keyword in your code.