• 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, 09: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 pjsmith, Today, 09:54 AM
        0 responses
        2 views
        0 likes
        Last Post pjsmith
        by pjsmith
         
        Started by ajsdnyyrr1234DDf, Today, 09:39 AM
        0 responses
        6 views
        0 likes
        Last Post ajsdnyyrr1234DDf  
        Started by afoschini, Today, 09:18 AM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by rexsole, Today, 08:02 AM
        1 response
        16 views
        0 likes
        Last Post NinjaTrader_PatrickG  
        Started by johnnybegoode, Yesterday, 07:06 PM
        1 response
        19 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X