I want to plot the value of the dynamic string array on a chart. But below code plots nothing.
for(i=0; i< BarCount; i++)
VarSetText("var" + i,"value" + i);
dist = 1.5*ATR(10);
for( i = 0; i < BarCount; i++ )
PlotText( VarGetText("var"+i) , i, L[ i ]-dist[i], colorGreen );
What is wrong with this snippet?
Nevermind. Got it working.
I wish I could delete the post.
To help others who might have same issue, can you post how you fixed it?
I wrongly calculated the value of dist hence the text was plotted but out of my sight on chart. Did hit and trail and this value of dist was visible.
Such "dist" variables are not really required because PlotText does have an y-offset parameter being the last argument of that function. Its default setting is zero.
Thank you @fxshrat for pointing to right direction.
A post was merged into an existing topic: Editing of old posts and missing ‘like’