Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help With Color Plot Double Stochastic

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help With Color Plot Double Stochastic

    Hello. I've been trying to write a double stochastics color indicator which will plot four different colors depending on these conditions:

    1) Blue if DS ticks up and MACD > 0
    2) Magenta if DS ticks down and MACD > 0
    3) Cyan if DS ticks up and MACD < 0
    4) Red if DS ticks down and MACD < 0

    I'm getting CS103 compile errors but I haven't been able to figure out exactly how to correct the problem. Can someone take a look at the code and give me some pointers? Thanks in advance.

    Best Regards
    Chuck
    Attached Files

    #2
    maxreturn, are you working with NT 6.5 or NT7 here? The code does not compile as the plots are not setup the right way, for one you miss the public properties of them and next the names as defined in the Initialize() do not match the ones you attempt to populate in the OnBarUpdate(). I suggest to let them be created by the indicator wizard and then modify the code as needed.

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      maxreturn, are you working with NT 6.5 or NT7 here? The code does not compile as the plots are not setup the right way, for one you miss the public properties of them and next the names as defined in the Initialize() do not match the ones you attempt to populate in the OnBarUpdate(). I suggest to let them be created by the indicator wizard and then modify the code as needed.
      Hello Bertrand. I'm working wit NT7. Yes, I'm flying a little blind here. I've put together some very simply indicators based on viewing a lot of code on the editor and what I've learned from the help files and advice of others. This is my most ambitious project yet. I must tell you this is a lot more difficult than the days that I wrote VB code for excel. I'll give it another shot.

      Comment


        #4
        Originally posted by NinjaTrader_Bertrand View Post
        maxreturn, are you working with NT 6.5 or NT7 here? The code does not compile as the plots are not setup the right way, for one you miss the public properties of them and next the names as defined in the Initialize() do not match the ones you attempt to populate in the OnBarUpdate(). I suggest to let them be created by the indicator wizard and then modify the code as needed.
        Hello Bertrand. I have to admit I'm very confused. At least I understand that something needs to be done in the public properties section but I'm not sure what. I also checked the four plot names I created in the initialize section and they do match the ones I attempted populate in the OnBarUpdate() section. Like I said before I've checked the help files, have asked questions of others and have viewed countless snippets of code but I haven't been able to find any help files or tutorials that really helps one get up and running with this programming language/construct. VBA was MUCH easier for me.

        Comment


          #5
          Max, if you're working with NT7, I suggest you check into this sample here - as what you try to accomplish has gotten a good bit easier with the introduction of the PlotColors series -



          A full working example you could use as basis is located here -

          Comment


            #6
            Originally posted by NinjaTrader_Bertrand View Post
            Max, if you're working with NT7, I suggest you check into this sample here - as what you try to accomplish has gotten a good bit easier with the introduction of the PlotColors series -



            A full working example you could use as basis is located here -

            http://www.ninjatrader.com/support/f...89&postcount=1
            Thanks Bertrand. The 2nd link was especially helpful.

            Best Regards
            Chuck

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            579 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            334 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            554 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            551 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X