If the color is green, trend is up, basically it means that the current value of the indicator is higher than the previous period one. So for a simple moving average, it would mean:
1
2
3
4
5
//define your indicator
indi=average[20]
//trend is bullish? (green) result = 1 if true
result=indi>indi[1]
and opposite rule for a bearish trend. Hope it helps, sorry for delay answering your question.
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue