Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Builder Help with Basic Pullback

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

    Strategy Builder Help with Basic Pullback

    I'm looking to create a pullback trade that works something like this in a simplified fashion. Price breaks a MA pulls back to said MA within X bars then Enter position when bar closes above that X bar high. You have bars ago which points at exact bars but I'm having trouble wrapping my head around how you look can at some bar series.

    #2
    Hello synthhokie,

    Thanks for your post.

    You could accomplish your goal by using a bool variable (it is either true or false) and an int type variable to be used as a bar counter.

    When the crossover condition occurs, you would set the bool true and set the bar counter to 1.

    While the bool is true and the bar count is less than whatever you want it to be, check to see the relation of price to the moving average and when your entry condition is true place the entry order and set the bool back to false, otherwise increment the bar counter and keep checking until the counter is equal to your x and then set the bool false.



    Comment


      #3
      Hello synthhokie,

      I just noticed that this is posted in NinjaTrader7 Strategy Forum and you have mentioned the Strategy Builder which is only in NinjaTrader8.

      Can you clarify what you are using/looking for?

      If this should be in another forum, I will move the topic, no worries.

      Comment


        #4
        How do I setup the bar counter? I can create the int variable but how does it "Count" so to speak.

        Comment


          #5
          Hello synthhokie,

          Thanks for your reply.

          If you are using the Strategy Builder in NinjaTrader8 then it is possible to do a bar counter but it is advanced topic.

          If you are using the NinjaTrader7 Strategy wizard then it cannot be done.

          So let's find out which one you are using and go from there.

          Comment


            #6
            NT8 Strategy Builder

            Comment


              #7
              Hello synthhokie,

              Thanks for your reply.

              The topic has been moved.

              Here is a link to a thread where I posted an example bar counter for the strategy builder: https://ninjatrader.com/support/foru...r-confirmation

              Comment


                #8
                Thank you. I'll give that a look.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by NullPointStrategies, Today, 05:17 AM
                0 responses
                51 views
                0 likes
                Last Post NullPointStrategies  
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                128 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                69 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                42 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                46 views
                0 likes
                Last Post TheRealMorford  
                Working...
                X