Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

UniqueEntries + set methods + average price vs respective price

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

    UniqueEntries + set methods + average price vs respective price


    Hello everyone,

    I have a question regarding the set methods :
    -> when the strategy has for parameter UniqueEntries, and multiple different orders are active,
    the strategy exits at the average price of all the active orders.

    But I cannot find the right code in order to have each exits at each respective stop or target from its entry price (instead of the average price), even if the code looks like below :
    SetStopLoss("entrySignala", CalculationMode.Ticks, someIntaFromEntryPrice, false);
    SetProfitTarget("entrySignala", CalculationMode.Ticks, someIntbFromEntryPrice);

    Is this expected ? and what am I missing ?

    #2
    Hi Amedeus, thanks for posting.

    SetStopLoss will always place the stop relative to the average entry price, and there is only one average entry price. You must use an Exit order and submit your protective orders in OnOrderUpdate/OnExecutionUpdate to target the fill price of each entry. I linked a related example below:



    Best regards,
    -ChrisL

    Comment


      #3
      Hey Chris, thank you very much,

      duly noted.

      have a great day.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      81 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      66 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X