Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Limit order entry not working Strategy Builder

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

    Limit order entry not working Strategy Builder

    Here is the code from the builder. Next pic is the execution using playback. Don't understand why it is not working correctly. Not sure what price it is even entering from. That is not the high, close, etc of trigger bar (highlighted blue background).


    Click image for larger version  Name:	image.png Views:	0 Size:	16.1 KB ID:	1277548​​​
    Last edited by NinjaTrader_BrandonH; 11-12-2023, 03:13 PM.

    #2
    Hello Touch-Ups,

    Thanks for your post.

    To understand how the script is behaving and how orders are being placed, debugging prints should be added to the strategy that prints out the price you are submitting the order to.

    Below is a link to a forum post that demonstrates how to use prints to understand behavior.
    https://ninjatrader.com/support/foru...121#post791121

    That said, you mentioned "Here is the code from the builder" but I do not see any code being shared in your forum post.

    How exactly are you defining the Limit order in your script?

    Please send us a screenshot showing how you are defining the Limit order so we may accurately assist.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      The code is in the screenshot above the chart pic. It is EnterLongLimit(DefaultQuantity, (High[0] + (10 * TickSize)), ""); The code strategy builder spits out in the "Do the following" section after you make your selections. I have also tried not using a limit order in the entry. Still enters at same price. It is like the LIMIT part of my strategy builder is broken.

      Comment


        #4
        I made this simple strategy just as a test. ​And this is what I get... Enters at the open of next candle, instead of 100 ticks away.

        Click image for larger version  Name:	image.png Views:	0 Size:	9.7 KB ID:	1277586Click image for larger version  Name:	image.png Views:	0 Size:	8.6 KB ID:	1277588 ​​​
        Attached Files
        Last edited by Touch-Ups; 11-12-2023, 03:40 PM.

        Comment


          #5
          Hello Touch-Ups,

          Thanks for your notes.

          EnterLongLimit() will submit a buy limit order to enter a long position. Buy Limit orders are intended to be submitted below the current market price.

          If you are submitting a buy limit order to a price greater than the current market price, the order will be filled at market price.

          For example, if you enable Chart Trader on a chart and right-click below the market price, you will see the 'Buy Limit' option available to use. If you right-click above the market price, you will not see a 'Buy Limit' option available.

          See this help guide page for more information about order types: https://ninjatrader.com/support/help...rder_types.htm


          <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

          Comment


            #6
            Perfect. Thank you!

            Got the entry working now. I am using the high of the trigger candle to go long one tick above. Is there any way to use the low of that same candle as the stop in strategy builder?​

            Comment


              #7
              Hello Touch-Ups,

              Thanks for your notes.

              Exit methods could be used in the script, such as ExitLongLimit() / ExitLongStopLimit(), on the Conditions and Actions screen to place a profit target / stop loss at a certain price point.

              Note that this cannot be accomplished using the Set methods on the Stops and Targets screen of the Strategy Builder.

              The attached example script demonstrates using Exit methods for stops/targets in a Strategy Builder strategy.
              Attached Files
              <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by NullPointStrategies, Today, 05:17 AM
              0 responses
              50 views
              0 likes
              Last Post NullPointStrategies  
              Started by argusthome, 03-08-2026, 10:06 AM
              0 responses
              126 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