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

    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.

        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, 02:29 PM.

          Comment


            #6
            Hello joemiller,

            I have created a short video demonstrating this.

            World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.


            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, 02:39 PM.

            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 NullPointStrategies, Today, 05:17 AM
              0 responses
              43 views
              0 likes
              Last Post NullPointStrategies  
              Started by argusthome, 03-08-2026, 10:06 AM
              0 responses
              124 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              65 views
              0 likes
              Last Post NabilKhattabi  
              Started by Deep42, 03-06-2026, 12:28 AM
              0 responses
              42 views
              0 likes
              Last Post Deep42
              by Deep42
               
              Started by TheRealMorford, 03-05-2026, 06:15 PM
              0 responses
              46 views
              0 likes
              Last Post TheRealMorford  
              Working...
              X