OnBrokerStategyOrderFilled not called when backtesting/optim

Questions about MultiCharts .NET and user contributed studies.
hairyMug
Posts: 57
Joined: 03 Feb 2014
Has thanked: 5 times
Been thanked: 6 times

OnBrokerStategyOrderFilled not called when backtesting/optim

Postby hairyMug » 15 Apr 2014

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.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: OnBrokerStategyOrderFilled not called when backtesting/o

Postby Henry MultiСharts » 15 Apr 2014

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.

User avatar
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

Postby JoshM » 22 Apr 2014

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.
Will this new version with new order handling also come with code breaking changes?

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: OnBrokerStategyOrderFilled not called when backtesting/o

Postby Henry MultiСharts » 22 Apr 2014

Will this new version with new order handling also come with code breaking changes?
Hello JoshM,

New engine will have new reserved words, that would not affect the operation of the existing reserved words.


Return to “MultiCharts .NET”