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

MACDUpDown Strategy

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

    MACDUpDown Strategy

    How would I set up a strategy that went long when the MACDUpDown Indicator turned green and Short when it turned red using the Strategy Wizard? Thanks.

    #2
    rmyrick, since the indicator does the coloring logic according to the slope of the MACD main value you can just directly check for this value to be rising / falling in your wizard condition interface for entries. From the misc category in the wizard you can use the Rising / Falling methods and directy them simply to use the MACD as input series, it would offer multiple plots to access but you just want the main one. On the right side of the condition you check for this being 'true' then (found under misc as well). A general introduction into the possibilities with the Condition Builder can be found here :
    BertrandNinjaTrader Customer Service

    Comment


      #3
      When I try to use Rising as the right side expression, I get the error message: Left side expression and right side "Boolean" expressions don't match. With rising I can only use == or != for the middle expression. Any suggestions? Thanks.

      Comment


        #4
        To check for a rising condition:

        On the Left side, you'll using "Rising" and the operator would be "==" and the column on the right select "True"
        MatthewNinjaTrader Product Management

        Comment


          #5
          I see that the 2nd condition looks for rising = True. How would the first condition listing MACDUpDown read.

          Comment


            #6
            You can for example combine that simply with checking the direction of your desired plot on the previous bar to determine if the turn just happend so you would need to act. I've attached a little example for you to get you hopefully going.
            Attached Files
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by cre8able, Yesterday, 01:16 PM
            3 responses
            11 views
            0 likes
            Last Post cre8able  
            Started by Harry, 05-02-2018, 01:54 PM
            10 responses
            3,203 views
            0 likes
            Last Post tharton3  
            Started by ChartTourist, Today, 08:22 AM
            0 responses
            6 views
            0 likes
            Last Post ChartTourist  
            Started by LiamTwine, Today, 08:10 AM
            0 responses
            2 views
            0 likes
            Last Post LiamTwine  
            Started by Balage0922, Today, 07:38 AM
            0 responses
            5 views
            0 likes
            Last Post Balage0922  
            Working...
            X