Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Twiggs Moneyflow indicator Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
star1day
Posted : Saturday, April 2, 2005 1:49:05 PM
Registered User
Joined: 1/29/2005
Posts: 8
Does anyone have pcf for Twiggs Moneyflow indicator?
Doug_H
Posted : Saturday, April 2, 2005 7:18:18 PM


Worden Trainer

Joined: 10/1/2004
Posts: 4,308
I have been unable to locate the formula for this out on the web. If you can come up with the formula, we'll be able to let you know whether or not it is possible to plot this in TeleChart.

- Doug
Teaching Online!
j2d2
Posted : Saturday, April 2, 2005 10:55:30 PM

Registered User
Joined: 1/14/2005
Posts: 21
Hi Doug:
I first looked on (removed by Moderator) to find a link with a reference to 'Twiggs' which led me to (removed by moderator)where I found the following description....

Twiggs Money Flow makes two basic improvements to the Chaikin Money Flow formula:

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**.

*Welles Wilder's Indicators
TMF uses Welles Wilder's formula for calculating an exponential moving average:
1/14 of today's data + 13/14 of yesterday's average is a 14-day exponential moving average.
If you refer to Exponential Moving Averages you will see that this equates to a normal 27-day exponential moving average.

Example
Adjust Wilder's time period (n=15) to a normal EMA time period:

EMA time period = (n + 1) / 2 = (15 + 1) / 2 = 8 days


Do the same with the divisor:
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**
**Exponential Smoothing
Some observant readers have questioned why Step 3 is not divided by 21 days, to create an exponential moving average. The same applies to Step 4.
You will note that Step 5 divides the result of Step 3 by Step 4. Division of the numerator (Step 3) and the denominator (Step 4) by 21 is therefore redundant: the one offsets the other.

This leads to another question: Why are AD (Step 3) and Volume (Step 4) not divided by 21?
If we take Step 4 as an example, V[21] is the sum of 21 days of volume. If we want to add the next days Volume, we must remove one days Volume from V[21], to keep the total constant at 21 days. We do this by multiplying V[21] by the fraction 20/21.


Divide AD[21] by V[21]:

Twiggs Money Flow = AD[21] / V[21]
_____________
There is more information on this posted at (Removed by Moderator)should you wish to refer to the original. I have not personally attempted to put this into a PCF as I know that there are several posters on this forum who can do a much more professional job with it than I ever could.

Regards,
j2d2


Doug_H
Posted : Monday, April 4, 2005 11:04:30 AM


Worden Trainer

Joined: 10/1/2004
Posts: 4,308
This information is being reviewed. Someone will post back here.

- Doug
Teaching Online!
bustermu
Posted : Monday, April 4, 2005 5:11:14 PM
Registered User
Joined: 1/1/2005
Posts: 2,645
QUOTE (j2d2000wor)

Example
Adjust Wilder's time period (n=15) to a normal EMA time period:

EMA time period = (n + 1)/2 = (15 + 1)/2 = 8 days


The reference is incorrect. It should read:

EMA time period = 2*n-1 = 2*15-1 = 29 days

The indicator has a lag of 20 bars. I suggest one plot:

V*(2*C-TRH-TRLL)/TR

as a Cumulative Custom Indicator and, like MS, there will be no lag.

If you have a problem with volume spikes, replace V with its square root, for evample, which will not introduce lag.

Thanks,
Jim Murphy
bustermu
Posted : Wednesday, April 6, 2005 7:13:59 AM
Registered User
Joined: 1/1/2005
Posts: 2,645
QUOTE (j2d2000wor)
Hi Doug:
I first looked on (removed by Moderator) to find a link with a reference to 'Twiggs' which led me to (removed by moderator)...

There is more information on this posted at (Removed by Moderator)


Please also note that Doug_H stated,

'I have been unable to locate the formula for this out on the web.'

What a shame. And no one is allowed to help him.

I realize that this 'Forum' is run by Worden Brothers (WB) and they have the right to censor whatever they please. It is difficult to understand why citing references for Technical Analysis (TA) material for TeleChart users is detrimental to WB. Please reconsider. Fortunately, most others have the opposite policy about citing references.

Apparently the 'policy' does not apply to all. Some just know what is better for TeleChart users than others and j2d2 is not one of them.

To more user friendly policies,
Jim Murphy
Doug_H
Posted : Wednesday, April 6, 2005 8:49:41 AM


Worden Trainer

Joined: 10/1/2004
Posts: 4,308
bustermu:

Someone obviously did help me with this, and we're grateful for the help. On my first jump out onto the web...after hours, on a Saturday evening, I found a lot of information about Twiggs Money Flow, but no specific information about the calculation. That's why I threw it back to the original poster...who may have had the formula at his fingertips. Figured this would save time for everyone involved.

j2d2 posted the calculation he found, and it remains here in this thread. The only thing removed were references to specific URL's. It is our forum policy to remove those. The information provided by j2d2, however, was gratefully received. I appreciated the help he provided in locating the information.

- Doug
Teaching Online!
Bruce_L
Posted : Wednesday, April 6, 2005 1:21:39 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Update: I'm working on writing a PCF for Twiggs Moneyflow. Hopefully I'll be able to post it within forty-eight hours.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
bustermu
Posted : Wednesday, April 6, 2005 2:49:59 PM
Registered User
Joined: 1/1/2005
Posts: 2,645
Bruce,

You are going to write a PCF for an Exponential Moving Average (EMA) with Period 41 of:

V*(2*C-TRH-TRL)/TR

for us?

That is on the order of 200 terms! That is re-indexing:

(V*(4*C-2*C1-H-L-ABS(H-C1)+ABS(L-C1))
/(H-L+ABS(H-C1)+ABS(L-C1) +0.000001))

200 times? Are you sure we are worth it? I know the indicator is not.

When the above PCF is plotted as a Custom Cumulative Indicator, it does have some merit.

Thanks,
Jim Murphy
Bruce_L
Posted : Wednesday, April 6, 2005 8:28:55 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Hmm, the mention of Wilder put it in my head that the period was 14, not 21 and I was only planning to take the formula out to 64 terms (I guess I'll have to make that 96 instead to get the same accuracy). Ouch, I guess we'll see how it turns out.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
j2d2
Posted : Thursday, April 7, 2005 1:22:55 AM

Registered User
Joined: 1/14/2005
Posts: 21
Hey Guys: I am also not all that convinced of the relative usefullness of Twiggs Money Flow as an indicator. I have been content to use the following PCF for Money Flow Index and live with any problems resulting from volume spikes. As to your policy of removing all references to places of origin for posted material whether in the form of a URL or not, I am in agreement with Jim Murphy as to it being counterproductive to what is being done here. However it is your Forum so censor whatever you please.

This is the PCF I have been using for a 10 day Money Flow Index as a custom indicator. Of course it could easily be expanded to include any number of days desired.

100-(100/(1+
(((((H+L+C)/3)*V)>(((H1+L1+C1)/3)*V1)AND(((H+L+C)/3)*V))+
((((H1+L1+C1)/3)*V1)>(((H2+L2+C2)/3)*V2)AND(((H1+L1+C1)/3)*V1))+
((((H2+L2+C2)/3)*V2)>(((H3+L3+C3)/3)*V3)AND(((H2+L2+C2)/3)*V2))+
((((H3+L3+C3)/3)*V3)>(((H4+L4+C4)/3)*V4)AND(((H3+L3+C3)/3)*V3))+
((((H4+L4+C4)/3)*V4)>(((H5+L5+C5)/3)*V5)AND(((H4+L4+C4)/3)*V4))+
((((H5+L5+C5)/3)*V5)>(((H6+L6+C6)/3)*V6)AND(((H5+L5+C5)/3)*V5))+
((((H6+L6+C6)/3)*V6)>(((H7+L7+C7)/3)*V7)AND(((H6+L6+C6)/3)*V6))+
((((H7+L7+C7)/3)*V7)>(((H8+L8+C8)/3)*V8)AND(((H7+L7+C7)/3)*V7))+
((((H8+L8+C8)/3)*V8)>(((H9+L9+C9)/3)*V9)AND(((H8+L8+C8)/3)*V8))+
((((H9+L9+C9)/3)*V9)>(((H10+L10+C10)/3)*V10)AND
(((H9+L9+C9)/3)*V9)))/(((((H+L+C) /3)*V)<(((H1+L1+C1)/3)*V1)AND
(((H1+L1+C1)/3)*V))+
((((H1+L1+C1)/3)*V1)<(((H2+L2+C2)/3)*V2)AND(((H2+L2+C2)/3)* V2))+
((((H2+L2+C2)/3)*V2)<(((H3+L3+C3)/3)*V3)AND(((H2+L2+C2)/3)*V2))+
((((H3+L3+C3)/3)*V3)<(((H4+L4+C4)/3)*V4)AND(((H3+L3+C3)/3)*V3))+
((((H4+L4+C4)/3)*V4)<(((H5+L5+C5)/3)*V5)AND(((H4+L4+C4)/3)*V4))+
((((H5+L5+C5)/3)*V5)<(((H6+L6+C6)/3)*V6)AND(((H5+L5+C5)/3)*V5))+
((((H6+L6+C6)/3)*V6)<(((H7+L7+C7)/3)*V7)AND(((H6+L6+C6)/3)*V6))+
((((H7+L7+C7)/3)*V7)<(((H8+L8+C8)/3)*V8)AND(((H7+L7+C7)/3)*V7))+
((((H8+L8+C8)/3)*V8)<(((H9+L9+C9)/3)*V9)AND(((H8+L8+C8)/3)*V8))+
((((H9+L9+C9)/3)*V9)<(((H10+L10+C10)/3)*V10)AND(((H9+L9+C9)/3)*V9)))))

bustermu
Posted : Thursday, April 7, 2005 7:52:14 AM
Registered User
Joined: 1/1/2005
Posts: 2,645
QUOTE (Bruce_L)
Hmm, the mention of Wilder put it in my head that the period was 14, not 21 and I was only planning to take the formula out to 64 terms (I guess I'll have to make that 96 instead to get the same accuracy). Ouch, I guess we'll see how it turns out.


Bruce,

A Wilder period of 21 is an EMA period of 2*21-1 = 41 and you are going to use only 96 = 2.34*41 terms? The Indicator with filtering is not very good anyway, but most would use between 3*41 = 123 and 5*41 = 205 terms.

In order to be sure we are talking about the same thing, define T to be:

T = (V*(4*C-2*C1-H-L-ABS(H-C1)+ABS(L-C1))
/(H-L+ABS(H-C1)+ABS(L-C1) +0.000001))

Then, a PCF for Twiggs Money Flow using 3*41 = 123 terms has the form:

0.047737236
*(T0+(20/21)
*(T1+(20/21)
*(T2+(20/21)
*...
*(T121+(20/21)
*(T122)))...)
/XAVGV41

For 5*41 = 205 terms, this becomes:

0.047621205
*(T0+(20/21)
*(T1+(20/21)
*(T2+(20/21)
*...
*(T203+(20/21)
*(T204)))...)
/XAVGV41

These are Jim Dean's EMA approximations which are recomended for oscillators.

Now anyone can write either one they please.

Thanks,
Jim Murphy


bustermu
Posted : Thursday, April 7, 2005 9:11:18 AM
Registered User
Joined: 1/1/2005
Posts: 2,645
j2d2,

Your PCF is probably intended to work as it did prior to late 2003. It now only gives the percent true of:

((C+H+L)*V>(C1+H1+L1)*V1)

Please construct a Custom Percent True Indicator with the above PCF and Smoothing Average 10 Simple. The result is identical to your PCF as a Custom Indicator except when

((C+H+L)*V=(C1+H1+L1)*V1)

somewhere in the interval of the 10 days being plotted.

Thanks,
Jim Murphy
diceman
Posted : Friday, December 20, 2013 2:33:07 PM
Registered User
Joined: 1/28/2005
Posts: 6,049

Bruce

 

Since ema smoothing is built into the PCF indicator box now

all thats needed is to apply 41 ema smoothing to the PCF in the bustermu 4-6 2:49 post ?

 

 

 

Thanks

Bruce_L
Posted : Friday, December 20, 2013 2:42:56 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

If you just want to plot the numerator as an indicator on the chart, then yes, you could do exactly that. The only reason to create the longer formula is to create conditions based on the formula. At least in TC2000 version 12.4, this should only be necessary if you can't create the desired condition by clicking on the Custom PCF Indicator and selecting Create Scan Condition.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.