Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

STRATEGY BUILDER PROBLEM WITH ''HMA(Convert.ToInt32(HmaPeriod))''

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

    STRATEGY BUILDER PROBLEM WITH ''HMA(Convert.ToInt32(HmaPeriod))''

    i have built the following two strategy builder conditions:
    CONDITION1
    HMA(Close, HmaPeriod)[0] > HMA(Close, HmaPeriod)[1]

    CONDITION2
    HMA(Close, HmaPeriod)[0] - (HMA(Convert.ToInt32(HmaPeriod))[1])) < HMA(Close, HmaPeriod)[1] - (HMA(Convert.ToInt32(HmaPeriod))[2]))

    CONDITION1 is ok, it is what i want.

    my problem is with ''HMA(Convert.ToInt32(HmaPeriod))'' in CONDITION2.
    both appearances of the term need to be ''HMA(Close, HmaPeriod)''

    i am having a devil of a time with it. i will continue to work on it. however
    any suggestions/advice will be much appreciated.

    #2
    Hello joemiller,

    Thanks for opening the thread.

    While you can force the Strategy Builder to display Close for the default input series by selecting another price object and switching back to Close, this syntax will not be displayed when modifying an offset of a condition.

    HMA(Convert.ToInt32(HmaPeriod))
    In your example, your offsets do not display the syntax for the Close data series, as the Strategy Builder treats this as the default price object.

    There is no functional difference to calling an indicator specifying Close and without specifying Close. Since Close is used as the default it is being used whether it is specified or not. You can assign it to a different Price Object and you will see different syntax.

    As a test, you may run the sample code attached on a chart. Please have the NinjaScript Output window open. You will see that specifying Close as a data series gives the same results as not specifying a data series at all.

    You should not need to force the Strategy Builder to show you certain syntax as it is functionally equal.

    Please let me know if you have additional questions
    Attached Files
    JimNinjaTrader Customer Service

    Comment


      #3
      thanks jim. the quick response is much appreciated.

      no fault of yours, but i don't have a clue about what you just said.
      bottom line, am i good to go the way it is?

      Comment


        #4
        Hello joemiller,

        Sure, you can translate my response to:

        Syntax for indicators specifying Close as the input series gives the same results as syntax without specifying the input series. Your condition is set up as you like already.

        Let me know if you have any additional questions.
        JimNinjaTrader Customer Service

        Comment


          #5
          how would i go about making the input series something other than default [e.g.] ''Open'' instead of ''Close''?

          or if i wanted to explicitly specify ''Close'' instead of letting it default to ''Close''?
          Last edited by joemiller; 04-25-2017, 01:29 PM.

          Comment


            #6
            Hello joemiller,

            I have created a short video demonstrating this.

            https://www.screencast.com/t/tjjeSBC8

            If you want it to explicitly say Close in the Condition Builder, you will have to select another input series and then switch back to Close. As I mentioned in my previous post, it is not possible to force the Strategy Builder to show this syntax for an offset. To reiterate, this is merely a choice of aesthetics, it does not have any functional difference.

            Please let me know if you have any questions.
            Last edited by NinjaTrader_Jim; 04-25-2017, 01:39 PM.
            JimNinjaTrader Customer Service

            Comment


              #7
              thanks jim.

              i was/have been able to easily make the changes explained in the video.

              my problem was with the offset terms ....which, per your response, i now understand that it is not possible to force the Strategy Builder to show this syntax for an offset.

              so no wonder i was having a devil of a time!

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by yeikson89, Today, 02:53 PM
              2 responses
              11 views
              0 likes
              Last Post yeikson89  
              Started by sdauteuil, Today, 01:06 PM
              1 response
              11 views
              0 likes
              Last Post NinjaTrader_Jim  
              Started by trumpy, 03-09-2017, 02:11 PM
              30 responses
              3,226 views
              0 likes
              Last Post foxthorn  
              Started by shani77, Today, 09:58 AM
              1 response
              24 views
              0 likes
              Last Post NinjaTrader_Eleanore  
              Started by cjanau, Yesterday, 11:07 AM
              1 response
              31 views
              0 likes
              Last Post NinjaTrader_ThomasC  
              Working...
              X