Hi. Is there a function or a work-a-round anyone is aware of that can tell how many bars are currently visible in a given chart, as opposed to how many bars are actually loaded? I have several computationally intense studies which require a flexible type of restriction to conserve CPU consumption. As a result they need to be periodically rescaled from within the study rather than by the regular esignal scaling. I’m now doing that by defining a global that tells these studies I am want to look at say 100 bars and the studies respond by scaling their indicator panes to the highest high and lowest low of the last 100 bars. But it’s cumbersome manually adjusting the global when I want a different temporal perspective. It’d be great if I could just expand or compress the number of bars in the chart in the standard way and have the studies somehow recognize the new number of visible bars and adjust their scale accordingly. Does anyone have an idea how this might be done? Thanks in advance.
Mike
Mike
Comment