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

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 DJ888, 04-16-2024, 06:09 PM
                4 responses
                11 views
                0 likes
                Last Post DJ888
                by DJ888
                 
                Started by terofs, Today, 04:18 PM
                0 responses
                5 views
                0 likes
                Last Post terofs
                by terofs
                 
                Started by nandhumca, Today, 03:41 PM
                0 responses
                5 views
                0 likes
                Last Post nandhumca  
                Started by The_Sec, Today, 03:37 PM
                0 responses
                3 views
                0 likes
                Last Post The_Sec
                by The_Sec
                 
                Started by GwFutures1988, Today, 02:48 PM
                1 response
                9 views
                0 likes
                Last Post NinjaTrader_Clayton  
                Working...
                X