Hi Nicolas,
Love the site.
I am using 10.2
I wondered if it is possible to:
a, change the colour of an indicator line if certain conditions occur?
b, I have set up that work in multiple time frames, is there any way to code one timeframe result into another timeframe?(I.E the result of a 1664 tick chart into a 39 tick chart)
Many thanks,
Bert
To change the line colour, you can defined a new variable named “mycolor” (for example).
Test if a bullish condition occurred, if true then set “mycolor” to 1 , if it’s a bearish condition set it to -1:
if bullish then
mycolor = 1
elsif bearish then
mycolor = -1
endif
Let’s say that the returned value of your indicator is called “myvalue”, then let’s write your return line like this:
RETURN myvalue coloured by mycolor
Then, just set the appropriate colours you’d like to bearish/bullish condition in the indicator’s parameters window (screenshot attached).
That’s all! Let us know if everything’s doing well 🙂
Thanks, I will give it a go.
B