I'm live trading this strategy using a real connection to Interactive Brokers (a paper trader account, but still a real connection to IB).
This strategy as you can see is automated and enterer a long position with a stop order on that bar. Nevertheless, the order never occurred and there's no trace of it in MultiCharts orders tab of the position tracker, nor in the broker, nor there are any errors in the logs.
Does anybody know how and why this may happen? The only thing I can't think of, considering that there's no trace of that order, is that the auto trading was not active at the time of the entry, but I'm fairly confident that the strategy was always active, so I wonder if there are any other possible explanations.
Operation not executed [SOLVED]
- Polly MultiCharts
- Posts: 202
- Joined: 20 Jul 2022
- Has thanked: 1 time
- Been thanked: 56 times
Re: Operation not executed
Hi simoneb,
When you’re using AA mode, the trades are plotted on the chart when the order generation conditions are met with no respect to the real order executions on the broker. There are 3 separate market positions when strategy is auto trading in MultiCharts:
Also please note that orders are generated according to the logic of a signal script.
Please add traces in your code (print, fileappend) to find out why your strategy decided to place an order, (or not to place) in a particular case.
A general example is available in our Wiki.
When you’re using AA mode, the trades are plotted on the chart when the order generation conditions are met with no respect to the real order executions on the broker. There are 3 separate market positions when strategy is auto trading in MultiCharts:
- Broker position. This is the net position for a traded security at your broker account that takes into consideration all trades.
- Auto trading engine position. This is the inner position of the strategy on a specific chart calculated by the software.
- Chart position. This is the position generated by orders visually executed on a chart.
Also please note that orders are generated according to the logic of a signal script.
Please add traces in your code (print, fileappend) to find out why your strategy decided to place an order, (or not to place) in a particular case.
A general example is available in our Wiki.
Re: Operation not executed
Hi Polly, thanks for your answer, but I don't understand how it explains the scenarios I described. The strategy should have entered long, but MC didn't even try to place any order. In the Orders tab of the Orders and Positions Tracker window, there's no trace of that order.
What you explain and the documentation you link to seem to describe scenarios when the order was rejected by the broker, but in this case the order wasn't generated by MC in the first place. Can you think of any other explanation for why it may happen?
What you explain and the documentation you link to seem to describe scenarios when the order was rejected by the broker, but in this case the order wasn't generated by MC in the first place. Can you think of any other explanation for why it may happen?
- Polly MultiCharts
- Posts: 202
- Joined: 20 Jul 2022
- Has thanked: 1 time
- Been thanked: 56 times
Re: Operation not executed [SOLVED]
simoneb,
If there is no order in the Order and Position Tracker it means that it was not generated by the strategy. In that case you can add traces in your code (print, fileappend) to find out why your strategy decided to place an order, (or not to place) in a particular case.
A general example is available in our Wiki.
In this article you can find just the examples. Only the script developer knows which values shall be traced in the code to analyze its operation.
If there is no order in the Order and Position Tracker it means that it was not generated by the strategy. In that case you can add traces in your code (print, fileappend) to find out why your strategy decided to place an order, (or not to place) in a particular case.
A general example is available in our Wiki.
In this article you can find just the examples. Only the script developer knows which values shall be traced in the code to analyze its operation.