Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to track orders from beginning to end with EntrySignal name

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

    How to track orders from beginning to end with EntrySignal name

    I have a multi entry strategy & I need to be able to track what's happening with each entry from beginning to end. I'm losing track of what's going on after execution of the order. OnExecution seems to lose the EntrySignal name after the order has been entered. Exits no longer refer to the SignalName but rather 'Stop loss' or 'Profit target'

    If I have 10 different sorts of entry methodologies all entering & exiting at different times how can I keep track of them after order entry execution?

    Here's a sequence of code to enter 2 sets of orders, targets & stop losses for
    SignalNames Short & Shortr1:

    SetProfitTarget("Short", CalculationMode.Price, xx.xx);
    SetProfitTarget(
    "Shortr1", CalculationMode.Price, yy.yy);
    SetStopLoss(
    "Short", CalculationMode.Price, stop_value_short, false);
    SetStopLoss(
    "Shortr1", CalculationMode.Price, stop_value_short, false);
    entryOrder_short = EnterShortLimit(
    0,true,1,entry_value_short,"Short");
    entryOrder_shortr1 = EnterShortLimit(
    0,true,1,entry_value_short,"Shortr1");

    This is what I get from printing out the OnExecution events:
    Jan 03 12:03 Execution='NT-00040' Instrument='CL 02-14' Account='Sim101' Name='Short' Exchange=Default Price=94.45 Quantity=1 Market position=Short Commission=0 Order='NT-00090' Time='1/3/2014 12:08:15 PM'

    Jan 03 12:03 Execution='NT-00041' Instrument='CL 02-14' Account='Sim101' Name='Shortr1' Exchange=Default Price=94.45 Quantity=1 Market position=Short Commission=0 Order='NT-00091' Time='1/3/2014 12:08:15 PM'

    Jan 03 13:19 Execution='NT-00042' Instrument='CL 02-14' Account='Sim101' Name='Profit target' Exchange=Default Price=94.2 Quantity=1 Market position=Long Commission=0 Order='NT-00093' Time='1/3/2014 1:31:50 PM'

    Jan 03 14:28 Execution='NT-00043' Instrument='CL 02-14' Account='Sim101' Name='Profit target' Exchange=Default Price=93.87 Quantity=1 Market position=Long Commission=0 Order='NT-00095' Time='1/3/2014 2:28:20 PM'

    The last 2 events refer to Short & Shortr1 but I wouldn't know it looking at the events.
    Is there a way I can keep track of order entry & exit by signal name?

    Thanks.

    #2
    Originally posted by saturntd View Post
    I have a multi entry strategy & I need to be able to track what's happening with each entry from beginning to end. I'm losing track of what's going on after execution of the order. OnExecution seems to lose the EntrySignal name after the order has been entered. Exits no longer refer to the SignalName but rather 'Stop loss' or 'Profit target'

    If I have 10 different sorts of entry methodologies all entering & exiting at different times how can I keep track of them after order entry execution?

    Here's a sequence of code to enter 2 sets of orders, targets & stop losses for
    SignalNames Short & Shortr1:

    SetProfitTarget("Short", CalculationMode.Price, xx.xx);
    SetProfitTarget(
    "Shortr1", CalculationMode.Price, yy.yy);
    SetStopLoss(
    "Short", CalculationMode.Price, stop_value_short, false);
    SetStopLoss(
    "Shortr1", CalculationMode.Price, stop_value_short, false);
    entryOrder_short = EnterShortLimit(
    0,true,1,entry_value_short,"Short");
    entryOrder_shortr1 = EnterShortLimit(
    0,true,1,entry_value_short,"Shortr1");

    This is what I get from printing out the OnExecution events:
    Jan 03 12:03 Execution='NT-00040' Instrument='CL 02-14' Account='Sim101' Name='Short' Exchange=Default Price=94.45 Quantity=1 Market position=Short Commission=0 Order='NT-00090' Time='1/3/2014 12:08:15 PM'

    Jan 03 12:03 Execution='NT-00041' Instrument='CL 02-14' Account='Sim101' Name='Shortr1' Exchange=Default Price=94.45 Quantity=1 Market position=Short Commission=0 Order='NT-00091' Time='1/3/2014 12:08:15 PM'

    Jan 03 13:19 Execution='NT-00042' Instrument='CL 02-14' Account='Sim101' Name='Profit target' Exchange=Default Price=94.2 Quantity=1 Market position=Long Commission=0 Order='NT-00093' Time='1/3/2014 1:31:50 PM'

    Jan 03 14:28 Execution='NT-00043' Instrument='CL 02-14' Account='Sim101' Name='Profit target' Exchange=Default Price=93.87 Quantity=1 Market position=Long Commission=0 Order='NT-00095' Time='1/3/2014 2:28:20 PM'

    The last 2 events refer to Short & Shortr1 but I wouldn't know it looking at the events.
    Is there a way I can keep track of order entry & exit by signal name?

    Thanks.
    If you want to name your exits, you will have to use the Exit() methods instead of the Set() methods.

    Comment


      #3
      Thanks koganan for the assist here. With the Exit() methods you would have more control including IOrder returns and the abilities to set signal names directly as you desire to arrive at more structure in the signal tags.

      ExitLongLimit would then be for example used for a profit target order, in addition you can speciffy a bars object as well to submit against - the Set()'s would work always on primary, so index 0.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      647 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      369 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      108 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      572 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      573 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X