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

avatar
Register or

Likes

avatar avatar avatar
Related users ' posts
tatankayotanka
1 day ago
T3 Velocity mix
T3 Velocity mix
1
Indicators
Nicolas At least, here it is :) Thanks for your contribution to the prorealtime code library. Every ...
Nicolas Very interesting and clever. Well done. I'm looking further for your next contribution :)
Rohan Thanks Nicolas :-)
Nicolas
1 week ago
Haos Visual
Haos Visual
2
Indicators
Dimi.A Nic, you're a blessing mate thank you so much. This is great.
Matriciel Merci pour ton travail Nicolas ! Ca m'a l'air d'être un très bon indicateur de tendance.
Souk Diaby Thanks a lot, will check this indicator asap :) have a nice trading day
Rohan Pleasure Souk, please let me know if you have ideas to improve it. I am trying to incorporat...
bolsatrilera
2 weeks ago
Twiggs Money Flow
Twiggs Money Flow
5
Indicators
century any explanation about the different moving average type ? please
Nicolas https://www.prorealcode.com/documentation/average/ 0 = SMA 1 = EMA 2 = WMA 3 = Wilder 4 = Tr...
century thanks alot . it's all i need ;)
Nicolas
2 weeks ago
Jurik MACD
Jurik MACD
0
Indicators
Nicolas
2 weeks ago
Gann HiLo activator
Gann HiLo activator
3
Indicators
maxxb salve,  vorrei sapere perchè nel suo grafico compare sul prezzo mentre a me compare a parte...
AleX Sul grafico principale accanto alla voce Prezzo (vedi in alto a sinistra proprio sotto l'are...
maxxb perfetto non lo sapevo ....  ciao grazie..     
Nicolas
3 weeks ago
Holt EMA
Holt EMA
0
Indicators
bolsatrilera
3 weeks ago
MACD MIRROR
MACD MIRROR
0
Indicators
Petrus
3 weeks ago
Nicolas
3 weeks ago
StepRSI
StepRSI
4
Indicators
rfsteve Nicolas what do you think of these modifications for 233 tick charts ?         cheers Steve....
Nicolas Thanks for this modification, I still do not have tested it, where did you get this idea to ...
rfsteve Trial and error from study of indicators call it coding mad science was trying to find an in...
bolsatrilera
3 weeks ago
Volume climate
Volume climate
0
Indicators
verdi55 Looks almost like a conventional moving average (just take lines instead of dots) . The buil...
Nicolas Just another indicator in the Library asked by a member of the community. You are right abou...
ML Thanks a lot Nicolas! I found it on the Internet and I was curious to evaluate it... Thanks ...
Nicolas
4 weeks ago
Signal to noise ratio
Signal to noise ratio
5
Indicators
Nicolas Mientras el código y los comentarios permanezcan intactos por supuesto. Un enlace a este pos...
verdi55 Thanks a lot, this is something I had been looking for for quite a while. Are there any othe...
Nicolas You can also use the choppiness index,  which is also an oscillator made to detect ranging m...
Nicolas Thanks a lot, a lot of people will find it useful! About customclose of the daily OHLC, you...
Nicolas Nope, because this one is made for version 10.3 and no variables is needed in RETURN instruc...
Ernesto1 Nicolas, thanks for the code. I can use it in a trading system, as a set-up for entry  and e...
supertiti Hola Nicolas, Can you make us the screener for the Sadukey V2 with the change of color ? t...
supertiti Voici un code de VIDYA construit par Sohocool : // MOYENNE EXPONENTIELLE ADAPTIVE VIDYA by ...
Matriciel Merci Supertiti. Je trouve que ce code est difficile à règler et n'est pas d'une grande pré...
Ernesto1 J'ai essayé avec deux différents I ,  a =  3 périodes et un 3 x 5 = 15 périodes.Ie comme si ...
SoloContado Hello Nicolas,   thanks a lot for your many contributions in this post. I have a prob...
Nicolas Because of no data available at the start of calculations. Add this at line 15 : if barindex...
Nicolas
1 month ago
supertiti bonjour à tous J'utilise cet indicateur depuis plusieurs mois, une fois règlé "K" à sa conv...

Top