Hello,
I was wondering if anybody had the time to possibly code twiggs money flow indicator. It is based of the acumulation indicator and the chaikin money flow indicator.
Metastock formula
{2003-09-24}
periods:=Input("TMF periods",1,100,21);
TRH:=Max(Ref(C,-1),H);
TRL:=Min(Ref(C,-1),L);
TR:=TRH-TRL;
ADV:=((C-TRL)-(TRH-C))/If(TR=0,999999,TR)*V;
WV:=V+(Ref(V,-1)*0);
If(Wilders(WV,periods)=0,0,Wilders(ADV,periods)/Wilders(WV,periods))
Twiggs Money Flow substitutes true range for the daily high and low and then applies exponential smoothing, separately, to the sum of AD and the divisor:
I was wondering if anybody had the time to possibly code twiggs money flow indicator. It is based of the acumulation indicator and the chaikin money flow indicator.
Metastock formula
{2003-09-24}
periods:=Input("TMF periods",1,100,21);
TRH:=Max(Ref(C,-1),H);
TRL:=Min(Ref(C,-1),L);
TR:=TRH-TRL;
ADV:=((C-TRL)-(TRH-C))/If(TR=0,999999,TR)*V;
WV:=V+(Ref(V,-1)*0);
If(Wilders(WV,periods)=0,0,Wilders(ADV,periods)/Wilders(WV,periods))
Twiggs Money Flow substitutes true range for the daily high and low and then applies exponential smoothing, separately, to the sum of AD and the divisor:
- Calculate True Range High and True Range Low:
True Range High (TRH) is the greater of:
- High [today] and
- Closing price [yesterday]
True Range Low (TRL) is the lesser of:
- Low [today] and
- Closing price [yesterday]
- Calculate AD using True Range High and True Range Low:
AD = {(Close - TRL) - (TRH - Close)} / {TRH - TRL} * Volume
- Apply exponential smoothing* to AD:
- Calculate AD[21] as the sum of AD for the first 21 days
- On the next day, multiply AD[21] by 20/21 and add AD for day 22
- Repeat this process for each subsequent day**.
<center>Do the same with the divisor:</center>
- Calculate V[21] as the sum of volume for the same 21 day period as in 3. above
- On the next day, multiply V[21] by 20/21 and add Volume for day 22
- Repeat this process for each subsequent day**
- Divide AD[21] by V[21]:
Twiggs Money Flow = AD[21] / V[21]
This information was taken of incrediblecharts.com
Thanks
Paul