I am trying to build an indicator that will give me the high and the low of a specific candle. I have tried using time but the highs and low would always be of the next candle so I gave up and am now using te number of the candle (perhaps not a good ideia for future testing in a strategy, i don’t know). It is now drawing 2 horizontal lines of the high and low but the lines extend until the next the next same candle in the next trading day.
is it possible to limit the horizontal lines to the end of the session, in this case 160000 in New York, like if the highs and lows would reset at the end of the session (and not be shown on the chart)?
is there a way to use the time interval of the candle (in this case 103000-104500) instead of the number (just to add more flexibility)?
also, I assume that I can then use this indicator in a strategy to use buy and sell orders (this is the next step). Please let me know otherwise.
1
2
3
4
5
6
ifIntradayBarIndex=42THEN
maxprice=high
minprice=low
ENDIF
returnmaxpriceas"maxprice",minpriceas"minprice"
PS: I am attaching the picture of how it looks in the chart
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