I am stumped and hoping someone can help with this one.
I am trying to code an indy with a WMA using RSI as the Data Input Series.
To be more specific I am trying to get the 45 Weighted Moving Average of the RSI period 14 and smooth 3 in a selectable time frame setup.
This is the code that I think is the closest but still get errors on compile.
_RSIWMAfilter = (WMA(RSI(BarsArray,rSIperiod,rSIsmooth),WMAperiod));
_RSIWMAfilter = (WMA(RSI(Closes,rSIperiod,rSIsmooth),WMAperiod));
If anyone could show how the code should be written I would greatly appreciate it!!!
I didn't do it a lot but I believe in the initialize() section you have to specify the time period using Add(Instrument, PeriodType.Minute, PeriodLength), e.g. Add(Instrument.FullName, PeriodType.Minute, 5) for the default intrument and a 5-minute time frame and then in your formula use Closes, where 1 represents the added data series.
The following user says Thank You to vegasfoster for this post:
Thanks for your input and taking your time to respond.
I am pretty sure I have that setup correct in Initialize as you have suggested. I am actually accessing the 5th Time Frame. As follows:
I havent had any problems accessing any of the TFs for other parts of the indy.
I just cant seem to figure out how to write the code to get the WMA of RSI using a data series other than the chart it is place on.