Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SetStopLoss()

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

    SetStopLoss()

    Hi, I'm writing a strategy that enters a long position at a certain price with an initial stop loss set at 10 ticks (using SetStopLoss() in OnStateChange section). Once I reach an initial profit level, I want to adjust my stop loss upwards. This seems simple to do but I could not find an example where my stop can be adjusted from its initial setting. Any assistance is greatly appreciated! thanks

    #2
    Hello pman777,

    Thank you for your note.

    You could see the following two samples.

    The following sample will move a stop to breakeven after 5 ticks have been reached,
    https://ninjatrader.com/support/foru...427#post527427

    The last sample at the following link will adjust the stop up as profit grows,
    https://ninjatrader.com/support/foru...345#post521345

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by stewarco, Today, 09:47 AM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_Jim  
    Started by koganam, Today, 09:20 AM
    2 responses
    13 views
    0 likes
    Last Post koganam
    by koganam
     
    Started by juansearias, Today, 08:52 AM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_Zachary  
    Started by Gaterz, Today, 08:27 AM
    0 responses
    9 views
    0 likes
    Last Post Gaterz
    by Gaterz
     
    Started by wjadevries, Today, 08:25 AM
    0 responses
    7 views
    0 likes
    Last Post wjadevries  
    Working...
    X