Seniors please help ! I am stuck with something might be silly but can't figure out anything
I want to create an array of number like X = [31,37,42,49,55........]
and want to draw vertical line on bar where barindex()== any one of the number in X array.
please show me a way to do this. Thanks.
thanks for the reply sir.
i think its working from lastbar to fastbar. means i can subtract desired bar and plot line. but i want to plot line from start or any fixed bar say 10th bar of dataset and want to add those 4,10,12,20 and plot that resultant bar
I haven't asked you to copy-paste the code. Just showed you a very quick and simple approach.
How you calculate the Index is up to you, relative from last-bar, first-bar or a specific bar condition.
What you have to understand is that the BarIndex is not visually tied to a specific bar, it can change, for example due to QucikAFL.
Instead, you should identify a condition, say newday, and count relatively from there. Absolute vs relative counting are opposite ends.
In your first post, you just mentioned some random numbers in your Array X, so one can't figure it out for you.
@Fossil its not very efficient to call plot function once for each line. That also in a For loop, hence the idea of populating an array first.
Using the loop to populate a single array would be better as in your case.
@travick Thanks
But this much I know . Look like you haven’t read my post properly .
Just remove the plot and use Gfx…….. simple .
Anyway @fxshrat already post what @nudip want & what you are saying……….
Any specfic direction I should be looking at to update startbar to use the selected bar from which to draw the vertical lines at the intervals specified.