The Twiggs Money Flow indicator was created by Collin Twiggs.
It is a variation of the Chaikin Money Flow Index that uses ranges and volumes in its formulation.
This code is an adaptation of the tradingview platform code: https: //www.tradingview.com/script/Jccjg8CR-Indicators-Twiggs-Money-Flow-TMF-Wilder-s-MA-WiMA/
In this version, the average is configurable, being possible to choose between simple, exponential, wilder ..
—–
El indicador Twiggs Money Flow fué creado por Collin Twiggs .
Es una variación del Chaikin Money Flow Index que utiliza rangos y volúmenes en su formulación.
Este código es una adaptación del código de la plataforma tradingview :https://www.tradingview.com/script/Jccjg8CR-Indicators-Twiggs-Money-Flow-TMF-Wilder-s-MA-WiMA/
En esta versión , la media es configurable , siendo posible elegir entre simple,exponencial ,de wilder..
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
REM TWIGGS MONEY FLOW // adaptación del código de LazyBear en tradingview para PRT // parámetro t = tipo de media en cuadro de variables lenght=21 hline=0 trh=MAX(close[1],high) trl=MIN(close[1],low) trc=trh-trl if trc=0.9999999 then trc=trc endif adv=VOLUME*((close-trl)-(trh-close))/trc wv=VOLUME+(VOLUME[1]*0) wmV=Average[lenght,t](wv) wmA=Average[lenght,t](adv) if wmV=0 then wmV=0 else tmf=wmA/wmV endif RETURN tmf as "twiggs money flow",hline as "0",0.20 as "0.20",-0.20 as "-0.20" |
Share this
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 :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
what’s the variable “t”, it’s missing :!
Not in the attached ITF file, “t” is for the moving average type. You can change it from 1 to 6.
any explanation about the different moving average type ? please
https://www.prorealcode.com/documentation/average/
0 = SMA
1 = EMA
2 = WMA
3 = Wilder
4 = Triangular
5 = End point
6 = Time series
thanks alot . it’s all i need 😉
Any ideas why this would return an empty chart? Imported the ITF and it doesn’t seem to want to calculate the average of vw.. VOLUME[1]* 0 = 0 yes?