• 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

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

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Abilene, Today, 01:27 AM
        0 responses
        4 views
        0 likes
        Last Post Abilene
        by Abilene
         
        Started by simjs, Yesterday, 08:11 PM
        0 responses
        3 views
        0 likes
        Last Post simjs
        by simjs
         
        Started by mrlucky1x, Yesterday, 06:01 PM
        0 responses
        3 views
        0 likes
        Last Post mrlucky1x  
        Started by dedouglas, Yesterday, 03:17 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by Jugado, Yesterday, 02:22 PM
        2 responses
        30 views
        0 likes
        Last Post Jugado
        by Jugado
         
        Working...
        X