I just found this error, rather redundancy in one of the EAs embedded in Pi.
The EA is "Relative Strength Index with EMA"
In Buy code:
SET A = RSI(CLOSE, 7)
SET B = RSI(CLOSE, 14)
SET C = RSI(CLOSE, 21)
SET D = EMA(A, 10)
SET E = EMA(B, 10)
CROSSOVER(D,E)
Clearly, SET C = RSI(CLOSE, 21)
is redundant code without any use.
Am I right?
Also I am unable to edit embedded EAs. Why?
I find yet another gross error.
There are 2 similar EAs - one embedded in Pi and other on EA page on zerodha,com
In them the Buy and Sell codes are completely reversed.
EA in Pi:
Name: Golden Crossover
Buy: crossover(sma(close,50),sma(close,200))
Sell: crossover(sma(close,200),sma(close,50))
But
EA on https://zerodha.com/expert-advisors/code/death-cross-and-golden-cross
Name: Death Cross & Golden Cross
Buy: CROSSOVER(SMA(CLOSE,200),SMA(CLOSE,50))
Sell: CROSSOVER(SMA(CLOSE,50),SMA(CLOSE,200))