Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help with creating a condition

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

    Help with creating a condition

    Hi,

    Please look at my question below the images.
    2 attachments and 2 questions.
    Attached Files

    #2
    Hello Allen,

    NinjaTrader generally does not provide custom coding services but we are happy to assist in the right direction. Your examples are relatively clear and simple so hopefully these snippets will be useful for you.

    Code:
    if (Close[0] > 80 && Close[0] > Close[1]) //Evaluates whether the current close is greater than 80 and if the current close is greater than the prior close.
    See here for help making price comparisons in the condition builder.
    See here for help making indicator to value comparisons in the condition builder.


    You won't be able to reference the candlestick pattern indicator directly in your strategy, just due to the way the indicator is written. What you can do is edit the indicator to view the conditions for BearishEngulfing. Click Tools > Edit NinjaScript > Indicator > Open CandleStick pattern. You'll find the following lines for BearishEngulfing.
    Code:
     
     
    if (Close[1] > Open[1] && Close[0] < Open[0] && Open[0] > Close[1] && Close[0] < Open[1] && 
    Stochastics(7, 14, 3).D[0] >= 80
    )
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thank you for your respond.
      I just wonder if I can build this condition using strategy wizard ?
      Please see the attachment.
      I tried to make the condition work but it didn't come out good,
      I wanted that only down arrows with number 7, appear above the overbought area ( above the top lime color line).
      Please help needed.
      Attached Files
      Last edited by Allen; 07-28-2010, 11:14 PM.

      Comment


        #4
        Please see these help guide articles for assistance with this area of the condition builder:

        See here for help making price comparisons in the condition builder.
        See here for help making indicator to value comparisons in the condition builder.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Please see the attachment.

          Thank you.
          Attached Files

          Comment


            #6
            Hi Allen,

            Unfortunately I can't tell why the results are not working as you expect. It may be helpful to add stochastics in its own pane and use the data window to confirm values. Overlayed as it is makes it difficult to evalute.

            You may also need to add Print() statements to verify values. See here for additional debugging tips.
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            647 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            369 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            108 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            572 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            573 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X