I have a script that adds bar delta on top and on the bottom of the current bar.
However, everytime a different chart is open (30seconds, 5 min etc.) I have to manualy go to the script and change the bar period type.
" AddVolumetric("",BarsPeriodType.Second, 30, VolumetricDeltaType.BidAsk, 1);"
Is there a way to have the bar delta calculated based on the data series / chart that the indicator is loaded with (30 sec, 5 min, PNF etc.) ?
On a differnet question: the current script runs OnBarClose basis. I'd like it to run it OnEachTick form. Problem is whenever it's active and a new negative to postive or positve to negative value is formed - the old value is still on the screen and is not erased. Ideally, I'd like to have the last known value dispalyed only. I have tried ForceRefresh() but it doesn't do it in the matter required.
Thank you
Comment