Autotrading PercentTrailing issue
Posted: Dec 28 2007
I'm testing your autotrading feature, Is not so bad, the only observation that I have to issue is regarding how the TRUE execution price are handled by the system. I will describe the broblem using an example.
1) I send an order like: Buy next bar at Close
2) now supposing that the Close is 10.5, MC wait to see 10.5
and convert the order at Market, that since the ask/bid spread
is execute at 11.5
3) the problem is that the internal function like SetPercentTrailing() will
consider as execution price 10.5 and not 11.5 and also the trailing
stop will calculate a wrong Stop Profit.
The behaviour described in 2 is OK for back-testing, but when the strategy is executed in real-time the system have to take into account the true execution price. Also the "Strategy Performance report" when executed during real-time show wrong execution price.
1) I send an order like: Buy next bar at Close
2) now supposing that the Close is 10.5, MC wait to see 10.5
and convert the order at Market, that since the ask/bid spread
is execute at 11.5
3) the problem is that the internal function like SetPercentTrailing() will
consider as execution price 10.5 and not 11.5 and also the trailing
stop will calculate a wrong Stop Profit.
The behaviour described in 2 is OK for back-testing, but when the strategy is executed in real-time the system have to take into account the true execution price. Also the "Strategy Performance report" when executed during real-time show wrong execution price.