using 5-minute bars...
I do this in my Initialize() method:
SetStopLoss("enter_long1C", CalculationMode.Ticks, 200, false);
against an entry order in my OnBarUpdate() method:
EnterLongLimit(targetpos, limitprice, "enter_long1C");
To my knowledge there are no other orders either "in force" or "laying off to the side"
(such as other SetStopLoss or SetProfitTarget's). I'm trading only 1 instrument.
I only trade 1 contract, and only have 1 position open in one direction (no hedging) at
any time.
during backtesting, I incur 19 "stopped" trades on GC between 9/30/12 and 9/26/14
A.
each is stopped out only 20 ticks (2 points) away from
their respective entry prices instead of the expected 200 ticks (20 points).
B.
Also, peculiarly, every single one of them is stopped out in the same bar in which
the trade was opened. they are all "single-bar" trades.
C.
a trade exited normally with a 179-tick loss on 3/7/14
entered at 5:25AM pacific time and exited at 5:45AM pacific time, instead of being
stopped out at 20 ticks.
Widening the stop to 2,000 ticks suppresses the symptom... no trades are stopped out.
Question: why is the backtest imposing 20-tick stops with a 200-tick stoploss?
thanks so much in advance -- Jim Alexander : )
Comment