Daytradinglovers

hello sir

i want code for following strategy for intraday 5 minutes

BUY

current price is above 2 days close & 50 EMA

MACD is above 0(zero) line with parameter is avg. period :9, short period : 12, long period : 26

SL is when 20 EMA cross 50 EMA

SELL

current price is below 2 days close & 50 EMA

MACD is below 0(zero) line with parameter is avg. period :9, short period : 12, long period : 26

SL is when 50 EMA cross 20 EMA

As per your given condition use day charts

Buy Script:

LAST > REF(CLOSE,2) AND LAST > REF(CLOSE,1) AND LAST > EMA(CLOSE,50) AND
MACD(12, 26, 9, SIMPLE)>0

Buy StopLoss:

CROSSOVER(EMA(CLOSE,20),EMA(CLOSE,50))

Sell Script:

LAST < REF(CLOSE,2) AND LAST < REF(CLOSE,1) AND LAST < EMA(CLOSE,50) AND
MACD(12, 26, 9, SIMPLE)<0

Sell StopLoss:

CROSSOVER(EMA(CLOSE,50),EMA(CLOSE,20))
2 Likes

your script generated an error, so need again your help