Improve exits by add with symmetry turned on is bugged. (It's incorrectly replace for longs and add for shorts)



The original strat has exit after 25 bars so this should be retained for both longs and shorts when improve by add, but it isn't being retained for longs.... 
//--------------------------------------------------------------------
// Trading rule: Long entry (On Every Tick)
//--------------------------------------------------------------------
if ((LongEntrySignal
and Not ShortEntrySignal)
and Not LongExitSignal)
{
// Action #1
Open Long order at (HeikenAshiClose(Main chart)[1] + (0.20 * MTATR(Main chart,16)[1])) Limit;
Order valid for 42 bars;
Duplicate trades: disabled;
Replacing pending orders: allowed;
Stop Loss = 1.1* ATR(11);

}
//--------------------------------------------------------------------
// Trading rule: Short entry (On Every Tick)
//--------------------------------------------------------------------
if ((ShortEntrySignal
and Not LongEntrySignal)
and Not ShortExitSignal)
{
// Action #1
Open Short order at (HeikenAshiClose(Main chart)[1] - (0.2 * MTATR(Main chart,16)[1])) Limit;
Order valid for 42 bars;
Duplicate trades: disabled;
Replacing pending orders: allowed;
Stop Loss = 1.1* ATR(11);

Exit After 25 bars;

}
Attachments
Annotation 2019-08-17 190321.png
(6.95 KiB)
Strategy 0262693 - RB.sqx
(64.73 KiB)
  • Votes +1
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

b
#1

bentra

18.08.2019 01:05

Task created

b
#2

bentra

18.08.2019 01:05

Subject changed from Improve exits by add is bugged. (Doing replace for longs and add for shorts) to Improve exits by add with symmetry turned on is bugged. (Doing replace for longs and add for shorts)

KL
#3

kainc301

24.08.2019 06:56
Voted for this task.
MF
#4

Mark Fric

27.05.2020 09:11

Status changed from New to Fixed

already fixed

Votes: +1

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please