• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Maximum number of orders per bar

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

    Maximum number of orders per bar

    Hi there,

    I wonder how I can set in the strategy builder an option to fix the maximum number ot orders that can be place in each bar. In example, if I want that only 2 orders can be placed in each bar (whithout count te limit orders used as stop loss and profit target), how can I set it in "Inputs and variables" and "Conditions and Actions"?

    Thank you.

    #2
    Hello Zenersev,

    Thanks for your post.

    You could use additional logic using bools, to accomplish this. For example, you could create two bools "Order1Submitted" and "Order2Submitted" in Inputs and Variables.

    You would then need separate conditions for each of these orders in Conditions and Actions. When both of these bools are false, and your entry condition is true, submit your first order and set "Order1Submitted" to true. When "Order1Submitted" is true and "Order2Submitted" is false, submit your second order and then set "Order2Suibmitted" to true.

    You could then create a condition that would be used to reset the bools so when that condition is true and both "Order1Submitted" and "Order2Submitted" are true, you can set the bools back to false so the logic will work as it did on its first pass.

    Please let me know if you have any questions.
    Last edited by NinjaTrader_Jim; 10-24-2019, 08:03 AM.
    JimNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Jim View Post
      Hello Zenersev,

      Thanks for your post.

      You could use additional logic using bools, to accomplish this. For example, you could create two bools "Order1Submitted" and "Order2Submitted" in Inputs and Variables.

      You would then need separate conditions for each of these orders in Conditions and Actions. When both of these bools are false, and your entry condition is true, submit your first order and set "Order1Submitted" to true. When "Order1Submitted" is true and "Order2Submitted" is false, submit your second order and then set "Order2Suibmitted" to true.

      You could then create a condition that would be used to reset the bools so when that condition is true and both "Order1Submitted" and "Order2Submitted" are true, you can set the bools back to false so the logic will work as it did on its first pass.

      Please let me know if you have any questions.
      Thanks Jim,

      I have been trying to do this in the strategy builder, I have already create the bools inputs in Inputs and Variables but I don´t know which is the right way to create the logic in Inputs and variables. Please could you show me a screen capture with the right way to do it?

      Comment


        #4
        Hello Zenersev,

        Please see the video below describing how bools can be used.

        https://drive.google.com/file/d/1n8E...w?usp=drivesdk

        I look forward to assisting.
        JimNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Jim View Post
          Hello Zenersev,

          Please see the video below describing how bools can be used.

          https://drive.google.com/file/d/1n8E...w?usp=drivesdk

          I look forward to assisting.
          Thank you very much Jim, very useful video tutorial.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by UltraNIX, Today, 07:41 AM
          1 response
          2 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by frankduc, Today, 07:43 AM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by sledge, Today, 07:39 AM
          0 responses
          2 views
          0 likes
          Last Post sledge
          by sledge
           
          Started by Fness2020, Yesterday, 08:29 PM
          1 response
          28 views
          0 likes
          Last Post NinjaTrader_PaulH  
          Started by Hurrikane, Yesterday, 09:18 PM
          1 response
          14 views
          0 likes
          Last Post NinjaTrader_PaulH  
          Working...
          X