NexusFi: Find Your Edge


Home Menu

 





Want to post an indicator I need some help on?


Discussion in NinjaTrader

Updated
    1. trending_up 2,273 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 17 posts
    2. attach_file 8 attachments




 
Search this Thread

Want to post an indicator I need some help on?

  #11 (permalink)
 fiddlinground 
Salt Lake City Utah USA
 
Experience: Advanced
Platform: Ninjatrader
Trading: ES
Frequency: Daily
Duration: Hours
Posts: 21 since May 2018
Thanks Given: 1
Thanks Received: 1

I took these two indicators and combined them as best I could. I can add the two indicators to my chart separately and achieve what I want, the image below is what I wanted it to look like. But I wanted to try to combine the two indicators into one.


StockRSI

Attached Files
Elite Membership required to download: RSIoverboughtsold.zip
Elite Membership required to download: Stochastics-With-Colors.zip
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Strategy stop orders partially filled
EasyLanguage Programming
What broker to use for trading palladium futures
Commodities
Trade idea based off three indicators.
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
22 thanks
What is Markets Chat (markets.chat) real-time trading ro …
19 thanks
ApexTraderFunding.com experience and review
14 thanks
GFIs1 1 DAX trade per day journal
12 thanks
EG Indicators
11 thanks
  #12 (permalink)
 
forrestang's Avatar
 forrestang 
Chicago IL
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
Posts: 1,329 since Jun 2010
Thanks Given: 354
Thanks Received: 1,047


fiddlinground View Post
I took these two indicators and combined them as best I could. I can add the two indicators to my chart separately and achieve what I want, the image below is what I wanted it to look like. But I wanted to try to combine the two indicators into one.

So ignoring the colors for now...

looking at that image,

It looks like you want to display the "K" line from the Stochastics.

But I am unsure which line you are wanting to display from the RSI? The RSI has two lines, the actual RSI value, and the average of that line. Which value do you want to display?

All in all, should the final indicator have just TWO lines?

Reply With Quote
  #13 (permalink)
 fiddlinground 
Salt Lake City Utah USA
 
Experience: Advanced
Platform: Ninjatrader
Trading: ES
Frequency: Daily
Duration: Hours
Posts: 21 since May 2018
Thanks Given: 1
Thanks Received: 1


I wanted to display the RSI Line and the K line, not the averages.

Started this thread Reply With Quote
  #14 (permalink)
 
forrestang's Avatar
 forrestang 
Chicago IL
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
Posts: 1,329 since Jun 2010
Thanks Given: 354
Thanks Received: 1,047


fiddlinground View Post
I wanted to display the RSI Line and the K line, not the averages.

Ok, I'll update in a bit, have some errands to run.

Reply With Quote
  #15 (permalink)
 
forrestang's Avatar
 forrestang 
Chicago IL
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
Posts: 1,329 since Jun 2010
Thanks Given: 354
Thanks Received: 1,047


fiddlinground View Post
I took these two indicators and combined them as best I could. I can add the two indicators to my chart separately and achieve what I want, the image below is what I wanted it to look like. But I wanted to try to combine the two indicators into one.


StockRSI


2021-02-02_175536



So here is the basic indicator, I think I've left some ok comments in there to explain things. The other indicator, calculated the RSI and Stochastics manually, which is fine, but this one may be a bit simpler to at least start with, as it just assigns the values you requested from the built in NT indicators.

The basic code is as follows:
  1. Ensure enough data is on chart before calculating anything
  2. Assign the stochastic and RSI value on each bar on the chart, to our BLANK plots we created in the State==State.SetDefaults block above
  3. Change the colors of the plots if they are above or below the value of 50


A lot of those variables are unused, but I just put them in there if you want to connect them.

There is a lot more that can be done, such as connecting those alerts, or other stuff, post if you have questions.

Attached Files
Elite Membership required to download: StochasticsRSIColors2.zip
Reply With Quote
Thanked by:
  #16 (permalink)
 fiddlinground 
Salt Lake City Utah USA
 
Experience: Advanced
Platform: Ninjatrader
Trading: ES
Frequency: Daily
Duration: Hours
Posts: 21 since May 2018
Thanks Given: 1
Thanks Received: 1


forrestang View Post
2021-02-02_175536

A lot of those variables are unused, but I just put them in there if you want to connect them.

There is a lot more that can be done, such as connecting those alerts, or other stuff, post if you have questions.

This is awesome! I can see it is a lot less complicated...

Does the alert work? I was thinking to make it work I would need to un-comment the Brushes?

thank you,
David

Started this thread Reply With Quote
Thanked by:
  #17 (permalink)
 
forrestang's Avatar
 forrestang 
Chicago IL
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
Posts: 1,329 since Jun 2010
Thanks Given: 354
Thanks Received: 1,047


fiddlinground View Post
This is awesome! I can see it is a lot less complicated...

Does the alert work? I was thinking to make it work I would need to un-comment the Brushes?

thank you,
David

Oh no, those brushes that are there commented out, are just horizontal lines. LIke the one with no comment produces the line at 50 that you can see. The other two are there, but I noticed you didnt have them in the image, so I just commented them out.

For the alrts... there is no code there for them in the indie I uploaded, just the variables to turn them on/off.

Reply With Quote
  #18 (permalink)
 fiddlinground 
Salt Lake City Utah USA
 
Experience: Advanced
Platform: Ninjatrader
Trading: ES
Frequency: Daily
Duration: Hours
Posts: 21 since May 2018
Thanks Given: 1
Thanks Received: 1

Yes, I just figured that out..

Started this thread Reply With Quote




Last Updated on February 2, 2021


© 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