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 charlesugo_1, 05-26-2026, 05:03 PM
            0 responses
            59 views
            0 likes
            Last Post charlesugo_1  
            Started by DannyP96, 05-18-2026, 02:38 PM
            1 response
            143 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 05-11-2026, 05:56 AM
            0 responses
            161 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, 05-10-2026, 08:12 PM
            0 responses
            97 views
            0 likes
            Last Post CarlTrading  
            Started by Hwop38, 05-04-2026, 07:02 PM
            0 responses
            276 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Working...
            X