Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Builder for Hourly Candles with Conditions

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

    Strategy Builder for Hourly Candles with Conditions

    Hi, I am trying to build my strategy using Ninja Strategy Builder for backtesting. I want to use only the Strategy Builder built-in Conditions and Actions and not any coding in C#. I watched Ninja Trader Videos and already added some logic for my strategy from Conditions, but I am missing most of it to make it work.

    I greatly appreciate it if your team could assist with this strategy logic and how to build it.

    In summary, the strategy works based on hourly candles or the 1 hr period low and high.

    1. Strategy finds the Highest High and the Lowest Low after each 1-hour candle or period is closed. (Previous Hour High and Low)
    2. Upon opening the next 1-hour period, or the next 1 hr candle, meaning at the “Current” 1-hour candle open:
    3. Entries:
    Strategy Takes Long if the price “crosses below” the Lowest Low of the previous 1-hour candle, but with 40 ticks (10 points NQ) offset, meaning Takes Long with a limit order 40 ticks below the previous 1-hour candle Lowest Low.

    Strategy can Take Long only within the first 20 minutes after the current hourly candle opens (within the first 20 minutes after the new 1-hour period starts).
    For example, at 9:00 am 1 hr candle is open, it can take long only from 9:00 am to 9:20 am if the price crosses below the 8:00 AM- 1-hour candle Lowest Low).

    Or

    Short entries:
    Strategy Takes Short if the price “crosses above” the Highest High of the previous 1-hour candle, but with 40 ticks (10 points NQ) offset, meaning Takes Short with a limit order 40 ticks above the previous 1-hour candle's Highest High.


    Other conditions need to be added but this would be the base of the logic I'm trying to make in the Strategy builder. Cheers!

    #2
    Hello Salehmhr,

    What part specifically are you having a problem with? While I cannot create this whole strategy for you we can go over the individual part which you are having some difficulty with. If you mean that all of what described has not been attempted you would need to work through each step to complete that task. For example finding the highest high and lowest low you can use the indicators MAX and MIN to find those values in a condition. To do something at the open you will need to run the strategy in realtime while using OnEachTick or OnPriceChange, backtesting will always use OnBarClose processing.

    You can find a lot of examples of conditions in the following page. https://ninjatrader.com/support/help...on_builder.htm

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    54 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    71 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X