KELTNER TSI

 

KELTNER TSIType : Function, Name : MTM

Input: R(Numeric),S(Numeric);

if close-close[1]<>0 then
MTM=Xaverage(Xaverage(Close-Close[1],R),S)/Xaverage( XAverage(AbsValue(Close
-Close[1]),R),S);

Type : Signal, Name : Keltner TSI

Inputs: R(21),S(12),Q(6),Len(25),Fc(1.75),Extra(1);
Vars: Mo(0),Avg(0),Upper(0),Lower(0),Ncontr(0),Mp(0); Ncontr=1;
{Number of Contracts to trade is initialized to 1}
Mo=MTM(R,S);
Avg=XAverage(MTM(R,S),Q);
Upper=XAverage(Close,Len)+Fc*XAverage(TrueRange,Len);
Lower=XAverage(Close,Len)-Fc*XAverage(TrueRange,Len);
Mp=MarketPosition;

If Mp<>1 and Mo crosses above Avg then buy ncontr contracts on close;
If MP=1 and Close crosses above Upper then buy Extra contracts on close;
If MP<>-1 and Mo crosses below Avg then sell ncontr contracts on close;
If MP=-1 and Close crosses below Lower then sell Extra contracts on close;

KELTNER TSI

 

Николай Солабуто
Оцените автора
Николай Солабуто
Добавить комментарий