mainTrendLength = Bars.GetBar(DateTime.Now) - Bars.GetBar(mainTrendTime) + 1;
This works fine for a daily chart (I have not tried any other granularity yet) but it fails for a Market Analyzer. In the MA:
- DateTime.Now works as expected
- Bars.GetBar(DateTime.Now) fails with no message in the output window
My questions:
- Is there a better way to do what I need to do?
- How can I make the function work in a Market Analyzer?
Thanks,
EV
Comment