Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Hi all!!!!!!
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[5],rSIperiod,rSIsmooth),WMAperiod));
or
_RSIWMAfilter = (WMA(RSI(Closes[5],rSIperiod,rSIsmooth),WMAperiod));
If anyone could show how the code should be written I would greatly appreciate it!!!
Thanks for taking the time to look!
gever17
Can you help answer these questions from other members on NexusFi?
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[1][0], where 1 represents the added data series.
Hi VegasFoster,
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:
Add(PeriodType.Range, firstTF);
Add(PeriodType.Range, secondTF);
Add(PeriodType.Range, thirdTF);
Add(PeriodType.Range, mAXRangeChart);
Add(PeriodType.Range, rSIRangeChart);
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.