Inputs:{Laguerre RSI Inputs}
LagPrice(wc),
gamm(.62), {damping factor, adjust to best suit your data, 0.50 - 0.85 }
{Schaff Inputs}
Factor(1),
Period(0),
Fast(5),
Slow(34),
Type(7),
Length(3);
Vars: {Laguerre RSI Variables}
L0(0),L1(0),L2(0),L3(0),CU(0),CD(0),LgRSI(0);
{Schaff Code}
If MTF(Factor) Then Begin
If Length < 1 Then
Value1 = Natural(Hilbert(Factor, Value2) * Factor)
Else
Value1 = Length;
Value2 = TypeAverageMTF(Factor,Schaff(Factor,Period,Fast,Sl ow),Value1,Type,0);
End;
{Laguerre RSI Code}
L0 = (1 - gamm)*LagPrice + gamm*L0[1];
L1 = - gamm *L0 + L0[1] + gamm *L1[1];
L2 = - gamm *L1 + L1[1] + gamm *L2[1];
L3 = - gamm *L2 + L2[1] + gamm *L3[1];
CU = 0;
CD = 0;
If L0 >= L1 then CU = L0 - L1 else CD = L1 - L0;
If L1 >= L2 then CU = CU + L1 - L2 else CD = CD + L2 - L1;
If L2 >= L3 then CU = CU + L2 - L3 else CD = CD + L3 - L2;
If CU + CD <> 0 then LgRSI = 100*CU / (CU + CD);
Value3 = LgRSI;
{Calculating and Plotting New Indicator}
Value4 = (Value2 + Value3) / 2;
Plot1(Value4,"Lag/Sch Avg");
Plot2(80,"80");
Plot3(20,"20");
here is the indicator EL from TS. Wanting to create a futures(ES or ER2) strategy that buys at 20(oversold) and sells at 80(overbought) or if it stays up there to continue to hold it and vice versa on the sell short end.
The Leg is just a oscillator so I presume any oscillator settins would suffice.