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 charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    52 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    142 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    160 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    96 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    276 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X