MTF WMA of RSI code help - NinjaTrader Programming | futures io social day trading
futures io futures trading


MTF WMA of RSI code help
Updated: Views / Replies:1,584 / 5
Created: by gever17 Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

MTF WMA of RSI code help

  #1 (permalink)
Elite Member
Cheyenne,Wyoming...USA
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: NQ, YM
 
Posts: 69 since Nov 2010
Thanks: 329 given, 54 received

MTF WMA of RSI code help

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

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
las vegas
 
Futures Experience: Intermediate
Platform: Sierra Chart
Broker/Data: Velocity/IB
Favorite Futures: 6E
 
Posts: 1,147 since Feb 2010
Thanks: 304 given, 836 received


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.

Reply With Quote
The following user says Thank You to vegasfoster for this post:
 
  #4 (permalink)
Elite Member
Cheyenne,Wyoming...USA
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: NQ, YM
 
Posts: 69 since Nov 2010
Thanks: 329 given, 54 received

Think I have that right

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.

Thanks again for you time!!!
gever17

Reply With Quote
 
  #5 (permalink)
Elite Member
Denver, CO
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: NinjaTrader Brokerage
Favorite Futures: ES
 
NinjaTrader's Avatar
 
Posts: 1,260 since May 2010
Thanks: 153 given, 1,890 received


gever17 View Post
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

Take a look at this, couple of ways to do this.

 
Code
 
protected override void Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
Overlay = false;
Add(PeriodType.Minute, 1);
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{ 
if (CurrentBar < 45)
return;
 
// This would execute on each OnBarUpdate() call for chart data series plus
// each added series in the indicator however, only the 1 minute series is passed in
//Plot0.Set(WMA(RSI(BarsArray[1], 14, 3), 45)[0]);
 
// OR
 
// This is executed only when OnBarUpdate() is called for the 1 minute series
if (BarsInProgress == 1)
Plot0.Set(WMA(RSI(Input, 14, 3), 45)[0]);
}

Reply With Quote
The following user says Thank You to NinjaTrader for this post:
 
  #6 (permalink)
Elite Member
Cheyenne,Wyoming...USA
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: NQ, YM
 
Posts: 69 since Nov 2010
Thanks: 329 given, 54 received

Thanks for the help!!!!

Hi NT,

Thank you very much for the help!!!!

Exactly the info I needed!

gever17

Reply With Quote

Reply



futures io > > > > > MTF WMA of RSI code help

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying a MTF version of TSSuperTrend Trader.Jon NinjaTrader Programming 3 March 7th, 2011 09:33 AM
MTF Coding Question togier NinjaTrader Programming 2 December 7th, 2010 01:35 AM
MTF Indicators diverdan EasyLanguage Programming 3 November 13th, 2010 06:23 PM
My First MTF Strategy .. need some minor error fixes Trader.Jon The Elite Circle 4 May 14th, 2010 09:58 PM
Multiple Study in WMA and Stoch wh The Elite Circle 20 October 9th, 2009 11:02 AM


All times are GMT -4. The time now is 02:40 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-14 in 0.10 seconds with 19 queries on phoenix via your IP 54.221.76.68