buonasera ho questo trading sistem vorrei aggiungere la condizione di uscita dal trade quando il prezzo chiude sotto il supertrend settato a 3.5 al moltiplicatore e 20 periodi
DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate
indicator1 = CALL "VolPri"[20,1,1](close)
indicator2 = CALL "VolPri"[200,10,1](close)
c1 = (indicator1 CROSSES OVER 10)
c3 = (indicator2 >10)
IF c1 AND c3 THEN
BUY 1000 CASH AT MARKET
ENDIF
c2 = (indicator1 CROSSES UNDER -15)
IF c2 THEN
SELL AT MARKET
ENDIF
// Stop e target
//SET STOP %TRAILING 20
Alla linea 11 metti questa riga:
st = close < Supertrend[3.5,20]
e aggiungi OR st alle condizioni della linea 13.