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 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.



    Paul H.NinjaTrader Customer Service

    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.
      Paul H.NinjaTrader Customer Service

      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.
          Paul H.NinjaTrader Customer Service

          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
              Paul H.NinjaTrader Customer Service

              Comment


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

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Rogers101, 05-05-2024, 11:30 AM
                10 responses
                35 views
                0 likes
                Last Post Rogers101  
                Started by tradingnasdaqprueba, Today, 03:42 AM
                2 responses
                21 views
                0 likes
                Last Post tradingnasdaqprueba  
                Started by cmtjoancolmenero, 04-25-2024, 03:58 PM
                21 responses
                114 views
                0 likes
                Last Post cmtjoancolmenero  
                Started by Quanto, 04-17-2024, 10:43 AM
                3 responses
                28 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by Mindset, Yesterday, 06:19 AM
                3 responses
                17 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Working...
                X