Show the highest/lowest price of the chart
Forums › ProRealTime English forum › ProRealTime platform support › Show the highest/lowest price of the chart
- This topic has 19 replies, 6 voices, and was last updated 1 year ago by JS.
-
-
09/07/2023 at 7:57 PM #22051909/07/2023 at 8:03 PM #22052109/07/2023 at 8:11 PM #22052209/08/2023 at 8:05 AM #220537
No, any code CANNOT read what’s on your charts. It only knows OHLC, Date and Time.
No input is available.
09/08/2023 at 8:41 AM #220543Hi,
You can use the “BarIndex” to determine the high and the Low…
High Low12345678DefParam DrawOnLastBarOnly=TruexHigh=Highest[BarIndex+1](High)xLow=Lowest[BarIndex+1](Low)DrawText("High=#xHigh#",BarIndex,xHigh,SansSerif,Bold,16)Coloured("Green")DrawText("Low=#xLow#",BarIndex,xLow,SansSerif,Bold,16)Coloured("Red")Return1 user thanked author for this post.
09/08/2023 at 8:54 AM #22054609/08/2023 at 9:02 AM #22054809/08/2023 at 9:20 AM #22054909/08/2023 at 9:34 AM #22055409/08/2023 at 9:36 AM #220556You can use the “BarIndex” to determine the high and the Low…
That would not be of the chart; it would be of the internal data the chart is fed with. benkunz asks for the viewport of the chart.
As far as I know this is not possible (although I would be able to make some surrogate hence “almost right” thing).benkunz, maybe consider why you would want this. A high-low is the most normal thing to want. But not from a random chart-width (for number of bars). Please look below, at the purple lines. Have a special look at the vertical purple line. This is where the high-low calculation starts in my case. For this chart 25 bars (25 x 5 minutes in this case) ago.
What you want would be far more sophisticated. It would require the knowledge of the first bar on the chart and the last bar on the chart (while you scroll towards history and back). I don’t think that is possible.09/08/2023 at 10:03 AM #22056009/08/2023 at 11:13 AM #22056809/08/2023 at 1:18 PM #22057809/08/2023 at 1:26 PM #22057909/08/2023 at 1:48 PM #220581How does the BarIndex variable work ?
from what I read, it is supposed to count the number of candles on the chart. But when I zoom in the reduce the number of candles on my screen, the BarIndex still shows the same value. I added this to the indicator to follow the value of BarIndex :
DrawText(BarIndex,BarIndex,xLow+100,SansSerif,Bold,16)Coloured(“Red”)
-
AuthorPosts
Find exclusive trading pro-tools on