Using :
As I understand it the returned value should update with every new bar but it doesn't. It is accurate when loaded but returns 0 for every new bar keeping the -1 etc. on the same bar as when the study was loaded. All new drawn bars after the study is loaded return 0.
The attached image has a red arrow where the study was loaded and the returned value is -1 instead of the actual bar index of -4. All bars after the bar under the arrow return 0.
Is this how getCurrentBarIndex() should work?
Wayne
PHP Code:
function preMain(){
setPriceStudy(true);
setCursorLabelName("getCurrentBarIndex",0);
}
function main(){
return getCurrentBarIndex()+"";
}
The attached image has a red arrow where the study was loaded and the returned value is -1 instead of the actual bar index of -4. All bars after the bar under the arrow return 0.
Is this how getCurrentBarIndex() should work?
Wayne
Comment