MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

A B C D E F G H I J K L M N O P R S T U V W Y Z #

Elder's Force Index II by Jose Silva

Dr Elder's Force Index, with original, normalized & momentum output choice.


Elder's Force Index II

{ Dr Elder's Force Index v2.0 }
{ Incorporating automatic historically-valid
  Force Index peak/trough boundaries }
{ (c) Copyright 2004 Jose Silva }
{ http://www.metastocktools.com }

{ User inputs }
pds:=Input("Force Index smoothing periods",1,252,2);
norm:=Input("Force Index normalizing periods",2,2520,252);
plot:=Input("[1] Original Force Index, [2]Normalized",1,2,2);

{ Force Index flavours }
FI:=Mov(V*(C-Ref(C,-1)),pds,E);
FInorm:=(FI-LLV(FI,norm))
/(HHV(FI,norm)-LLV(FI,norm)+.000001)*200-100;
FI:=If(plot=1,FI,FInorm);
avg:=Cum(FI)/Cum(IsDefined(FI));

{ historical FI peak/trough boundaries }
pk:=Ref(FI,-1)>Ref(FI,-2)
AND Ref(FI,-1)>FI
AND Ref(FI,-1)>avg;
pkVal:=ValueWhen(1,pk,Ref(FI,-1));
pkAvg:=If(plot=1,avg,
Cum(pkVal)/Cum(IsDefined(pkVal)));
tr:=Ref(FI,-1)<Ref(FI,-2)
AND Ref(FI,-1)<FI
AND Ref(FI,-1)<avg;
trVal:=ValueWhen(1,tr,Ref(FI,-1));
trAvg:=If(plot=1,avg,
Cum(trVal)/Cum(IsDefined(trVal)));

{ Plot on own window }
pkAvg;
avg;
trAvg;
FI

Source / From: TOP
http://www.metastocktools.com

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.

TradeStation® Pro, TradeStation® 2000i, OptionStation®, SuperCharts®, PowerEditor® and EasyLanguage®
are registered trademarks of TradeStation Technologies, Inc. Other names and marks referred to are the property of their respective owners.

All information provided on this website is for educational purposes only. Trading involves risk, including possible loss of principal and other losses.

Ten i inne materiały na tej stronie zostały zamieszczone zostały jedynie w celach edukacyjnych, nie ponoszę żadnej odpowiedzialno¶ci za ich stosowanie.

Gra na giełdzie i rynkach walutowych (FOREX) niesie ze sob± ryzyko poważnych strat finansowych!