Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

First bar of session

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

    First bar of session

    I want to build a strategy in the market wizard and use as a condition the first candle of the session to be green / bullish (C>O - Close>Open).
    Then I need a pullback (2 consecutive lower Highs than initial bars High) and trade on the breakout. The last condition (actual breakout is easy to build, I take the Current Day OHL indicator and when current bar H > Current Day H by 1 tick I enter market) the difficult is the 2 other conditions.

    Can you give me an idea about what to use. ONLY WIZARD pls.

    #2
    Hello alexnj,

    You can create two conditions within a set. Set Misc -> SessionBreak == Misc -> True as well as your Open > Close condition in the same set.

    Please see the following link for help defining conditions:
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      thanx and then how about the 2 pullbacks I need (lower Highs for long) before the actual breakout?
      I want to enter only after a pullback has occurred in the direction of the trend which is determined by the first candle. Need Replacement from previous high. After market makes a new session high at point A, I am looking for pullback (condition) if at least 2 consecutive following candles have lower highs than point A.

      Comment


        #4
        You can work with bars ago fields for all the values to compare prior values. If you need to create a sequence where you only evaluate the pullback after an initial condition, you can do this with user variables. This sample here is designed for the strategy wizard:


        Import that into your platform and can then see how's it's setup by editing the strategy.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Set 1
          Bars.SessionBreak==true
          Close[0]>Open[0]
          Close[0]>CurrentDayOHL().CurrentHigh[3]

          Enter Long.

          Doesn't work. This condition
          Bars.SessionBreak==true
          Close[0]>Open[0]
          has to be in separate set? Should I use zero on both?
          Can you give me the conditions exactly for long and I will work out the rest. Thanx.
          First candle C>O and then session new high point A and pullback at least 2 consecutive following candles have lower highs from pointA. Then breakout to new high offset 1 tick (last part is easy I can do)

          Comment


            #6
            Can you clarify what you mean by does not work? Please let us know exactly what you would like to express in terms of values and comparisons.

            Examples:
            The close 3 bars ago is greater than the most recent Open.
            The 40-period moving average crosses above the 200-period moving average.

            If you would like professional help developing your strategy, you may consider a 3rd party NinjaScript consultant who can make your strategy to your specifications.
            Ryan M.NinjaTrader Customer Service

            Comment


              #7
              I am aware of the pros. I just want something very simple and work it alone in wizard.
              Example long Corn. Session opens 09:30 CST (17:30 local). Use 2 minute bars. If first bar bullish (C>O) my bias is up (1st condition). If neutral (O=C) I wait for second bar for bias. Enter breakout in direction of trend after a pullback has occurred. So 2nd condition is retracement from previous high. Example: bars create NEW HIGH (point A). My condition is met if 2 consecutive following bars have lower Highs than point A. The 3rd condition is the actual breakout which I can manage (C> Current session H offset 1 tick). I can't specify with X bars back when the new High or retracements will take place. They may be in 2nd and 3rd bar or X number. That is what confuses me. If you write me these conditions I will be able to use as example and do the short etc and finalize. I appreciate your help.

              Comment


                #8
                You'll have to play around with it. The interface is basic but powerful once you learn to work in the user variables. You choose an item on the left, an item on the right and something to compare the two.

                Use user variables to create sequences and store values. Import that sample into your NinjaTrader and you can see some of the possibilities.
                Ryan M.NinjaTrader Customer Service

                Comment


                  #9
                  I appreciate your effort but I already no that. I have been using the platform over 3 years. I just want specific ideas especially on the 2 consecutive pullback bars before a new high. I really can't think of any ideas on how to express this. Can you please give me some expressions>>?

                  Comment


                    #10
                    For any type of consecutive function, you have to use multiple conditions and specify the bars ago values. Click Add for each condition you want to add.

                    High bars ago 0 > High bars ago 1
                    High bars ago 1 > High bars ago 2
                    High bars ago 2 > High bars ago 3

                    Those three conditions will test if there have been three consecutive bars with higher highs.
                    Ryan M.NinjaTrader Customer Service

                    Comment


                      #11
                      If you can give me the full example that specifies 1st bar (bullish, neutral or bearish) then waits for pullback of 2 bars and then for breakout of high it would be great. Bits and pieces are a big puzzle for me. Just give me the whole lines of conditions so I can then copy for short. Thank you

                      Comment


                        #12
                        Developing strategies is not our role on these forums. We are happy to point in the right direction for documentation and assist where we can. For custom strategy development, a NinjaScript consultant is your best option.

                        If you want to work on this on your own, you need to simplify. Break down all the components of your conditions and sequences, and use the help material provided as a reference. Add an extra layer of complexity only after verifying behavior at each step.
                        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
                        633 views
                        0 likes
                        Last Post Geovanny Suaza  
                        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                        0 responses
                        364 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by Mindset, 02-09-2026, 11:44 AM
                        0 responses
                        105 views
                        0 likes
                        Last Post Mindset
                        by Mindset
                         
                        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                        0 responses
                        567 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by RFrosty, 01-28-2026, 06:49 PM
                        0 responses
                        568 views
                        1 like
                        Last Post RFrosty
                        by RFrosty
                         
                        Working...
                        X