Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    BertrandNinjaTrader Customer Service

    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 -

          BertrandNinjaTrader Customer Service

          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 r68cervera, Today, 05:29 AM
            0 responses
            2 views
            0 likes
            Last Post r68cervera  
            Started by geddyisodin, Today, 05:20 AM
            0 responses
            3 views
            0 likes
            Last Post geddyisodin  
            Started by JonesJoker, 04-22-2024, 12:23 PM
            6 responses
            33 views
            0 likes
            Last Post JonesJoker  
            Started by GussJ, 03-04-2020, 03:11 PM
            12 responses
            3,239 views
            0 likes
            Last Post Leafcutter  
            Started by AveryFlynn, Today, 04:57 AM
            0 responses
            6 views
            0 likes
            Last Post AveryFlynn  
            Working...
            X