[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with ELA code please



PureBytes Links

Trading Reference Links



I am trying to write a modified RSI indicator where the lenght of the RSI
window would be determined by a custom function.

But when I tried to verify it , it always complains about the  "Lenght"
variable in the " Plot1(RSI(Price, Length), "RSI");  " statement that it is
supposed to be a number ?

Does this mean that I can't use a variable for the Lenght?  What am I
missing ?

Here is the code snippet:


Inputs: Price(Close), CFSmooth(10), BuyZone(30), SellZone(70),
BZColor(Green), SZColor(Magenta);

Vars: Length(0);


Length = Custom_Func ( CFSmooth );

Plot1(RSI(Price, Length), "RSI");
Plot2(BuyZone, "BuyZone");
Plot3(SellZone, "SellZone");

End;



Thanks,

Gabe