• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 webus, Today, 02:03 AM
    0 responses
    7 views
    0 likes
    Last Post webus
    by webus
     
    Started by momchi, Yesterday, 07:12 PM
    1 response
    15 views
    0 likes
    Last Post NinjaTrader_ChrisSch  
    Started by DieSlower, Yesterday, 11:02 PM
    0 responses
    5 views
    0 likes
    Last Post DieSlower  
    Started by gujungg, Yesterday, 10:59 PM
    0 responses
    12 views
    0 likes
    Last Post gujungg
    by gujungg
     
    Started by DieSlower, Yesterday, 09:46 PM
    0 responses
    13 views
    0 likes
    Last Post DieSlower  
    Working...
    X