SQX 108 - Limit Risk / Reward incorrect when using ATR based Stop Loss

Hi Mark,



When an ATR based SL is selected, and the limit risk-reward is set for the take profit, the rules generated do not obey this limit.


See attached screenshot of settings, which means position of SL and TP should be the same distance apart.


However, SL and TP look like this:


//--------------------------------------------------------------------
// Trading rule: Long entry (On Bar Open)
//--------------------------------------------------------------------                   
if LongEntrySignal
{
    // Action #1
    Open Long order at Market;
        Stop Loss = 2.0 * ATR(85);
        Profit target = 2.0 * ATR(95);


}




//--------------------------------------------------------------------
// Trading rule: Short entry (On Bar Open)
//--------------------------------------------------------------------                   
if (ShortEntrySignal
   and Not LongEntrySignal)
{
    // Action #1
    Open Short order at Market;
        Stop Loss = 2 * ATR(85);
        Profit target = 2 * ATR(95);


}


Clearly 2*ATR(85) is not the same as 2*ATR(95)


The period should be the same for SL and TP always. The factor (in this case 2.0) should be scaled based on the risk / reward ratio.


This would make much more sense than two different periods for SL and TP calculations.


Thanks,


Mike

Attachments
SQX 108 - Limit risk reward ignored for ATR.png
(70.92 KiB)
  • Votes 0
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

m
#1

mikeyc

23.08.2018 20:27

Task created

MF
#2

Mark Fric

28.08.2018 15:45

Status changed from New to Fixed


Votes: 0

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please