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)
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
Can you help answer these questions from other members on NexusFi?
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?
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:
Ensure enough data is on chart before calculating anything
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
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.
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.