• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 superkolleech, Today, 12:46 AM
                    2 responses
                    12 views
                    0 likes
                    Last Post superkolleech  
                    Started by davidwade, Today, 02:51 AM
                    0 responses
                    3 views
                    0 likes
                    Last Post davidwade  
                    Started by aviat72, 04-26-2020, 09:41 PM
                    10 responses
                    92 views
                    0 likes
                    Last Post kissandfly  
                    Started by healthooa, Today, 01:28 AM
                    0 responses
                    8 views
                    0 likes
                    Last Post healthooa  
                    Started by harjinderjit, Yesterday, 08:24 PM
                    0 responses
                    20 views
                    0 likes
                    Last Post harjinderjit  
                    Working...
                    X