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: When the current candle closes higher than the highs of the previous

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

    Strategy Wizard: When the current candle closes higher than the highs of the previous

    Thanks Paul. Worked great.

    Off topic but one last question for you. I have tried this but am confused. How would I build the following as a condition in the Strategy Wizard:

    This is for intra-day. When the current candle closes higher than the highs of the previous candles.



    Again, appreciate the support.


    Bob

    #2
    Hello Ram011558,

    Thanks for your reply.

    Yes, this is off topic, I will answer here but if you have further questions, please feel free to post in the NinjaTrader strategy development forum.

    You would compare the High[0] to MAX(Highs, period)[1] where period would be how far back you want to test for. You would need to use [1] (previous bar) on the MAX() method because if you use [0] then it will never be true as you would be comparing the current high to itself.

    I've attached a screenshot to show the selections to obtain this condition, using 14 bars as the period.
    Attached Files
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thank you Paul. I know you asked me to post this in another area if I had more questions but rather than starting a new thread and going through this again, I want to clarify and this should wrap it up.

      I have been going crazy trying to figure this out. I have tried various methods but when I Compile the strategy, I get error messages. I will be very specific. Here's what I need as a condition in the wizard:

      Identify when the current bar closes higher than the maximum price since the current open. So closing of current bar is higher than the high of the previous bars since the open. I don't want it to look back a given number of bars as I need this to occur anytime during the day.

      If there are questions, please let me know.


      Again, really appreciate your help.

      Bob

      Comment


        #4
        Hello Bob,

        Thanks for your post.

        We've moved your post to a more appropriate area. For your understanding when you add to another thread, all of the participants in that thread are notified when a new post appears and when the post is off topic it can be distracting.

        From your description, it sounds like it would be better if you compared the High[0] to the indicator CurrentDayOHL().CurrentHigh[1]. I've created that condition in the strategy wizard and added the Draw dot to the action side and then added to a chart to show where the strategy detected the condition. Please see the attached.
        Attached Files
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by traderqz, Today, 09:44 AM
        0 responses
        1 view
        0 likes
        Last Post traderqz  
        Started by rocketman7, Today, 09:41 AM
        0 responses
        2 views
        0 likes
        Last Post rocketman7  
        Started by rocketman7, Today, 02:12 AM
        7 responses
        31 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by guillembm, Yesterday, 11:25 AM
        3 responses
        16 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by junkone, 04-21-2024, 07:17 AM
        10 responses
        149 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Working...
        X