Need some help with developing an Indicator.
Having trouble that indicator plots only last conditions and once, and doesn't plot any lines (i'm using vertical lines with two colors) on history (except two last lines).
I want to see all lines that I have. In Output window I see that values are calulating good and returns the right value, but on chart I see only two vertical lines.
Here is the code I'm using for plot lines:
if(mcSum > 2) { Print("Can take long trades"); DrawVerticalLine("Long Enable", 0, upColor); } if(mcSum < -2) { Print("Can take short trades"); DrawVerticalLine("Short Enable", 0, downColor); }
What I need to do to get all this Lines?
In Output window I see all Prints "Can take long/short trades".
Thanks!
update: i found that lines are refreshing and plots me only last values. I'm using this code in OnBarUpdate method.
But I want next thing: as my condition applies - plot vertical line and don't remove it or refresh. Want to stay that line on chart.
Comment