Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy to go long with a stop loss and a take profit?

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

    Strategy to go long with a stop loss and a take profit?

    Hi.
    How can I place a trade in c# strategy to go long, but also include a stop loss and a take profit?

    e.g.
    Long trade at 200
    Stop loss will kick in if it goes below 180
    Profit will be taken if it goes above 220

    #2
    Hello spikeruk,

    Thanks for your post and Welcome to the NinjaTrader forums!

    You can use the Ninjascript methods of SetStopLoss() and SetProfitTarget(). Those methods will be employed with an OCO structure meaning one is canceled automatically when the other is filled. I will include the help guide links below as well as a reference to the "managed Approach" that summarizes this information.

    If you are using the Strategy Builder, these methods are also available through the Stops and Targets window however in the strategy builder these would need to be fixed values that would apply to every trade so you would want to use the CalculationMode of Ticks and specify the number of ticks to achieve your goal.

    References:
    Managed Approach: https://ninjatrader.com/support/help...d_approach.htm
    SetStopLoss(): https://ninjatrader.com/support/help...etstoploss.htm
    SetProfitTarget(): https://ninjatrader.com/support/help...ofittarget.htm
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks, this helped

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Option Whisperer, Today, 09:55 AM
      1 response
      11 views
      0 likes
      Last Post bltdavid  
      Started by port119, Today, 02:43 PM
      0 responses
      1 view
      0 likes
      Last Post port119
      by port119
       
      Started by Philippe56140, Today, 02:35 PM
      0 responses
      3 views
      0 likes
      Last Post Philippe56140  
      Started by 00nevest, Today, 02:27 PM
      0 responses
      2 views
      0 likes
      Last Post 00nevest  
      Started by Jonafare, 12-06-2012, 03:48 PM
      5 responses
      3,986 views
      0 likes
      Last Post rene69851  
      Working...
      X