how do i change RSI 50 line to Zero - NinjaTrader | futures io social day trading
futures io futures trading


how do i change RSI 50 line to Zero
Updated: Views / Replies:4,872 / 24
Created: by ceramictilepro Attachments:6

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
 6  
 
Thread Tools Search this Thread
 

how do i change RSI 50 line to Zero

  #11 (permalink)
Elite Member
Roseville CA
 
Futures Experience: Advanced
Platform: N7
Broker/Data: Amp Futures/CQG
Favorite Futures: ES
 
Posts: 124 since Jun 2009
Thanks: 32 given, 19 received

thanks again!


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

if you ever have any tile or grout related q's, let me know and i would be happy to help you out!

thanks again. i would've never been able to figure out the change in code!

Reply With Quote
 
  #12 (permalink)
Elite Member
Roseville CA
 
Futures Experience: Advanced
Platform: N7
Broker/Data: Amp Futures/CQG
Favorite Futures: ES
 
Posts: 124 since Jun 2009
Thanks: 32 given, 19 received

changing colors question


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


ok, i hacked in some code (6.5 VERSION) and was surprised that ninja didn't blow up on me

i was trying to have the color change when above the 10 line.

then change to a different color when below the -10 line.

the third color would be everything else.

any ideas?
thx!

Attached Files
Register to download File Type: zip rsi_colorchange.zip (3.9 KB, 23 views)

Last edited by ceramictilepro; January 18th, 2011 at 03:01 AM. Reason: confirmint this indicator was for 6.5
Reply With Quote
 
  #13 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,602 received
Forum Reputation: Legendary

Answer
This post has been selected as an answer to the original posters question Answer



ceramictilepro View Post
ok, i hacked in some code and was surprised that ninja didn't blow up on me

i was trying to have the color change when above the 10 line.

then change to a different color when below the -10 line.

the third color would be everything else.

any ideas?
thx!

You have now defined 5 plots. So the original plot will plot alongside with the new plots.

NinjaTrader 7 offers a more elegant way to color a PlotSeries. Just have one plot defined and then adapt the color, for example the code

 
Code
 
if (RSI(period, smooth)[0] < -10)
PlotColors[1][0] = Color.Red
will color the current value of the plot number 1 red. This is recommended as it also colors the line between the current value at [0] and the prior value at [1].

Reply With Quote
 
  #14 (permalink)
Elite Member
Roseville CA
 
Futures Experience: Advanced
Platform: N7
Broker/Data: Amp Futures/CQG
Favorite Futures: ES
 
Posts: 124 since Jun 2009
Thanks: 32 given, 19 received

color changes for v6.5


Fat Tails View Post
You have now defined 5 plots. So the original plot will plot alongside with the new plots.

NinjaTrader 7 offers a more elegant way to color a PlotSeries. Just have one plot defined and then adapt the color, for example the code

 
Code
 
if (RSI(period, smooth)[0] < -10)
PlotColors[1][0] = Color.Red
will color the current value of the plot number 1 red. This is recommended as it also colors the line between the current value at [0] and the prior value at [1].

ok thx Fat Tails.

the indicator i hacked up was for 6.5 (should've mentioned that in the prior post and will edit it to show) so it sounds like it will take more work to make it work for 6.5.


i will use your idea for 7.

Reply With Quote
The following user says Thank You to ceramictilepro for this post:
 
  #15 (permalink)
Elite Member
Roseville CA
 
Futures Experience: Advanced
Platform: N7
Broker/Data: Amp Futures/CQG
Favorite Futures: ES
 
Posts: 124 since Jun 2009
Thanks: 32 given, 19 received

trying to draw dots

ok, so here is some code that i know won't work but hopefully it will explain what i'm looking for: this is for 6.5 but if N7 is better for this, i wouldn't complain

basically looking for a "cross back below the 10 line" and "cross back above the -10 line"


also, can anyone tell me if using the "CurrentBar.ToString" uses alot of CPU which may bog the chart down?

thx!

 
Code
double rsi   = avgDown[0] == 0 ? 100 : 100 - 100 / (1 + avgUp[0] / avgDown[0]);
   rsi = rsi - 50;
   double rsiAvg = (2.0 / (1 + Smooth)) * rsi + (1 - (2.0 / (1 + Smooth))) * Avg[1];
   Avg.Set(rsiAvg);
   Value.Set(rsi);
 
if (rsi[1] > 10 && rsi[0] < 9.95)
   {
    DrawDot(CurrentBar.ToString() + "high", 0, High[0] + 4 * TickSize, Color.Red);
   }
 
 
if (rsi[1] < -10 && rsi[0] > -9.95)
   {
    DrawDot(CurrentBar.ToString() + "low", 0, Low[0]  -4 * TickSize, Color.Blue);
   }

Reply With Quote
 
  #16 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,602 received
Forum Reputation: Legendary


ceramictilepro View Post
ok, so here is some code that i know won't work but hopefully it will explain what i'm looking for: this is for 6.5 but if N7 is better for this, i wouldn't complain

basically looking for a "cross back below the 10 line" and "cross back above the -10 line"


also, can anyone tell me if using the "CurrentBar.ToString" uses alot of CPU which may bog the chart down?

thx!

 
Code
double rsi   = avgDown[0] == 0 ? 100 : 100 - 100 / (1 + avgUp[0] / avgDown[0]);
   rsi = rsi - 50;
   double rsiAvg = (2.0 / (1 + Smooth)) * rsi + (1 - (2.0 / (1 + Smooth))) * Avg[1];
   Avg.Set(rsiAvg);
   Value.Set(rsi);
 
if (rsi[1] > 10 && rsi[0] < 9.95)
   {
    DrawDot(CurrentBar.ToString() + "high", 0, High[0] + 4 * TickSize, Color.Red);
   }
 
 
if (rsi[1] < -10 && rsi[0] > -9.95)
   {
    DrawDot(CurrentBar.ToString() + "low", 0, Low[0]  -4 * TickSize, Color.Blue);
   }

Just from looking at the code: rsi is a variable of type double, so rsi[1] does not exist. If it is indexed, it is supposed to be a DataSeries. In this case you may try

 
Code
if (Value[1] > 10 && rsi < 9.95)
Not tested.

If you want to display all the dots, you need to identify each of them via a different string, so your approach is appropriate. That will indeed create a huge CPU load, which is a problem. Possible solution: only display the dots for a limited lookback period, for example

 
Code
if (Time[0] > DateTime.Now.AddDays(-3) && Value[1] > 10 && rsi < 9.95)
Again, not tested.

Reply With Quote
 
  #17 (permalink)
 Vendor: www.integrity-traders.com 
East Rochester, NY
 
Futures Experience: Intermediate
Platform: NT
 
eDanny's Avatar
 
Posts: 327 since Jul 2009
Thanks: 17 given, 419 received

Or use a dot plot instead of draw objects.

Dan

Reply With Quote
 
  #18 (permalink)
Elite Member
Roseville CA
 
Futures Experience: Advanced
Platform: N7
Broker/Data: Amp Futures/CQG
Favorite Futures: ES
 
Posts: 124 since Jun 2009
Thanks: 32 given, 19 received

drawing dots v6.5

ok,

here is some code that compiles fine. can you tell me if this is going to use alot of CPU?

thx! v6.5

 
Code
Avg.Set(rsiAvg);
   Value.Set(rsi);
 
   // ABOVE 10 LINE CONDITIONS
 
   if (Time[0] > DateTime.Now.AddDays(-2) && Value [1] > 10 && rsi < tenLine)
   {
    DrawDot(CurrentBar.ToString() + "high", 0, High[0] + 14 * TickSize, Color.Blue);
 
   }
   // ABOVE 0 LINE CONDITIONS
   if (Time[0] > DateTime.Now.AddDays(-2) && Value [1] > 0 && rsi < zeroLine)
   {
    DrawDot(CurrentBar.ToString() + "high", 0, High[0] + 12 * TickSize, Color.Black);
   }
 
   // BELOW -10 LINE CONDITIONS
   if (Time[0] > DateTime.Now.AddDays(-2) && Value [1] < -10 && rsi > - tenLine)
   {
    DrawDot(CurrentBar.ToString() + "high", 0, Low[0] - 14 * TickSize, Color.Blue);
   }
 
   // BELOW 0 LINE CONDITIONS
      if (Time[0] > DateTime.Now.AddDays(-2) && Value [1] < 0 && rsi > - zeroLine)
   {
    DrawDot(CurrentBar.ToString() + "high", 0, Low[0] - 12 * TickSize, Color.Black);
   }
 
Print(rsi);

Reply With Quote
 
  #19 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,602 received
Forum Reputation: Legendary


ceramictilepro View Post
ok,

here is some code that compiles fine. can you tell me if this is going to use alot of CPU?

thx! v[B]6.5

This code should not use a lot of CPU. But if you want to know, you can download Process Explorer from the Microsoft website and watch it running.

On Monday morning, you won't probably see any dots for Friday, so you may even increase your lookback period from 2 to 3 days.

Reply With Quote
 
  #20 (permalink)
Elite Member
Roseville CA
 
Futures Experience: Advanced
Platform: N7
Broker/Data: Amp Futures/CQG
Favorite Futures: ES
 
Posts: 124 since Jun 2009
Thanks: 32 given, 19 received

thx again!



Fat Tails View Post
This code should not use a lot of CPU. But if you want to know, you can download Process Explorer from the Microsoft website and watch it running.

On Monday morning, you won't probably see any dots for Friday, so you may even increase your lookback period from 2 to 3 days.


i didn't see a quick link or check box to say thanks so i'm writing it here.

THANKS Fat Tails!

this stuff is addicting!

Reply With Quote

Reply



futures io > > > > how do i change RSI 50 line to Zero

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
Color change in an indicator line macro NinjaTrader Programming 9 March 16th, 2012 06:12 PM
Coin flips to reach 50-50 distribution aligator Traders Hideout 7 April 5th, 2011 05:08 PM
RSI Edge? gever17 NinjaTrader 5 March 23rd, 2011 06:48 PM
RSI Strategy Dienewk NinjaTrader Programming 6 December 9th, 2010 10:12 AM
ADX color line change in DM Indicator Joshua 1 vs 8 NinjaTrader Programming 30 October 31st, 2010 04:10 PM


All times are GMT -4. The time now is 05:37 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-16 in 0.13 seconds with 40 queries on phoenix via your IP 54.160.245.121