scusi è possibile fare un programma che quando il prezzo tocca l’ema 25 và in buy o short a seconda che il super trend sia in rialzo o in ribasso? grazie
Eccolo:
DEFPARAM CumulateOrders = False
ST = Supertrend[3,10]
Ema25 = average[25,1](close)
Bull = close > ST
Bear = close < ST
IF Bull THEN
IF low <= Ema25 AND close > Ema25 THEN
BUY 1 Contract at Market
ENDIF
ELSIF Bear THEN
IF high >= Ema25 AND close < Ema25 THEN
SELLSHORT 1 Contract at Market
ENDIF
ENDIF
scusa si puo aggiungere uno stop quando cambia il super trend, grazie
Eccolo (non l’ho provato):
DEFPARAM CumulateOrders = False
ST = Supertrend[3,10]
Ema25 = average[25,1](close)
Bull = close > ST
Bear = close < ST
IF Bull THEN
IF low <= Ema25 AND close > Ema25 THEN
BUY 1 Contract at Market
ENDIF
ELSIF Bear THEN
IF high >= Ema25 AND close < Ema25 THEN
SELLSHORT 1 Contract at Market
ENDIF
ENDIF
IF LongOnMarket AND Bear THEN
SELL at market
ELSIF ShortOnMarket AND Bull THEN
EXITSHORT at market
ENDIF
scusami ma al cambio di super trend non va in stop, grazie
A me funziona.
Dimmi su quale strumento e timeframe l’hai provato ed indicami la data di entrata di una o due operazioni che poi non vengono fermate al cambio (ovviamente se cambi i parametri devi indicarmi quelli che hai usato tu per la prova).