Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exiting Position

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

    Exiting Position

    Hello Support,

    I am testing my Strategy, it is working well but output windows is showing many ignored exit orders because currently I just issue exit routine for all entries that has selected the particular exit signal. Obviously some of the entries did not have a position or some targets have been reached. All my entries are given the stringID. I would like to avoid having such Ignored order. Lets say, max position is 6, lets have this scenarios, the strategy has issued:
    EnterLong(1, "En1Qty1");
    EnterLong(1. "En1Qty2");
    EnterLong(1, "En2Qty1);
    EnterLong(1, "En2Qty2);
    EnterLong(1, "En3Qty1");
    EnterLong(1, "En3Qty2");

    Exit Long Signal 2 is detected, Position is currently 4 Longs. And Entries 1 & 3 has been set up to exit with Signal 2. I want to avoid doing catch all like:
    ExitLong("Exit2","En1Qty1");
    ExitLong("Exit2","En1Qty2");
    ExitLong("Exit2","En3Qty1");
    ExitLong("Exit2","En3Qty2");

    How do I know which Entries 1 & 3 still has positions ?
    How does one go about tracking/identifying positions ?

    Thanks.

    Regards,
    EdwardK.

    #2
    Edward, first of all the ignored orders would not have an adverse effect on your strategy - however you can track those items related to your specific entries with the IOrders / IExecution objects -



    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    67 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    36 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    59 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    62 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    53 views
    0 likes
    Last Post CarlTrading  
    Working...
    X