Can someone help me create an indicator that finds candles which are bigger than two times the ATR(14) from high to low on the 1h timeframe? If it’s possible to highlight the candle somehow that’d also be nice. I plan to use the indicator with the alarm in ProRealtime to get notified every time such a candle occur. Thanks!
What prorealtime version are you using? I’m asking because with 10.3 you could highlight the candlesticks with a specific color or even draw symbols on chart for a clear visual information. As for version 10.2, I can only draw a dot above or below the candlestick or make a signal histogram in an indicator just below the chart.
For that last version the code should be:
c1 = range>averagetruerange[14]*2
RETURN c1
Not tested, please give feedback.
Thank you for the quick reply. I use version 10.2 through IG Markets.
I’ve now tested the indicator and it seems to work ok. But I how can I get the candlestick highlighted (e.g. blue dot above)?
To add a dot on main chart, you’ll need to add another indicator on price, the test is the same, but the code is slightly different:
c1 = range>averagetruerange[14]*2
if c1 then
signal = low-2*pipsize
else
signal = 0
endif
return signal
I added it as a separate indicator, but I got no dots on the chart. I tried to color it red, but only the indicator below the chart was colored. Also is it possible to get Prorealtime to print debug info so I can see the value of the “signal” variable?
Please add a price chart indicator on price with the wrench on the upper left side of the price chart: http://www.prorealcode.com/topic/coding-an-indicator-on-the-price-chart/
Ah I see. That made the chart look like in the attachment.
Please set lines as points, like the screenshot I put on my previous post.
You’re welcome.
Ok I got it to work now, but I also had to check “Vertical autoscaling : use price only”. Thanks!