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

Strategy wizard questions

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

    Strategy wizard questions

    I am using the strategy wizard to develop a program. I can't seem to get two conditions to work. I want the conditions to be when the MACD's direction is "pointing up".

    When using the condition builder i used macd then selected the double equal sign, then went to misc. and selected rising.

    When I pressed ok it gave me an error about the "expressions not matching". I would to make aother condition based on the directions of the indicators at a particular moment. Please help.

    #2
    Hello rh017548,

    Welcome to our forums.

    Please see the reference sample below for using Rising and Falling conditions in the strategy wizard.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the reply ryan.
      So I read the file you provided, and this is the code I came up with:

      if (Rising(MACD(12, 26, 9) .Avg[1]) == true
      && Rising(CCI(14)[1]) == true)

      is this correct for "" The MACD and the CCI have to be rising "pointing up"?

      thanks

      Comment


        #4
        Yes, a rising condition will compare its value to it previous value.

        In your example though, you are using an index, which would be looking for a double input. You don't need the [1] in either statement.
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by GLFX005, Today, 03:23 AM
        0 responses
        1 view
        0 likes
        Last Post GLFX005
        by GLFX005
         
        Started by XXtrader, Yesterday, 11:30 PM
        2 responses
        11 views
        0 likes
        Last Post XXtrader  
        Started by Waxavi, Today, 02:10 AM
        0 responses
        6 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by TradeForge, Today, 02:09 AM
        0 responses
        11 views
        0 likes
        Last Post TradeForge  
        Started by Waxavi, Today, 02:00 AM
        0 responses
        2 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Working...
        X