Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 -

    BertrandNinjaTrader Customer Service

    Comment


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

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by ETFVoyageur, Today, 02:15 AM
      0 responses
      5 views
      0 likes
      Last Post ETFVoyageur  
      Started by Board game geek, Today, 01:34 AM
      0 responses
      5 views
      0 likes
      Last Post Board game geek  
      Started by morrnel, 05-12-2024, 06:07 PM
      3 responses
      40 views
      0 likes
      Last Post wzgy0920  
      Started by FishTrade, Yesterday, 11:11 PM
      0 responses
      7 views
      0 likes
      Last Post FishTrade  
      Started by Austiner87, Yesterday, 03:42 PM
      1 response
      22 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Working...
      X