• 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

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 mtamaku, Today, 09:19 AM
    0 responses
    12 views
    0 likes
    Last Post mtamaku
    by mtamaku
     
    Started by traderMNQ, Today, 09:00 AM
    2 responses
    9 views
    0 likes
    Last Post traderMNQ  
    Started by jransom, Today, 09:08 AM
    0 responses
    6 views
    0 likes
    Last Post jransom
    by jransom
     
    Started by Irukandji, Today, 08:27 AM
    1 response
    16 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by brunoviveiros, Today, 08:18 AM
    0 responses
    5 views
    0 likes
    Last Post brunoviveiros  
    Working...
    X