Normalized Twiggs Money Flow

Normalized Twiggs Money Flow
The Twiggs Money Flow indicator was posted earlier but I thought to add my variation to the library as well, since the normalization process might add value. The normalization process I use is what John Bollinger describes in his book - take the average of the indicator, create two bands based on the standard deviation and express the indicator as to where it is inside the bands. The question the normalization answers is "where inside the frequency distribution is my indicator value?" You can change the parameters and the overbought/oversold criteria. Above 100 would mean that your Twiggs Money Flow is above 2 standard deviations of the average and below 0 would mean that your Twiggs Money Flow is below 2 standard deviations of the average. The center line is the average. I find that it trades divergence well. Below is my code:
//Calculate Twiggs Money Flow
TRL = min(low, close[1])
TRH = max(high, close[1])

BuySellPressure = ((close - TRL) - (TRH - close))
TrueRange = (TRH - TRL)
MF = (BuySellPressure / TrueRange) * volume

//Express volume as fraction of total volume
TotalMF = exponentialaverage[20](MF)
TotalVolume = exponentialaverage[20](Volume)
FinalMF = TotalMF / TotalVolume

//Normalize Twiggs Money Flow
//Generic normalization process
Indicator = FinalMF
AverageIndicator = average[200](Indicator)
StandardDeviation = STD[200](Indicator)
UpperBand = AverageIndicator + (2 * StandardDeviation)
LowerBand = AverageIndicator - (2 * StandardDeviation)
NormalizedIndicator  = ((Indicator - LowerBand) / (UpperBand - LowerBand)) * 100

Overbought = 100
Center = 50
Oversold = 0

Return NormalizedIndicator as "Normalized Twiggs", Overbought as "Overbought", Oversold as "Oversold", Center as "Center"
Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

New! PRC is also now on YouTube, subscribe to our channel for exclusive content and tutorials

Register or


avatar avatar avatar
Related users ' posts
13 hours ago
DeMarker Indicator
DeMarker Indicator
albertocampagna Sei grande Nicolas :-)
SAcht Dear Nicolas, Great work, thank you very much!I would love to use the indicator in ProScree...
SAcht btw: The above-posted ProScreener is supposed to show stocks for which the center line has i...
Andy 22 DRAWSEGMENT(BarBullNew, highest[(BarBullnew-BarBullOld)](close), BarBullNew+10, highest[(...
gabri Ok, I believe your version of PRT doesn't support the command drawsegment. You should check ...
Andy ok thanks!
albertocampagna Salve, bellissimo indicatore, ma purtroppo non riesco a farlo funzionare
Nicolas Another fine piece of code gabri! Excellent work again. Thanks a lot for your precious contr...
gabri Thanks Nicolas!!
bolsatrilera bravo, molto intelligente.
1 week ago
Loop Hi All! Would it be possible to have the same indicator with the MACD calculated with the DE...
Nicolas Why not, but do you think it would make such a noticeable difference?
Loop Good question Nicolas! That's why I was curious to check it! MACD based on DEMA is usually m...
2 weeks ago
2 weeks ago
AleX ho provato anche per febbraio e la strategia ha il 75% di risultati positivi e quelli negati...
gabri  Codificare il CSI e' possibile. Io uso una sua modifica (siccome lavoro solo sull'azionario...
gabri Dopo Pasqua codifichero' anche un altra strategia che Wilder suggerisce di usare quando il m...
diegofe_2000 gracias , muy bueno
iramirez55 Bonjour, excusez mon français. Est-il possible de mettre les résultats des stratégies dans E...
Nicolas Please ask general purposes questions on forums. Thanks. 
Sofitech What is the timeframe(s) you woul suggest to use for this method ?On Forex and/or on stock m...
Doctrading Hello, Higher timeframes are better. I suggest D1 or H4.Best regards,
Nicolas It's a platform related problem currently being investigated. 
JohnVS okay thanks, Hopefully u had a chance to check the other question too? Since the stock hav...
Nicolas I'm pretty sure you can do it yourself John! Please don't be shy :)
supertiti amplitude 1.2.3  = ( 2-6-30 ) or (1-1-27) ?
LUCASSEN Hallo Supertiti Macd amplitude=1-1-27    and    prc halftrend triple in Heikin Ashi  grafie...
supertiti Thanks you so much Lucassen
3 weeks ago
Nicolas Ligne 44 à modifier par r=0 Ligne 55 à modifier par g = 0 J'ai simplement codé en dur les ...
winkx Bonjour Nicolas, Je vous remercie L'indicateur est très intéressant Après c'est une quest...
Nicolas Les goûts et les couleurs...
owes29 Do a Youtube search for "Revolutionary Indicators Reveal Tops & Bottoms" it explains a v...
owes29 Hi is there anyway to develop this for the pro scanner on daily or hourly scans. so it woul...
Nicolas Of course, please add a query in the proscreener forum.
Elsborgtrading I have moved the development topic
Elsborgtrading Sometime along the way since I coded the Indicator something has change in PRT- at least I t...
Elsborgtrading Btw last code was a 10 min TF ver.