Announcement

Collapse
No announcement yet.

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 hukpomugqwdg, Today, 09:06 PM
                    0 responses
                    1 view
                    0 likes
                    Last Post hukpomugqwdg  
                    Started by Zeos6, Today, 08:34 PM
                    0 responses
                    4 views
                    0 likes
                    Last Post Zeos6
                    by Zeos6
                     
                    Started by Coyainvestor, Today, 07:32 PM
                    0 responses
                    3 views
                    0 likes
                    Last Post Coyainvestor  
                    Started by Hyper, Today, 06:14 PM
                    1 response
                    11 views
                    0 likes
                    Last Post NinjaTrader_EricB  
                    Started by Icus1, Today, 06:26 PM
                    0 responses
                    6 views
                    0 likes
                    Last Post Icus1
                    by Icus1
                     
                    Working...
                    X