can an indicator detect if the latest bar is visible?

Created at 25 May 2020, 14:47
YC

ycomp

Joined 16.10.2013

can an indicator detect if the latest bar is visible?
25 May 2020, 14:47


would it be technically possible (without great difficulty - I mean just without anything too convolulted) to create  an indicator that detects if the chart's latest bar is visible?

I have a problem when I look at the chart that sometimes I don't realize it is scrolled back.


@ycomp
Replies

firemyst
28 May 2020, 07:32

RE:

ycomp said:

would it be technically possible (without great difficulty - I mean just without anything too convolulted) to create  an indicator that detects if the chart's latest bar is visible?

I have a problem when I look at the chart that sometimes I don't realize it is scrolled back.

Yes.

Read this:

https://ctrader.com/forum/announcements/13492

Bars on the chart

  • Chart.BarsTotal - gets the number of the bars on the chart.
  • Chart.FirstVisibleBarIndex - gets the bar index of the first visible bar on the chart.
  • Chart.LastVisibleBarIndex - get the bar index of the last visible bar on the chart.
  • Chart.MaxVisibleBars - gets the maximum number of bars that can be shown on the chart with the current size and zoom level.

@firemyst