Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

General question about use of order entry/exit and SetStopLoss/SetTrailStop

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

    General question about use of order entry/exit and SetStopLoss/SetTrailStop

    Let me start by explaining what I am trying to do and then how I believe I can implement it. My strategy places an entry order at a given point. After market entry, I want to place a fixed stop loss order. If the market moves in my direction (say 10 ticks), I would like to change my fixed stop loss order to a trailing stop order. I would like to use the SetStopLoss() and SetTrailStop() methods, but as I read the documentation this cannot be done: “The SetStopLoss() method can NOT be used concurrently with the SetTrailStop() method for the same position, if both methods are called for the same position (fromEntrySignal) the SetStopLoss() will always take precedence. You can however, use both methods in the same strategy if they reference different signal names.” I do not want to use them concurrently, I would like to cancel the SetStopLoss() order and replace it will the SetTrailStop() orders. I believe that my only option is to let the strategy handle the needed orders. That is, place a fixed stop order that gets cancelled when the market condition calls for the SetTrailStop() method. Am I correct, or is there a better way?

    #2
    Welcome to our forums here - what you intend to do is part of a reference sample we have published here -

    Comment


      #3
      Thanks Bertrand. This makes it clear how to use the SetStopLoss() method.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by cmoran13, Yesterday, 01:02 PM
      0 responses
      29 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      21 views
      0 likes
      Last Post PaulMohn  
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      160 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      95 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      148 views
      2 likes
      Last Post CaptainJack  
      Working...
      X