Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Builder - Limit One Trade Entry per Intra-Bar Problem

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

    Strategy Builder - Limit One Trade Entry per Intra-Bar Problem

    Hi there,
    I was wondering, maybe someone else has had the same issue, when it comes to using Strategy Builder for Auto Trading.
    This pertains to Entering on Intro-Bar. Not on Bar Close.
    That within different strategies being created, that use completely different indicators or price action for an entry signal.

    Is there any "generic" way to control how many entries per single bar the strategy takes for IntroBar trades?
    I of course, only want, 1 entry on any given bar, that meets all the requirements for the trade to be taken per strategy rules.


    I have strategies I've created that I like. But sometimes the strategy will take a second trade on the same bar before it closes.
    I've tries using a few different things to control this, but none of them work 100%. Like monitor unrealized P&L on the Bar(0), that don't work completely because if the first trade closes the unrealized P&L goes back to Zero (0) , then the strategy would allow another second trade to be placed on that same bar - But only sometimes, it looks like it depends on what the indicators being used, are doing on that Bar.

    Or
    I've tried to limit the values for an entry with < & > commands on an indicator value, in the strategy and they too, only work sometimes.
    sometimes I get double entry per bar, or sometimes if the market is moving fast, the indicator would jump across the whole range i set, then for that trade, the strategy don't take the trade at all. because all of my rules don't get met.

    I don't really see any command in Strategy builder for this issue. So I assume the only way to control this, is more complexed ways of coding the indicator being used or the price action type, being used in the Strategy Builder.

    Best Regards

    #2
    Hello Genesis2021,

    Thanks for your post.

    You can add a single condition and action to your exiting entry set(s) which will limit your orders to once per bar.

    Here is a short video that shows how to add this: https://Paul-ninjaTrader.tinytake.co...Nl8xNDc5OTg3Mg

    Again what is shown is added to the same sets where your entry conditions currently are.

    Comment


      #3
      Paul,
      Thank You for your reply, this is just what I was looking for.
      That worked great.
      Br.
      Last edited by Genesis2021; 02-03-2022, 11:28 PM. Reason: Clarity

      Comment


        #4
        This video shared by Paul doesn't seem available anymore. I was looking for a solution to the same problem. Would appreciate if it re-shared, or just guided to how to achieve this. Thank you!


        Originally posted by Genesis2021 View Post
        Hi there,
        I was wondering, maybe someone else has had the same issue, when it comes to using Strategy Builder for Auto Trading.
        This pertains to Entering on Intro-Bar. Not on Bar Close.
        That within different strategies being created, that use completely different indicators or price action for an entry signal.

        Is there any "generic" way to control how many entries per single bar the strategy takes for IntroBar trades?
        I of course, only want, 1 entry on any given bar, that meets all the requirements for the trade to be taken per strategy rules.


        I have strategies I've created that I like. But sometimes the strategy will take a second trade on the same bar before it closes.
        I've tries using a few different things to control this, but none of them work 100%. Like monitor unrealized P&L on the Bar(0), that don't work completely because if the first trade closes the unrealized P&L goes back to Zero (0) , then the strategy would allow another second trade to be placed on that same bar - But only sometimes, it looks like it depends on what the indicators being used, are doing on that Bar.

        Or
        I've tried to limit the values for an entry with < & > commands on an indicator value, in the strategy and they too, only work sometimes.
        sometimes I get double entry per bar, or sometimes if the market is moving fast, the indicator would jump across the whole range i set, then for that trade, the strategy don't take the trade at all. because all of my rules don't get met.

        I don't really see any command in Strategy builder for this issue. So I assume the only way to control this, is more complexed ways of coding the indicator being used or the price action type, being used in the Strategy Builder.

        Best Regards

        Comment


          #5
          Hello sampurna,

          Thank you for your post.

          You could create a bool variable to keep track if it is still okay to trade on that bar, and create a condition that checks IsFirstTickOfBar to see if a new bar has formed, then set the bool to true within that condition.

          Then, in your order entry condition check if the bool is true, call your order entry method within the condition and flip the bool to false.

          By doing so, the order will only be placed when the bool is true and the bool will only be flipped to true when a new bar has formed.



          Please let me know if you have any further questions. ​

          Comment


            #6
            Thanks Gaby, appreciate the response. That helped and was very clear. Apologies I missed responding earlier.

            Comment


              #7
              Can you provide a an example using strategy builder?

              Comment


                #8
                Originally posted by NinjaTrader_PaulH View Post
                Hello Genesis2021,

                Thanks for your post.

                You can add a single condition and action to your exiting entry set(s) which will limit your orders to once per bar.

                Here is a short video that shows how to add this: https://Paul-ninjaTrader.tinytake.co...Nl8xNDc5OTg3Mg

                Again what is shown is added to the same sets where your entry conditions currently are.

                Hello
                The link above with the short video is not working. What ist the new link?
                Sincerely
                Martin

                Comment


                  #9
                  Hello, the link to the video above is wrong. What is the new link?

                  Comment


                    #10
                    Can we get a new link or a link to a video explaining this?

                    Comment


                      #11
                      I'd also like a link to the video if that's possible.

                      Comment


                        #12
                        Hello Community,

                        Unfortunately, NinjaTrader_PaulH is no longer with NinjaTrader. The personal tinytake account his video's were hosted to was closed.

                        I have re-recorded a video of using a bool to limit one entry per bar.


                        Attached is the example script.
                        OneEntryPerBarBuilderExample_NT8.zip
                        Chelsea B.NinjaTrader Customer Service

                        Comment


                          #13
                          Yes! That is super helpful thank you!

                          Comment


                            #14
                            Originally posted by NinjaTrader_ChelseaB View Post
                            Hello Community,

                            Unfortunately, NinjaTrader_PaulH is no longer with NinjaTrader. The personal tinytake account his video's were hosted to was closed.

                            I have re-recorded a video of using a bool to limit one entry per bar.


                            Attached is the example script.
                            [ATTACH]n1329620[/ATTACH]

                            Hello,

                            In this video you talk about unlocking the code to enable historical tick data. Is there a video or a thread explaining this?

                            Thanks

                            Comment


                              #15
                              Hello,

                              In the video Chelsea is referring to adding intrabar granularity.

                              We have a support article that goes over this below.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              649 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              370 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              109 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              574 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              576 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X