Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DoubleHMA

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

    DoubleHMA

    I am trying to obtain a DoubleHMA value. I have the indicator DoubleMA from this thread. http://www.ninjatrader-support2.com/...&id=85&catid=1

    I have not been able to obtain a value from this indicator to use as a slope or to otherwise generate entry/exits. Can anyone help me obtain a value or other output from this indicator. If not how can I create my own doubleHMA. I have tried but to no avail. Thanks.

    #2
    Hi JamesF, welcome to the NinjaTrader support forums!

    You would need to add the HMA as a choice to the MAV indicator that is used in the DoubleMA script. Possibly easier would be to code a new standalone indicator for the double HMA you need.

    For tutorials on how to code indicators in NinjaTrader, please check those - http://www.ninjatrader-support.com/H...verview18.html

    Of course you can also post the code you have and we take a look at it.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      I'm sorry for not being clear. My problem is not that I have not set the HMA as the selected indicator. It is that rather, when I do so, the indicator will not return a value(I have tried Dataseries, double, int, etc.). I believe it is returning a method group. To reference the DoubleHMA my code would look like this.
      if (DoubleMA(12, NinjaTrader.Indicator.MAV+MAType.HMA, 12, NinjaTrader.Indicator.MAV+MAType.HMA).RisingPlot[0] == "
      How can I get this to return values so that I can generate entry/exit commands?

      If this is not possible. How could I create a DoubleHMA indicator.

      Comment


        #4
        JamesF,

        What is this part of your code? NinjaTrader.Indicator.MAV+MAType.HMA

        We do not know what this MAV or MAType is. This is most likely custom from the original author's code and you may need to inquiry them as to how to use it.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          I'm not sure Josh. You submitted this indicator. It is the DoubleMA mulitcolored. I have not been able to get my double averages to look like it. Is it each indicator double smoothed and then smoothed by the other? If you cannot tell me how to access the output of the indicator, Can you tell me the method it uses to produce the averages?

          Comment


            #6
            The indicator was authored by Rollins (noted in the Description). All I did was help migrate the indicators over to our File Sharing section. Unfortunately I know nothing about this custom indicator from Rollins.

            All I can assist you with is standard NinjaScript. If you wanted the HMA of an HMA you would do this:
            Code:
            HMA(HMA(20), 20)[0]
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Ok, Josh, Thanks, Is there anyway to just enter a long when it turns green and a sell when red?

              Comment


                #8
                JamesF,

                You have to quantify what is green and what is red.

                If you think green means that the current value is greater than the previous value then you can do something like this:

                Code:
                if (currentValue > previousValue)
                     EnterLong();
                currentValue would be your HMA(20)[0] and previousValue would be HMA(20)[1] or whatever indicator you wanted.
                Josh P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by caacapital, Today, 10:10 AM
                1 response
                14 views
                0 likes
                Last Post NinjaTrader_ShawnB  
                Started by DiverG20, Today, 10:23 AM
                0 responses
                21 views
                0 likes
                Last Post DiverG20  
                Started by SuneSorgenfrei, Today, 09:29 AM
                0 responses
                21 views
                0 likes
                Last Post SuneSorgenfrei  
                Started by dodoei, Today, 07:24 AM
                0 responses
                14 views
                0 likes
                Last Post dodoei
                by dodoei
                 
                Started by thecashguys, Today, 06:13 AM
                0 responses
                13 views
                0 likes
                Last Post thecashguys  
                Working...
                X