Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Partial Exit - named signal exit stop not updated

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

    Partial Exit - named signal exit stop not updated

    As a trader i am long 10,
    I take 50% of my position at target N, move to breakeven and let the other position quantity run...

    Enter a position long 10 name "signal1"
    place a stop fromSignal "signal1"

    e.g
    SetStopLoss("signal1", CalculationMode.Ticks, 10,SimulatedStop);

    exit half the position

    exitLong("signal1",5)

    5 is exited
    5 long
    stop is still qty 10

    I would expect the stop order quantity to get updated - but it is left on....Quantity 10
    meaning you can an unwanted fill of 5

    That must be a bug?
    MicroTrends
    NinjaTrader Ecosystem Vendor - micro-trends.co.uk

    #2
    Hello microtrends,

    I'm seeking clarification on this and will update this thread tomorrow, Tuesday.
    Last edited by NinjaTrader_RyanM1; 02-07-2011, 05:38 PM.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      This is limitation of managed order system. In order to scale out of a strategy, we always recommend first scaling in with distinct entry names.

      You may also consider using the unmanaged order system if you prefer not to scale in first.
      Ryan M.NinjaTrader Customer Service

      Comment


        #4
        As you can see I am scaling and scaling out with a distinct order names.
        I am using your patterns.

        The difference is that I am not exiting with the full quantity..

        The problem is the associated stoploss is not updated when an exit is performed.
        long Qty 10
        Stop qty 10
        Exit qty 5

        Stop hit fill 10

        position short 5

        If the stop is hit, it will then fill and overfill by half
        leaving an unmanaged order in the system.

        This is a bug or if not an extremely dangerous limitation..?
        Last edited by MicroTrends; 02-08-2011, 11:03 AM.
        MicroTrends
        NinjaTrader Ecosystem Vendor - micro-trends.co.uk

        Comment


          #5
          The documentation guide should say that this is not possible or an order reject should occur at least....

          A Work around then is:
          To not allow partial quantity exits for "1 signal"
          This is very inflexible for professional traders - and I cannot using ninjaTrader fullfill commercial requirements due to this - unless i try workarounds.

          You cannot rely on the fact that 2 distinct orders will be sufficient - you may be long in 2 seperate trade entry signals of 20M or 20lots and exit 1 signal - then you want to exit half the remaining. For traders with more than 10K this is common.

          One way I will try then is to cancel the stop and recreate it perhaps it will have the correct quantity in. Or try to change and the update the order....

          Please can you place this functionality on the suggested improvements?
          As it does look like a bug, could provide some very slick trading capabilities for pro traders
          Last edited by MicroTrends; 02-08-2011, 11:12 AM.
          MicroTrends
          NinjaTrader Ecosystem Vendor - micro-trends.co.uk

          Comment


            #6
            In your example, you use only one signal name for your entries. To scale out, you must scale in with distinct entry names, like:

            EnterLong(5, "signal1");
            EnterLong(5, "signal2");

            The exits you use could then be:
            ExitLong(5, "exitname", "signal1");
            SetStopLoss("signal2", CalculationMode.Ticks, 10, false);

            A sample scale out strategy is available here:
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by ScottW, Today, 06:09 PM
            1 response
            4 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by ScottWalsh, Today, 06:52 PM
            0 responses
            3 views
            0 likes
            Last Post ScottWalsh  
            Started by ftsc2022, 10-25-2022, 12:03 PM
            5 responses
            256 views
            0 likes
            Last Post KeyonMatthews  
            Started by Board game geek, 10-29-2023, 12:00 PM
            14 responses
            244 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by Waxavi, 04-19-2024, 02:10 AM
            4 responses
            56 views
            0 likes
            Last Post sonia0101  
            Working...
            X