I'm curious if anyone has ever seen this happen before. For me it has now happened with two different broker profiles. When I enter a trade whether long or short, the broker is writing back that I am long or short, the number of contracts but is showing entryprice as zero. My script generates an OCO order immediately upon entry which is based on entryprice so for example entryprice + 7*Ticksize limit sell; and entryprice - 7*Ticksize stop;
What happens is the OCO order in the case of ES is 1.75 limit sell (0 + 1.75) and -1.75 stop (0 - 1.75). In live trading the exchange rejects these orders (the stop at -1.75) and this cycle will happen for a few seconds until finally EntryPrice is properly shown at which case the OCO order is generated properly (1955.75 limit sell and 1952.25 stop for example). This happened live trading with TT. It was more a nuisance than anything.
Now I am paper trading with Rithmic using a demo-account and the same thing is happening. Yet the OCO order is generated and submitted locally, so the exchange never comes into play (obviously as it's a demo) and the OCO orders are accepted. I imagine when I go live (if I go live) the exchange will reject these bad OCO orders and then a few seconds later the correct entryprice will be written back to MC by Rithmic and the proper OCO order will be submitted and accepted by the exchange.
So the question, has anyone ever seen a delay in entryprice being populated with the correct price from your broker? I'm using SA mode in auto-trading and believe all other settings are correct. In my signal I use "MarketPosition_At_Broker" and "EntryPrice" and have recalc on "broker events" and "position changes" checked off.
Thanks for any insight anyone may have.
EntryPrice Not Updating [SOLVED]
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: EntryPrice Not Updating
So the question, has anyone ever seen a delay in entryprice being populated with the correct price from your broker?
Source.EntryPrice will be available only at next calculation (next close by default) after entry order is filled and entry price is returned by your broker to MC.
Have you tried using Intra-bar Order Generation? That should speed up the EntryPrice update if I'm correct.
Re: EntryPrice Not Updating
It's not that, I am using IOG mode. It has to do with communication back from the broker. It seems not all data is communicated back correctly and or at the same time frequency.
Re: EntryPrice Not Updating [SOLVED]
Under the "auto-trading" tab for the signal, I had "order filled" and "MP change" radio buttons checked for "recalc on broker events" which when I uncheck these, the script calculation delay is enough, that entryprice is reporting back correctly and the OCO orders are working properly.