Hi guys,
sorry to bother you again, but as I said in my previous topic (that was the very first one), I am an absolute beginner ….
I am currently using the Hull Moving Average indicator that I coded after the code which is available in the prorealcode library.
The code is like this
Period=20
inner = 2*weightedaverage[ round( Period/2 ) ](close)-weightedaverage[Period](close)
HMA=weightedaverage[ round( sqrt(Period) ) ]( inner )
return HMA COLOURED(255,255,255) as "Hull Moving Average"
as you can see, the line will be visible in the screen as a “white line”, regardless its own trend ..
It would he nice and helpful if the line could be colored in green, when the HMA is indicating a trend up, while colored in red when indicating a trend down.
Can you plese help me showing me how to modify the script so that the line shows up green or red according to the trend going on ?
Thanks again for your help !
Bye
Hoops … it seems I have made a mess when formatting the topic ….Sorry.
However I think you can tell the question out of the code :-)))
Ciao
Firstly, remove the coloured function in the code:
return HMA as "Hull Moving Average"
Then you only need to change the color of the HMA according to its slope (up/down), in the indicator parameters window (attached screenshot).
Ciao Nicolas,
that’s simply great !!!! Thank you so much
The more I get accustomed to ProRealTime, the more I like it and this is also because of your kind help !
Have a nice day,
Mario