Autotrading PercentTrailing issue

Questions about MultiCharts and user contributed studies.
User avatar
danilo
Posts: 170
Joined: 02 Jan 2007
Location: Italy
Has thanked: 4 times
Been thanked: 9 times

Autotrading PercentTrailing issue

Postby danilo » 28 Dec 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.

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 28 Dec 2007

Hi danilo,

'Buy next bar at close' is an invalid operation. In the next version of MultiCharts such code won't compile. 'Buy at close' is only permitted for 'this bar'.

Regards.

User avatar
danilo
Posts: 170
Joined: 02 Jan 2007
Location: Italy
Has thanked: 4 times
Been thanked: 9 times

RE: Autotrading PercentTrailing issue

Postby danilo » 29 Dec 2007

Dear Marina,

I can change the code in such way:

Buy next bar at 10.5

but I think that the problem still exist, MC will wait to see 10.5 on
the Market but if the price mached was a BID, and I'm a buyer, when
MC will issue an order at Market the ASK price will be mached that
usually is more high (supposing 11.5). I think that internally MC will
consider the order executed ad 10.5, so does the:
"Strategy Performance Report". I think that a way to improve the
performace could be for MC to check the BID price for SELL orders,
and to check ASK price for BUY orders. Almost could be given as an
option.

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 29 Dec 2007

Hi danilo,

Stop and limit orders are not supported for autotrading in the current MC version. Emulation of these orders involves transforming them into market orders, which results in the problem you are describing. In Strategy Performance report both stop and limit orders are supported.

Stop and limit orders will soon be implemented in MultiCharts for autotrading as well.

Regards.


Return to “MultiCharts”