I'm trying to write a strat that enters when price breaks out of the Darvas (pre-installed indicator) channel. However, depending upon price movement, sometimes these lines redraw themselves at different prices upon bar close. When they don't, if(Close[0] > Darvis().Upper[0] ---> EnterLong() works fine. When they do, that snippet doesn't work because Darvas will redraw the line at Close[0]. Using Darvis().Upper[1] doesn't work either because the line usually redraws itself several bars back.
Is there anyway to get around this? Maybe some snippet in the code that tells it to redraw? If so, maybe I can use that? I've poured over the code but can't figure it out.
Thanks,
Dave
Comment