• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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.
    JesseNinjaTrader Customer Service

    Comment


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

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by futurestrader7, Today, 11:31 AM
      0 responses
      2 views
      0 likes
      Last Post futurestrader7  
      Started by Teebone21, Today, 10:38 AM
      0 responses
      6 views
      0 likes
      Last Post Teebone21  
      Started by J_o_s, 03-30-2020, 12:29 AM
      2 responses
      15 views
      0 likes
      Last Post J_o_s
      by J_o_s
       
      Started by ptpatrader, Today, 10:27 AM
      0 responses
      4 views
      0 likes
      Last Post ptpatrader  
      Started by albertokeira, Today, 09:30 AM
      0 responses
      8 views
      0 likes
      Last Post albertokeira  
      Working...
      X