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 need some help from the programing guru's on the forum.....as I have none :sos:.
Max-td kindly contributed the attached stoch_alert.zip file that he had. This was post #21 from Trading CL (Crude Oil Futures). I was wanting to make a couple of changes to it.
I was wanting to have the background color change to green when the K% line rises above the 30 line and to stay green until the K% drops below the 70 line in which it turns red.
I did want to keep the audio alerts in!
Thanks in advance for any help!
Rod
Can you help answer these questions from other members on NexusFi?
the zip file you attached contains a bunch of indicators: 7 standard NT indicators plus Stoch_D_Color_Alert.cs and Stoch_K_Color_Alert.cs.
just to clarify... I assume you are concerned about the latter... right now the Stoch_K_Color_Alert.cs indicator paints the background in panel 2 (or wherever you designate) green when the %K goes above OBValue and orange when it goes below OSValue;
You want to have the background be green when %K rises above the OSValue and stay green until it drops down below the OBValue when it will turn red and vice versa so basically the background is always either green or red.
What if %K falls before it reaches the OBValue or turns up before it reaches the OSValue?
What if %K never reaches the OBValue... it will stay green until it crosses down through OSValue... even though that could be a lateral consolidation... is that what you want?
I think you need to specify all the various conditions to be sure of what you really want to see on the chart. Make a truth table so that your conditions are totally clear to you... then perhaps someone can do the coding for you.
Personally, I'd suggest you considerthe following:
- green when %K is above OBValue no matter whether rising or falling
- green when %K is above 50 and rising
- orange when %K is below OSValue no matter whether rising or falling
- orange when %K is below 50 and falling
- normal chart background otherwise
I would discourage you from using red as a background color unless you change rising/falling to white/black because the red line would disappear.
As far as using 70/30 instead of 80/20... that is already a setting in Stoch_K_Color_Alert.cs
Select level for coloring %K when between OSValue and OBValue depending on whether rising or falling
Select the background colors for %K conditions
Sound Alert On/Off Toggle
RodS, I have not tested the sound alerts although I added an On/Off toggle; also, this may not be exactly what you were thinking of but it is close... you need to think through the stochastic movement conditions that I mentioned in my earlier post. Enjoy!
By the way, the image shows a yellow trigger Stochastic (1,3,3) that I use for entering after a pullback.
To import this, save the zip file to your file system, then from the Control Center do: File / Utilities / Import NinjaScript; select the file you saved; select "Yes" for trusted; then when you see the "... already exists...", select "No" for replacing duplicates (they are standard NT indicators).
I am amazed at how fast some of you guys can code something. I'm so envious. I have no knowledge of your world at all and even though this isn't my thread, my hats off to all you who are computer language literate.
Stumbling along, Jeff... although my career started out programming decades ago... it ended 9 years ago as a business process redesign consultant... I swore I wouldn't get back to programming, but the possibilities sucked me back in... get by using others code and modifying it. Check out some of the links in the "Sticky" section... there are quite a few members who have no professional programming experience who are doing great work.
The Dinapoli stochastic indicator colors based on %K / %D crosses using the Dinapoli formulae rather than standard stochastic formulae... while it is possible that is what RodS wants, it isn't what he requested.
Sorry for the late response. I have been having major connection problems with my service provider today!!! Hopefully it's fixed.
First off thanks for your help in this. i haven't checked what you have coded for me but at first glimpse it looks good. I have attached a new chark that should show better what i am looking for.
I actually combined the Dinapoli Stochastic and Stoch_K_Color_Alert to form panel 2. This is pretty much what I was looking for.
The current alerts are triggered for when K% is rising and crosses from below OBValue line and when K% is falling and crosses from above OSValue line.
Where I want my signal is when K% is above the OBValue line (70 -100) and drops below 70, or user defined value, I want a short .wav signal.
And when K% is below the OSValue line (0-30) and rises above 30,or user defined, I want a long.wav signal.
I am not using these as entries. I am using these as heads up to be used with other indicators and price action for a possible entry.
Thanks also to Alan and wh for the dinapoli stochastic link!
your chart looks good... and that consolidation area is nicely colored... would you mind posting your template? I'd like to see how you combined the two... keep in mind that the Dinapoli is a %K/%D cross... nothing to do with levels as far as I could see... correct me if I'm wrong.
As far as I understand your description, my modifications should do what you want... but you haven't said what should happen under all conditions.