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
Ernesto1 Good Job !!! Ciccio
ALE great! :-)
14 hours ago
diegofe_2000  Entro a operar una demo con este indicador,  les voy contando
diegofe_2000 vamos a probarlo
Nicolas Voici le lien pour la version avec Volumes négatifs si le dernier ZigZag était un "peak". h...
Nicolas Here is the link for the new version with cumulative Volumes as negative values when the las...
Draper Merci Nicolas pour cet indicateur et pour les précédents aussi!  Je n'arrive pas à comprendr...
gregus bonjour a tous quelqu un pourait il recodé en prt il sagit  du dynamique zone ma, je n arri...
Nicolas Merci de faire une requête spécifique sur le forum. 
leo1962 Ciao Nicolas, nel codice c'è un errore di sintassi, allego screenshot. Non sono pratico di ...
Nicolas Este indicador sólo funcionará para Prorealtime v10.3 y superior.
leo1962 gracias ;)
larouedegann blue = 50 green = 20 red = 10 than you
Elsborgtrading By adding the inside bar breakout failure candle, which is the next bar after the inside bar...
3 weeks ago
saulyte1 doesn't work on IG PRT 10.3 get the indicator window when imported but empty and no projecte...
Nicolas Please add the indicator on price. Use the wrench in the upper left corner of the price char...
saulyte1 thank you,  seems to be working now.
Wing Yes, investigate as much as you want. For more insight, you can view the linet1, linet2 etc....
CKW Hi Wing, Thanks for your sharing. I am still trying to breakdown & understand your code...
Wing Hello CKW. No, the parameter, 7 in this case, is used when calling the RSI indicator to ide...
supertiti Buenas tardes Rafa con esa linea no me sale bien las flechas : DRAWARROWUP (barindex, AvHig...
supertiti asi me gusta ! DRAWARROWUP (barindex, AvHigh-(range+2) ) COLOURED (127,255,0)  
supertiti asi mejor con +1 DRAWARROWUP (barindex, AvHigh-(range+1) ) COLOURED (127,255,0)
Sofitech Ce code n'est valable que sur la V10.3 ? sur le 10.2 il y a une erreur de syntaxe dans le fi...
Nicolas Oui en effet, c'est un indicateur "10.3" à cause uniquement de la mise en forme des courbes ...
Nicolas You need to have enough bars loaded on your chart for the indicator to compute completely th...
verdi55 Working with separately calculated supertrend indicators in backtests is usually somewhat pr...
Nicolas Very interesting Verdi. Would be a great addition to the library, your own modified version ...