Hi,
I'm having more issues with my compiling my scripts after moving to 8.5. It looks like the API for the ATR indicator has changed. Previously I was calculating ATR for a higher time frame by doing the following.
in Create()
m_avgtruerange = new AvgTrueRange(this,2);
in StartCalc()
m_avgtruerange.length = new Lambda<Int32>(delegate { return atrlength; });
in CalcBar()
(m_avgtruerange[1]*numatrs);
Now it appears in CalcBar I need to do something like:
double atr = this.AverageTrueRange(atrLength,2);
However, it is always returning the value based on the lower timeframe.
Any help would be appreciated.
Thanks,
-Rob
Change with ATR from 8.0 to 8.5 [SOLVED]
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Change with ATR from 8.0 to 8.5 [SOLVED]
Hello Rob,
Here is how to calculate ATR on data2 in MultiCharts .Net 8.5.
AverageTrueRange interface will be extended in MultiCharts .NET 8.7 Beta 1
Here is how to calculate ATR on data2 in MultiCharts .Net 8.5.
AverageTrueRange interface will be extended in MultiCharts .NET 8.7 Beta 1
- Attachments
-
- AtrData2.pln
- (1.25 KiB) Downloaded 601 times