Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Dynamically set SetStopLoss

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

    Dynamically set SetStopLoss

    I am coding simple strategy that generates entry position upon specified condition(SMA crossover), when the profit target increases by 10 ticks I would like to set stop loss which is five ticks higher than generated entry position. I am not sure how and where assign SetStopLoss property. Normally I would define it in OnBarUpdate section. My question actually is if somebody can provide me with sample code how dynamically set this value with conditions described above?

    #2
    Hello choinski,
    Welcome to the forum and I am happy to assist you.

    Please refer to this sample reference code which demonstrates how to modify stop and profit targets http://ninjatrader.com/support/forum...ead.php?t=3222

    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by bortz, 11-06-2023, 08:04 AM
    47 responses
    1,602 views
    0 likes
    Last Post aligator  
    Started by jaybedreamin, Today, 05:56 PM
    0 responses
    8 views
    0 likes
    Last Post jaybedreamin  
    Started by DJ888, 04-16-2024, 06:09 PM
    6 responses
    18 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by Jon17, Today, 04:33 PM
    0 responses
    4 views
    0 likes
    Last Post Jon17
    by Jon17
     
    Started by Javierw.ok, Today, 04:12 PM
    0 responses
    12 views
    0 likes
    Last Post Javierw.ok  
    Working...
    X