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 rbeckmann05, Yesterday, 06:48 PM
      1 response
      12 views
      0 likes
      Last Post bltdavid  
      Started by llanqui, Today, 03:53 AM
      0 responses
      6 views
      0 likes
      Last Post llanqui
      by llanqui
       
      Started by burtoninlondon, Today, 12:38 AM
      0 responses
      10 views
      0 likes
      Last Post burtoninlondon  
      Started by AaronKoRn, Yesterday, 09:49 PM
      0 responses
      15 views
      0 likes
      Last Post AaronKoRn  
      Started by carnitron, Yesterday, 08:42 PM
      0 responses
      11 views
      0 likes
      Last Post carnitron  
      Working...
      X