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 builder help- 30min high low break

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

    strategy builder help- 30min high low break

    I am trying to build a strategy that calculates the high and low on a 30 minute bar and then enters a trade based on a break of that prior 30 minute bar high and low. I would like for this to repeat every 30 minutes throughout the day. Can anyone give me guidance on how to create this in strategy builder?

    #2
    Hello ageeholdings,

    Welcome to the NinjaTrader forums!

    You can create 2 variables to store the 30 min High and Low. If you aren't applying your strategy to a 30 Minute chart, you can add the additional time frame in the 'Additional Data' window.

    In your actions, you can set your variables to the High and Low of the 30 minute series.

    Then, you can use these saved variables in your a condition that checks if the High or Low of your desired series is greater/less than (or equal to) your saved variables.

    Please see the attached screenshots that show an example.

    Please let us know if you have any other questions.
    Attached Files
    Gaby V.NinjaTrader Customer Service

    Comment


      #3
      would this need to be setup as set1 and set2?

      Comment


        #4
        Hello,

        Yes, these are in two condition sets so that one condition set can calculate the values and store them to a variable at a specific time, then in the second condition set you can use those saved values on other bars.

        Please let me know if you have any other questions.
        Gaby V.NinjaTrader Customer Service

        Comment


          #5
          thanks... how do i ensure only one trade per candle break takes place? currently if it breaks and profit target or stop loss is reached it immediately enters again on another break of the same candle.

          Comment


            #6
            Hello,

            You can use BarsSinceEntryExecution() to check if it has been at least 1 bar since your last entry.

            https://ninjatrader.com/support/help...yexecution.htm

            Please let us know if you have any other questions.
            Gaby V.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by balltrader, Yesterday, 04:28 PM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_Jason  
            Started by SteveReiza, 02-25-2024, 04:18 PM
            5 responses
            20 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by Kawasaki, 03-18-2021, 09:48 PM
            13 responses
            6,443 views
            0 likes
            Last Post NinjaTrader_Jason  
            Started by tonynt, 05-21-2019, 06:27 AM
            9 responses
            379 views
            1 like
            Last Post NinjaTrader_Jason  
            Started by jamesliotttrading, 02-22-2024, 12:15 PM
            4 responses
            17 views
            0 likes
            Last Post jamesliotttrading  
            Working...
            X