A common coding in a LE script, after conditions are met is often something like "Buy ( "MA2CrossLE" ) next bar at market"
So in a liquid market like CL, that should mean getting filled around 1 tick above the bar opening value. But I find this is almost never the case when running the in sim mode in real time. Any suggestions on how to resolve this? Do I need to specify Buy at "OPENING" of next bar at market
Thanks
"Buy next bar at market" [SOLVED]
- TJ
- Posts: 7775
- Joined: Aug 29 2006
- Location: Global Citizen
- Has thanked: 1036 times
- Been thanked: 2233 times
A common coding in a LE script, after conditions are met is often something like "Buy ( "MA2CrossLE" ) next bar at market"
So in a liquid market like CL, that should mean getting filled around 1 tick above the bar opening value. But I find this is almost never the case when running the in sim mode in real time. Any suggestions on how to resolve this? Do I need to specify Buy at "OPENING" of next bar at market
Thanks
In futures trading, getting filled with 1 tick is considered normal; you can only buy on offer and sell on bid.
"next bar at market" is the same as "next bar at open"; you will get the same fill.
- TJ
- Posts: 7775
- Joined: Aug 29 2006
- Location: Global Citizen
- Has thanked: 1036 times
- Been thanked: 2233 times
Yes, I understand that, however often I get fills near the low of bar and lower than the opening, that would not happen if a buy at market order went in right at the opening of the next bar.
Are you talking about SIM or BACKTEST?
- TJ
- Posts: 7775
- Joined: Aug 29 2006
- Location: Global Citizen
- Has thanked: 1036 times
- Been thanked: 2233 times
Sim
Paper trading account?
Which broker?
InteractiveBrokers have the best paper trading account, because they use real live data feed that is exactly the same as your money account.
- TJ
- Posts: 7775
- Joined: Aug 29 2006
- Location: Global Citizen
- Has thanked: 1036 times
- Been thanked: 2233 times
Not running thru my brokerage account, just letting strategy run in real time using RT data from Esignal
Are you using IOG?
Seems like a coding error.
Please post your codes if you need further help.
- TJ
- Posts: 7775
- Joined: Aug 29 2006
- Location: Global Citizen
- Has thanked: 1036 times
- Been thanked: 2233 times
Yes, I have IOG enabled
With IOG enabled, your logic will be evaluated every tick (instead of at EOB),
and your order will be sent IMMEDIATELY when the condition is met, it will not wait until the next bar.
Please go to Wiki to study the operation of IOG.