I am trying to plot an indicator with NBarsDown.
If previous 2 consecutive bars are down and current bar is up then it should print a dot on the current bar.
I am using the following syntax:
pullBack = NBarsDown (2,true,false,false)[1];
if (Close [0] > Open [0])
{
if (pullBack == 1)
{
DrawDot ("BuySign" + CurrentBar,false, 0, Low[0],Color.Green);
}
}
This code works at one place but not at other which is strange. Can someone explain if I am missing something here?
Thanks
Vinay
Comment