Attached is an interesting indicator since it is directly in the background of the graph with its colors. It is a question of informing at a glance the crossing of two averages the VWMA and the SMA, which makes it possible to inform a weakening of the current trend before seeing it in the courses. ps: the VWMA is already published in the library
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 27 28 29 30 |
// VWMA tempValue = 0.0 tempVolume = 0.0 for step = 0 to length do tempValue = tempValue + (close[step] * volume[step]) tempVolume = tempVolume + volume[step] next vwma = tempValue / tempVolume sma = average[20](close) IF vwma > sma THEN backgroundcolor(204,255,204) else backgroundcolor(255,204,204) endif IF vwma[1]<sma[1] and vwma>sma THEN drawarrowup(barindex,low-(low/12))coloured(0,255,0) elsif vwma[1]>sma[1] and vwma<sma THEN drawarrowdown(barindex,high+(high/12)) coloured (255,0,0) endif RETURN |
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
Déjà demandé par ailleurs concernant le code de la VWMA : erreur signalée car il est demandé de définir “lenght” – merci de m’aider –