I have code in the "OnBrokerStategyOrderFilled" and when debugging while optimizing or backtesting, this is never hit.
Without this being hit, the results are not valid.
Is there an event that I can capture when an order is filled when backtesting? This way I could call the "OnBrokerStategyOrderFilled" function.
OnBrokerStategyOrderFilled not called when backtesting/optim
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: OnBrokerStategyOrderFilled not called when backtesting/o
Hello hairyMug,
"OnBrokerStategyOrderFilled" is for auto trading with broker. It does not work in backtesting.
In order to know if the order was filled or not in backtesting you can check the market position and the amount of contracts in the current position, there are also collections of Open and Closed Trades. For more information please refer to Strategy_Performance article in our Wiki section.
We are going to improve the algorithms of order handling in backtesting and auto trading in the new Auto Trading and Backtesting engine that is coming in one of the future versions of MultiCharts.
"OnBrokerStategyOrderFilled" is for auto trading with broker. It does not work in backtesting.
In order to know if the order was filled or not in backtesting you can check the market position and the amount of contracts in the current position, there are also collections of Open and Closed Trades. For more information please refer to Strategy_Performance article in our Wiki section.
We are going to improve the algorithms of order handling in backtesting and auto trading in the new Auto Trading and Backtesting engine that is coming in one of the future versions of MultiCharts.
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: OnBrokerStategyOrderFilled not called when backtesting/o
Will this new version with new order handling also come with code breaking changes?We are going to improve the algorithms of order handling in backtesting and auto trading in the new Auto Trading and Backtesting engine that is coming in one of the future versions of MultiCharts.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: OnBrokerStategyOrderFilled not called when backtesting/o
Hello JoshM,Will this new version with new order handling also come with code breaking changes?
New engine will have new reserved words, that would not affect the operation of the existing reserved words.