NexusFi: Find Your Edge


Home Menu

 





how do i change RSI 50 line to Zero


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one ceramictilepro with 13 posts (1 thanks)
    2. looks_two Fat Tails with 8 posts (3 thanks)
    3. looks_3 TimC with 1 posts (0 thanks)
    4. looks_4 Big Mike with 1 posts (0 thanks)
    1. trending_up 9,204 views
    2. thumb_up 4 thanks given
    3. group 4 followers
    1. forum 24 posts
    2. attach_file 7 attachments




 
Search this Thread

how do i change RSI 50 line to Zero

  #1 (permalink)
 ceramictilepro 
Roseville CA
 
Experience: Advanced
Platform: N7
Broker: Amp Futures/CQG
Trading: ES
Posts: 124 since Jun 2009
Thanks Given: 32
Thanks Received: 21

using NT7:
how do i change values in the RSI? specifically looking to change the 50 line to 0.
thank for any help with this!

 
Code
protected override void OnBarUpdate()
  {
   if (CurrentBar == 0)
   {
    down.Set(0);
    up.Set(0);
    return;
   }
   down.Set(Math.Max(Input[1] - Input[0], 0));
   up.Set(Math.Max(Input[0] - Input[1], 0));
   if ((CurrentBar + 1) < Period) 
   {
    if ((CurrentBar + 1) == (Period - 1))
     Avg.Set(50);
    return;
   }
   if ((CurrentBar + 1) == Period) 
   {
    // First averages 
    avgDown.Set(SMA(down, Period)[0]);
    avgUp.Set(SMA(up, Period)[0]);
   }  
   else 
   {
    // Rest of averages are smoothed
    avgDown.Set((avgDown[1] * (Period - 1) + down[0]) / Period);
    avgUp.Set((avgUp[1] * (Period - 1) + up[0]) / Period);
   }
   double rs   = avgUp[0] / (avgDown[0] == 0 ? 1 : avgDown[0]);
   double rsi   = 100 - (100 / (1 + rs));
   double rsiAvg = (2.0 / (1 + Smooth)) * rsi + (1 - (2.0 / (1 + Smooth))) * Avg[1];
   Avg.Set(rsiAvg);
   Value.Set(rsi);
  }

Attached Thumbnails
Click image for larger version

Name:	RSI_modified.png
Views:	236
Size:	14.4 KB
ID:	28494  
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
How to apply profiles
Traders Hideout
Cheap historycal L1 data for stocks
Stocks and ETFs
ZombieSqueeze
Platforms and Indicators
 
  #3 (permalink)
 sbgtrading 
Chicago
 
Experience: Advanced
Platform: NinjaTrader, MT4, TS
Posts: 17 since Mar 2010
Thanks Given: 3
Thanks Received: 9



ceramictilepro View Post
using NT7:
how do i change values in the RSI? specifically looking to change the 50 line to 0.
thank for any help with this!

In NT, the "Add(new Line" statement is what you want to change...and it's found in the Initialize() method.
It will look like this:

 
Code
            Add(new Line(System.Drawing.Color.DarkViolet, 30, "Lower"));
            Add(new Line(System.Drawing.Color.YellowGreen, 70, "Upper"));
Naturally, if you find one that has a "50", you'd either delete the line, or change the 50 to 0.

Reply With Quote
  #4 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


ceramictilepro View Post
using NT7:
how do i change values in the RSI? specifically looking to change the 50 line to 0.
thank for any help with this!

Does that mean that you are looking for an oscillator that oscillates around zero and has negative and positive values?

Or do you simply want to shift that line?

Reply With Quote
  #5 (permalink)
 ceramictilepro 
Roseville CA
 
Experience: Advanced
Platform: N7
Broker: Amp Futures/CQG
Trading: ES
Posts: 124 since Jun 2009
Thanks Given: 32
Thanks Received: 21


Fat Tails View Post
Does that mean that you are looking for an oscillator that oscillates around zero and has negative and positive values?

Or do you simply want to shift that line?

sorry for the confusion...

yes that is correct Fat Tails, i would like to replace the 50 line to 0 which would make positive and negative values.

hope that makes sense and thx!

Started this thread Reply With Quote
  #6 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


ceramictilepro View Post
sorry for the confusion...

yes that is correct Fat Tails, i would like to replace the 50 line to 0 which would make positive and negative values.

hope that makes sense and thx!


Here you are.

Attached Thumbnails
Click image for larger version

Name:	ES 03-11 (5 Min) 14_01_2011.jpg
Views:	316
Size:	91.8 KB
ID:	28515  
Attached Files
Elite Membership required to download: RSICeramictilePro.zip
Reply With Quote
  #7 (permalink)
 ceramictilepro 
Roseville CA
 
Experience: Advanced
Platform: N7
Broker: Amp Futures/CQG
Trading: ES
Posts: 124 since Jun 2009
Thanks Given: 32
Thanks Received: 21

hey fat tails. thank you!

could you take a look at the pic and tell me if there is a way to have the indicator you built on panel 3 match the indicator on panel 2 as far as the readings go?

it looks like yours is exactly one half of panel 2's reading.

thanks so much!

if you can figure out what the heck the dotted line is on panel one, that would be cool too. i was lucky enough to figure out that the solid line is a rsi

Attached Thumbnails
Click image for larger version

Name:	RSI_modified_fat_tails.png
Views:	256
Size:	70.0 KB
ID:	28529  
Started this thread Reply With Quote
  #8 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


ceramictilepro View Post
hey fat tails. thank you!

could you take a look at the pic and tell me if there is a way to have the indicator you built on panel 3 match the indicator on panel 2 as far as the readings go?

it looks like yours is exactly one half of panel 2's reading.

thanks so much!

if you can figure out what the heck the dotted line is on panel one, that would be cool too. i was lucky enough to figure out that the solid line is a rsi

I have changed the indicator and divided its vertical scale by 2. You need to download it again.

The dotted line looks like a moving average, can you show more of the chart?

Reply With Quote
  #9 (permalink)
 ceramictilepro 
Roseville CA
 
Experience: Advanced
Platform: N7
Broker: Amp Futures/CQG
Trading: ES
Posts: 124 since Jun 2009
Thanks Given: 32
Thanks Received: 21


Fat Tails View Post
I have changed the indicator and divided its vertical scale by 2. You need to download it again.

The dotted line looks like a moving average, can you show more of the chart?

how is this?

Attached Thumbnails
Click image for larger version

Name:	RSI_modified_fat_tails_2.png
Views:	267
Size:	56.0 KB
ID:	28530  
Started this thread Reply With Quote
  #10 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103



ceramictilepro View Post
how is this?

Just try different moving averages, start with EMA and SMA, it is nothing special.

Reply With Quote




Last Updated on March 24, 2013


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts