Need BUY, SELL Script for Pi based on the following

BUY Script

  1. Welles Smoothing - 5, 8 and 13 cross above EMA 50

  2. All the above WWS and EMA cross above SMA 125

  3. ADX and Di + both above 24 (if possible)

  4. MACD default setting crosses above 0 positive

SELL script

  1. Welles Smoothing - 5, 8 and 13 cross below EMA 50

  2. All the above Wells Smoothing and EMA cross below SMA 125

  3. ADX and Di negative (-) both above 24 (if possible)

  4. MACD default setting crosses below 0 negative

1 Like

As per above condition

Buy:

SET D = CROSSOVER(EMA(CLOSE, 50), WWS(CLOSE, 5)) AND
 CROSSOVER(EMA(CLOSE, 50), WWS(CLOSE, 8)) AND
 CROSSOVER(EMA(CLOSE, 50), WWS(CLOSE, 13)) 
CROSSOVER(D,SMA(CLOSE,125)) AND DIP(14) > 24 AND
SET A = MACDSignal(13, 26, 9, SIMPLE)
SET B = MACD(13, 26, 9, SIMPLE)
CROSSOVER(A, B)>0

Sell:

SET D = CROSSOVER(WWS(CLOSE, 5), EMA(CLOSE, 50)) AND
 CROSSOVER(WWS(CLOSE, 8), EMA(CLOSE, 50)) AND
 CROSSOVER(WWS(CLOSE, 13), EMA(CLOSE, 50)) 
CROSSOVER(SMA(CLOSE,125),D) AND DIN(14) > 24 AND
SET A = MACDSignal(13, 26, 9, SIMPLE)
SET B = MACD(13, 26, 9, SIMPLE)
CROSSOVER(A, B)<0