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 CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      430 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      282 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      243 views
      1 like
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      331 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      292 views
      0 likes
      Last Post CarlTrading  
      Working...
      X