Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

HMA (Hull Moving Average) color change

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

    HMA (Hull Moving Average) color change

    Hi, does anyone know how to code the HMA, so that it changes color, say blue when it is trending up, and red when trending down?

    Thanks,

    Pablo

    #2
    Hi Pablo,

    This can be accomplished by using multiple plots. The following link is a reference sample demonstrating this concept.

    http://www.ninjatrader-support.com/v...ead.php?t=3227
    RayNinjaTrader Customer Service

    Comment


      #3
      Hma

      Hi Ray,

      That's is exactly what I am looking for, but how do I apply it to the HMA indicator?

      Sorry, not too technically savvy here.

      Thanks,

      Pablo

      Comment


        #4
        Pablo,

        This might not be the most elegant way to do this, but its very simple:

        Just download the SampleMultiColoredPlot.zip file and extract the files.

        Then edit SampleMultiColoredPlot with Tools + Edit NinjaScript.

        Then do a "Save As" to rename the file (pick a new name).

        Lastly, change all occurrences of "SMA" to "HMA", compile and you're done.

        Best regards,

        KBJ

        Comment


          #5
          Hma

          That worked great!

          Thanks KBJ

          Comment


            #6
            Hma Color Change

            This works great for HMA (cLOSE).
            What if I want to draw hma (High) and HMA(LOW) in multi color format?

            Comment


              #7
              When you load the indicator there is an option that lets you select Close, Median, etc. The option is called "Price type" and you can set those as you please. It is in the "Parameters" section of the indicator dialog window.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                Hma

                This option isa available only in the Ninja script generated standard HMA INDICATORS.
                The mulicolor HMA using samplecolorplot script does not have option to select anything other than close.
                Please advise.

                Comment


                  #9
                  Add this to the Initialize() section of the indicator.
                  Code:
                  PriceTypeSupported = true;
                  http://www.ninjatrader-support.com/H...Supported.html
                  Josh P.NinjaTrader Customer Service

                  Comment


                    #10
                    Hma

                    Please advise in between which line numbers should I insert the subject statement?

                    Comment


                      #11
                      You can put it anywhere inside the Initialize() method.

                      For instance:
                      Code:
                      protected override void Initialize()
                      {
                          CalculateOnBarClose    = false;
                          Overlay                = true;
                          PriceTypeSupported    = false;
                      }
                      It doesn't matter what order
                      Josh P.NinjaTrader Customer Service

                      Comment


                        #12
                        Hma Color Plot

                        Revised as per your advise.
                        But, the price type does not appear under the parameter as a variable for selection( open,close,high,low,etc).
                        Please advise.

                        Comment


                          #13
                          Please post up your indicator file and I will take a look.
                          Josh P.NinjaTrader Customer Service

                          Comment


                            #14
                            Hma Color Indicators

                            I have realised that I have not compiled the file after inserting the text.
                            After compilation it worked perfectly and got the price type variable under parameters.
                            Thanks a lot for your help.

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by pdennis, Today, 07:43 AM
                            1 response
                            5 views
                            0 likes
                            Last Post NinjaTrader_Jesse  
                            Started by NinjaTrader_Brandon, Today, 07:49 AM
                            0 responses
                            7 views
                            0 likes
                            Last Post NinjaTrader_Brandon  
                            Started by b16_aln, Today, 05:15 AM
                            1 response
                            7 views
                            0 likes
                            Last Post NinjaTrader_Jesse  
                            Started by Negustrader, Today, 01:01 AM
                            1 response
                            16 views
                            0 likes
                            Last Post NinjaTrader_Jesse  
                            Started by soon123, Yesterday, 10:50 PM
                            1 response
                            10 views
                            0 likes
                            Last Post NinjaTrader_ChrisL  
                            Working...
                            X