Hello,
I can't figure out why my drawLineRelative commands don't leave a line on the chart in spite of the fact that they have unique tags for that bar...every one of them.
So (based on a certain criteria) I want to draw several vertical lines, in the future (from present or current bar)...here is my code:
drawLineRelative(13, high(0)+1000, 14, 0, PS_SOLID, 4, Color.blue, "vertLineTwo2"+rawtime(0)+nBarCounter);
drawLineRelative(21, high(0)+1000, 22, 0, PS_SOLID, 4, Color.blue, "vertLineTwo3"+rawtime(0)+nBarCounter);
drawLineRelative(34, high(0)+1000, 35, 0, PS_SOLID, 4, Color.blue, "vertLineTwo4"+rawtime(0)+nBarCounter);
drawLineRelative(55, high(0)+1000, 56, 0, PS_SOLID, 4, Color.blue, "vertLineTwo5"+rawtime(0)+nBarCounter);
but what is happening is that the lines are being drawn for the current bar (where my certain criteria are being met) then on the next bar they dissappear. I would like the bars to remain...for the life of this specific chart. Any ideas as to what I'm doing wrong?
The above lines of code reside in the main fuction nested within a couple of flags to ensure they are called once (for given criteria).
Any help is much appreciated,
gg
I can't figure out why my drawLineRelative commands don't leave a line on the chart in spite of the fact that they have unique tags for that bar...every one of them.
So (based on a certain criteria) I want to draw several vertical lines, in the future (from present or current bar)...here is my code:
drawLineRelative(13, high(0)+1000, 14, 0, PS_SOLID, 4, Color.blue, "vertLineTwo2"+rawtime(0)+nBarCounter);
drawLineRelative(21, high(0)+1000, 22, 0, PS_SOLID, 4, Color.blue, "vertLineTwo3"+rawtime(0)+nBarCounter);
drawLineRelative(34, high(0)+1000, 35, 0, PS_SOLID, 4, Color.blue, "vertLineTwo4"+rawtime(0)+nBarCounter);
drawLineRelative(55, high(0)+1000, 56, 0, PS_SOLID, 4, Color.blue, "vertLineTwo5"+rawtime(0)+nBarCounter);
but what is happening is that the lines are being drawn for the current bar (where my certain criteria are being met) then on the next bar they dissappear. I would like the bars to remain...for the life of this specific chart. Any ideas as to what I'm doing wrong?
The above lines of code reside in the main fuction nested within a couple of flags to ensure they are called once (for given criteria).
Any help is much appreciated,
gg
Comment