I have not used NT8 for a while and these questions may be too simple, but for some reason I do not get to make it work although I am pretty sure I was able to do it years ago (but I can't find those codes).
Basically what I need to do is to work with indicators (inside a strategy) which work in different timeframes in order to use their calculated values as well as to plot them in the chart.
I think it's very similar to this issue:
However, I can't get it and I do not understand why.
Following that basic example, and using a 1min chart in which I load the strategy, I am declaring the indicator this way:
private SMA sma5MIN;
in the "State == State.Configure" code, I am adding:
AddDataSeries(BarsPeriodType.Minute, 5); sma5MIN = SMA(BarsArray[1], 14); sma5MIN.Panel = 4; AddChartIndicator(sma5MIN);
What am I missing?
2) Asuming the solution to previous issue is probably simple (hopefully ), I'm seeing I have strategies in which I get the values of indicators by declaring them every time I need to do it, i.e.:
double someValue = SMA(...);
double someValue = sma5MIN.Values[i];
Thanks in adavance.
Comment