Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple Targets using StopLimit Entry

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

    Multiple Targets using StopLimit Entry

    When entering the market via a market order trading 2 contracts, I am able to create two exit orders each trading a single contract and a single stop order trading 2 contracts. The entire transaction works exactly as expected.
    // market order entry
    EnterShort(2, "Entry");
    // on execution of "Entry"...
    stopOrder = ExitShortStopMarket(0,true,2,stopPrice,"Entry-Stop","Entry");
    targetOrder1 = ExitShortLimit(0,true,1,target1,"Entry-T1","Entry");
    targetOrder2 = ExitShortLimit(0,true,1,target2,"Entry-T2","Entry");

    // on execution of "Entry-T1"
    I move "Entry-Stop" into an entry-plus-one position using ChangeOrder(), and I set targetOrder1 = null;

    As I stated, this works flawlessly.

    However, when I try the exact same approach using a stop limit entry, I get different results:

    // stop limit entry
    (
    EnterShortStopLimit(0, true, 2, 0, entryPrice, "Entry");


    When target one is filled (a single contract), the remaining target and the stop are both cancelled leaving an open position of the 1 remaining contract (entered with 2).

    I am utterly baffled by this. I'd rather not create multiple entry orders when using a StopLimitOrder entry, especially seeing as how I get the exact response I am looking for with the Mar****rder entry. That being said, if it is the only way, I'll get 'er done. I just don't want to waste my time if there is something simple I am missing.

    Thanks ;-)
    Last edited by efagerstrom; 12-09-2018, 10:01 AM.

    #2
    Hello efagerstrom,

    My first recommendation would be to use separate entries and exits for each quantity. Trying to use multiple exits for the same entry can cause overfills, the position becoming double and reversing, and can cause positions to be left open.

    However, I will test this and inquire with our development if this is expected behavior.
    I appreciate your patience.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks you, Chelsea ;-)

      Comment


        #4
        Hello efagerstrom,

        Thank you for your patience.

        There is no expected behavior as scaling in and out of Managed Orders should be done with an order for each quantity upon entry and exit.

        You can find an example of scaling in and out at the following link: https://ninjatrader.com/support/foru...osition?t=3751

        Please let me know if you have any questions.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        38 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        124 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        64 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        41 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