[Bug]Trailing Stop / Stop Loss does not generate orders

Questions about MultiCharts and user contributed studies.
2haerim
Posts: 502
Joined: 01 Sep 2006
Been thanked: 2 times

[Bug]Trailing Stop / Stop Loss does not generate orders

Postby 2haerim » 11 Jun 2009

Please try the following:

[1] Plot a point chart. ex) 6 point chart
[2] Apply the following built-in signals:
-- MovAvg2LineCross LE
-- Percent Trailing
[3] Set the Strategy Properties as follows:
-- Async with 0/0 for Unfilled Strategy Order Replacement
[4] Adjust the inputs so that you can see some signals on the chart.
[5] Turn on Autotrading and soon you will see both entry and trailing stop signals on the chart as expected.
[6] However, the signals from Trailing Stop never send out coresponding orders to the broker.

If I am wrong, please let me know.

Thx

Spaceant
Posts: 252
Joined: 30 May 2009
Has thanked: 1 time
Been thanked: 3 times

Postby Spaceant » 12 Jun 2009

What version do you use?

I experienced similar things as well when I tested with Version 5.x beta and I was told that there was a buy with this special order (Percent Trailing) that have been fixed under 5.0 Gold.

Well, I have not tested with Gold.... probably we need to. Let us know if you have tested with Gold.

Sa

2haerim
Posts: 502
Joined: 01 Sep 2006
Been thanked: 2 times

Postby 2haerim » 12 Jun 2009

I've tested with V5.0 Gold (Build 2369.400).

The results were the same.

This seems to be clearly a bug to be fixed.


HR

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

Postby Marina Pashkova » 03 Jul 2009

Hello,

It looks like there are two factors contributing to the reported issue.
1. You are using the asynchronous auto trading mode. The trailing order is not sent to the broker because the necessary amount has not been reached AT THE BROKER. Special orders (SetBreakEven, SetDollarTrailing, SetPercentTrailing, SetProfitTarget, SetStopLoss) have the following peculiarities:

a) They monitor prices directly at the broker (and are filled either on bid or ask prices) no matter whether the synch or asynch auto trading mode is used. Those prices can be different from what you see on a chart (for example, if you are plotting trades).
b) The necessary amount is monitored starting the moment auto trading is ENABLED; the entry price is set from the ‘Assign the Initial Market Position at the Broker’ dialogue. The section of the chart between the historical entry and the moment auto trading is enabled is ignored when monitoring the necessary amount in the asynch auto trading mode.

2. You are counting on order replacement. However, a limit/stop order is replaced by a market order if that order has been filled on the chart and has been accepted but not filled by the broker. According to you, the order was never sent.

Here’s what you need to do:

Plot bids and asks and enable the ‘Extended Backtesting’ mode. This will take care of factor (a). If you do not like the way the trailing order works, you can replace it by your script based on the regular Stop order. This will take care of factor (b).
The above will ensure that limit/stop orders will be replaced by market orders because the orders will appear on the chart and will be sent to the broker.

Apart from that, the latest version of MC should be used (Gold release) because MC 5.0 beta 6 had a bug with special orders.


Return to “MultiCharts”