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 indicator colouring, please

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

    Help with indicator colouring, please

    I am trying to colour an area between two moving averages of the price.
    (Or fill the area between the 2 MAs with a pattern, say).

    So far I've tried a few ways but nothing worked.
    Any ideas of how this can be done in a easy (or less so) way?

    Thanks in advance,

    JC

    #2
    Our upcoming NT 6.5 will have a new method named DrawRegion() that will allow you to color a region such as in between two MA's. We should have public beta out shortly.
    RayNinjaTrader Customer Service

    Comment


      #3
      Good, thanks for the reply.
      Indicators, like custom indicators or others, like the Ichimoku Kinko Hyo, will benefit from that.

      Regards,

      JC

      Comment


        #4
        If you don't want to wait, Josh might have a solution in his VWAP code.

        Comment


          #5
          Thanks for leading me to it, Rollins.

          Exactly what I needed, albeit in a more convoluted way than I had wished for.

          Regards,

          JC

          Comment


            #6
            No problem JC, another place to look could be Gumphrie's RMMA, apart from using a ton of plots, the drawing code doesn't seem to be very complicated.
            Although I should mention that I haven't spend time on understanding either solution but I will do so soon because of wanting to develop an RMMA like indicator, or just modding it a bit.

            Comment


              #7
              Excellent KBJ! Thank you very much, I will only have to add a few lines and my indicator is done.

              Comment


                #8
                Yes, KBJ, right on the spot!
                Just nice.
                The problem I have is, after coping you Plot routine, because I have 5 lines in my indicator, and although I changed your code so that it uses Values[3] and Values[4], rather than Values[0] and Values[1], the code still applies the region colour to the first two DataSeries and not to the ones I specify.

                Am I missing something else?

                Thanks for the good work.

                JC

                Comment


                  #9
                  No worries, found it: I also had to change the first for loop within the Plot routine.

                  JC

                  Comment


                    #10
                    So, this is the result: http://www.ninjatrader-support.com/v...ead.php?t=3831

                    JC

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by CortexZenUSA, Today, 12:53 AM
                    0 responses
                    1 view
                    0 likes
                    Last Post CortexZenUSA  
                    Started by CortexZenUSA, Today, 12:46 AM
                    0 responses
                    1 view
                    0 likes
                    Last Post CortexZenUSA  
                    Started by usazencortex, Today, 12:43 AM
                    0 responses
                    5 views
                    0 likes
                    Last Post usazencortex  
                    Started by sidlercom80, 10-28-2023, 08:49 AM
                    168 responses
                    2,265 views
                    0 likes
                    Last Post sidlercom80  
                    Started by Barry Milan, Yesterday, 10:35 PM
                    3 responses
                    11 views
                    0 likes
                    Last Post NinjaTrader_Manfred  
                    Working...
                    X