Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Give Stop Loss & Profit Target orders names

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

    Give Stop Loss & Profit Target orders names

    Hi

    Want to be able to tie the stop loss orders & profit target orders I'm setting for 2 different sell or buy positions, to the actual positions. To do this I think I need to name the actual stop loss orders & profit target orders

    As an example I'm using the below to create stops & targets

    Code:
    SetProfitTarget(@"Buy_1", CalculationMode.Ticks, (ATR1[0]*1.5)/TickSize);
    //SetProfitTarget(@"Buy_2", CalculationMode.Ticks, (ATR1[0]*3)/TickSize);
    SetStopLoss(@"Buy_1", CalculationMode.Ticks, (ATR1[0]*1.5)/TickSize, false);
    SetStopLoss(@"Buy_2", CalculationMode.Ticks, (ATR1[0]*1.5)/TickSize, false);
    However when the strategy has run, the orders are just named 'stop loss' or 'profit target'

    Is there a way to name them so I can link which was for which position as per the above?

    Thanks

    #2
    Hi Gav_G,
    Try to add the name of your TP/SL as illustrated below.

    SetProfitTarget(@"Buy_1", CalculationMode.Ticks, (ATR1[0]*1.5)/TickSize, YOURNAME1)
    SetStopLoss(@"Buy_1", CalculationMode.Ticks, (ATR1[0]*1.5)/TickSize, YOURNAME1, false);
    SetStopLoss(@"Buy_2", CalculationMode.Ticks, (ATR1[0]*1.5)/TickSize, YOURNAME2, false);

    NT-Roland

    Comment


      #3
      Hello Gav_G,

      When placing multiple entry orders that have separate exit orders, the entries will need unique signal names and the exits will need to be using the fromEntrySignal of the entry.

      Also, the EntryHandling will need to be set to UniqueEntries or EntriesPerDirection will need to be set to 2.

      Chelsea B.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      49 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      126 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      67 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      42 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X