Buongiorno
Se possibile vorrei trasformare questo trailing stop penso creato da Ale e decisamente perfetto in percentuale anziché in punti. Grazie
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//TRAILING STOP
TGL = 5
TGS= 5
if not onmarket then
MAXPRICE = 0
MINPRICE = close
PREZZOUSCITA = 0
ENDIF
if longonmarket then
MAXPRICE = MAX (MAXPRICE,close )
if MAXPRICE- tradeprice (1 )>= TGL* pointsize then
PREZZOUSCITA = MAXPRICE- TGL* pointsize
ENDIF
ENDIF
if shortonmarket then
MINPRICE = MIN (MINPRICE,close )
if tradeprice (1 )- MINPRICE>= TGS* pointsize then
PREZZOUSCITA = MINPRICE+ TGS* pointsize
ENDIF
ENDIF
if onmarket and PREZZOUSCITA> 0 then
EXITSHORT AT PREZZOUSCITA STOP
SELL AT PREZZOUSCITA STOP
ENDIF