Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Automated strategy: Adjust StopLoss

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

    Automated strategy: Adjust StopLoss

    I am trying to reset my StopLoss in an Automated Strategy while in a trade.

    I have the Initial StopLoss set as:

    SetStopLoss("", CalculationMode.Ticks, iStopLoss, false);

    Where the StopLoss setting is set when you configure the strategy based on your risk tolerance.

    So then I try to set the StopLoss as the trade progresses to minimize any losses by using:

    SetStopLoss("", CalculationMode.Currency, dCurrStopLoss, false);

    Where dCurrStopLoss is adjusted based on current price compared to purchase price.

    I get this message in the Output Window:

    Stop/target handling set to 'By strategy position' since currency based stop order was placed.

    And even though the StopLoss target that is set is reached the position does not close.
    What is the preferred method for adjusting stop loss in an Automated Trade?

    Thanks.

    #2
    Hello ATMtrader0001,

    You could use CalculationMode.Price or any of the other modes instead of Currency here. Currency is used for "PnL away from average entry. Calculated by the dollar per tick value for the order quantity used." however this also toggles the target handling. To avoid that you can use any of the other modes and modify how you are calculating what you want for the new value.

    I look forward to being of further assistance.

    Comment


      #3
      Thank you. Changing it to .Price worked like a champ.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      20 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      119 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      63 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      41 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      45 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X