Need more exit types.

I am not sure this issue is proper here, or in SQ X programing.


The trailing stop in SQ X with atr is


Close ± N * ATR   (Multicharts code)



Please add new some exit typee.


1,  It's like this. In long position, I want the trailing stop is always the highest value, and in the short position, the trailing stop is always the lowest one.


// EL code
LongTrailingStop = close - N*ATR;


if LongTrailingStop  < LongTrailingStop[1] then  // in longpostion, the trailing stop is always the highest value
      LongTrailingStopLongTrailingStop [1]


Like the picture below.


2, And is it possible that allow us to choose the price for tracking? I want to use high when in long position, and low in short postion.


if marketposition = 1 then begin


       LongTrailingStop = High - N* ATR;


end;


if marketposition=-1 then begin
     ShortTrailingStop = Low + N*ATR;
end;




3, Maybe it's allowed using average of standard deviation, or bar range instead of ATR value in trailing stop or stop loss.

Attachments
atr trailing long.png
(28.28 KiB)
atr trailing short.png
(24.38 KiB)
  • Votes 0
  • Project StrategyQuant X
  • Type Feature
  • Status Archived
  • Priority Normal
  • Assignee None

History

e
#1

eastpeace

25.07.2019 14:22

Task created

e
#2

eastpeace

22.09.2019 12:21

Description changed:

I am not sure this issue is proper here, or in SQ X programing.


The trailing stop in SQ X with atr is


Close ± N * ATR   (Multicharts code)



Please add new some exit typee.


1,  It's like this. In long position, I want the trailing stop is always the highest value, and in the short position, the trailing stop is always the lowest one.


// EL code

LongTrailingStop = close - N*ATR;


if LongTrailingStop  < LongTrailingStop[1] then  // in longpostion, the trailing stop is always the highest value

      LongTrailingStopLongTrailingStop [1]


Like the picture below.


2, And is it possible that allow us to choose the price for tracking? I want to use high when in long position, and low in short postion.


if marketposition = 1 then begin


       LongTrailingStop = High - N* ATR;


end;


if marketposition=-1 then begin
     ShortTrailingStop = Low + N*ATR;
end;



3, Maybe it's allowed using average of standard deviation, or bar range instead of ATR value in trailing stop or stop loss.


MF
#3

Mark Fric

26.11.2020 10:57

Status changed from New to Archived


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