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 arvidvanstaey, Today, 02:19 PM
    4 responses
    11 views
    0 likes
    Last Post arvidvanstaey  
    Started by samish18, 04-17-2024, 08:57 AM
    16 responses
    60 views
    0 likes
    Last Post samish18  
    Started by jordanq2, Today, 03:10 PM
    2 responses
    9 views
    0 likes
    Last Post jordanq2  
    Started by traderqz, Today, 12:06 AM
    10 responses
    18 views
    0 likes
    Last Post traderqz  
    Started by algospoke, 04-17-2024, 06:40 PM
    5 responses
    47 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X