Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple Lots, Staged Exit.

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

    Multiple Lots, Staged Exit.

    Hello,

    I am at a loss on how to handle a strategy that has multiple lots with staged exit. Please point me to the proper documentation

    What I want to do is - first step:

    * Go long 3 contracts (futures) on a signal.
    * Exit one at a specific target,
    * Exit another at a specific target,
    * Trail the third.

    Naturally I need to be able to determine the amount of "lots" handled, but this can be a simple input parameter into the strategy. Every Lot will then consist of X contracts.

    How am I supposed to do that?
    * Set the contract number in the "go long/short" report.
    * Then on every bar (not too complicated) enter multiple Exit parameters? Does that work like that?

    I sort of miss the "proper" documentation for that, or an example. Any reference welcome.

    #2
    NetTecture, for setting this up discretionary trading on the SuperDOM or ChartTrader using the ATM Stragegy feature, please check into this tutorial - http://www.ninjatrader-support.com/H...yExample2.html

    To learn how to call ATM Strategy templates from a NinjaScript strategy, please open the 'SampleAtmStrategy' in the NinjaScript editor.

    Comment


      #3
      Well, seriously... no ATM please.

      Really.

      I want this done in code, for one thing.... because then I have it all set up in one place, not distributed over multiple locations.

      I would really love to do that totally in code, without the use of an ATM templace.

      For one, this allows me to be more flexible (targets, for example, based on ATR, not fixed numbers). Second, it... is.... hm.... if I export the strategy, it has all things in it, and does not depend on an external ATM templace.

      Comment


        #4
        Well then you would need to custom code this out in the NinjaScript editor, here are a few samples to get you started -





        Important for your purpose is the last one above, as you would need to scale it to scale out.

        For a sample custom trailing stop script, please check into those from our sharing -

        Comment


          #5
          Originally posted by NinjaTrader_Bertrand View Post
          Well then you would need to custom code this out in the NinjaScript editor, here are a few samples to get you started -





          Important for your purpose is the last one above, as you would need to scale it to scale out.

          For a sample custom trailing stop script, please check into those from our sharing -

          http://www.ninjatrader-support2.com/...railing&desc=1
          Thanks, that is "more helpfull".

          It uses two entries to close half of the position at a specific target. Ok, that works.

          What about having partial Exit orders?

          Can I do something like the following:

          ExitShortLimit (1, target1, "Exit T1", "Entry S");
          ExitShortLimit (2, target2, "Exit T2", "Entry S");
          ExitShortStop (stop, "Stop", "Entry S");

          I.e., in the OnBarUpdate set in three Exit orders at different areas to scale out of ONE position from ONE signal?

          Comment


            #6
            No NetTecture, you would really need to scale in with 2 entry orders to scale out then with 2 exit orders, just like in the sample here - http://www.ninjatrader-support2.com/...ead.php?t=3751

            Comment


              #7
              Originally posted by NinjaTrader_Bertrand View Post
              No NetTecture, you would really need to scale in with 2 entry orders to scale out then with 2 exit orders, just like in the sample here - http://www.ninjatrader-support2.com/...ead.php?t=3751
              Thanks, I will try it out then.

              Please forward to development that I dont like that.

              Basically, my problem with this is that it means I have to change my entry code just to work around my exit strategy - this is totally unnecessary coupling It makes trying out various exit strategies a pain in the butt, so to say - where normally I would just sit and replace the code for the exit, I now have to go in and replace all the code for the entry, too.

              Comment


                #8
                NetTecture, I'll forward your suggestion.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                637 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                366 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                107 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                569 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                571 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X