Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Separate Long/Short Stop Loss

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

    Separate Long/Short Stop Loss

    Hello,

    I am looking for a way to have my stop loss for longs only set when the entry is for a long order and vice versa for shorts. The thing is that I need MarketPosition to be Flat, otherwise the stop moves on each new bar, same thing happens if I put the stop loss right above the line of code that specifies the entry. I would put Flat as a condition in each of my trades, but A. I'm not sure this would even prevent my stop from moving if it was in each one of my entries, and B. I need to be able to get out of a long and reverse to a short, so that's a no go. Any ideas?

    If I've been unclear in any way, let me know and I'll provide more information/code snippets.

    Thank you!

    #2
    Nevermind, sorry. This was actually pretty straightforward.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Aviram Y, Today, 05:29 AM
    0 responses
    1 view
    0 likes
    Last Post Aviram Y  
    Started by quantismo, 04-17-2024, 05:13 PM
    3 responses
    25 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by ScottWalsh, 04-16-2024, 04:29 PM
    7 responses
    34 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by cls71, Today, 04:45 AM
    0 responses
    6 views
    0 likes
    Last Post cls71
    by cls71
     
    Started by mjairg, 07-20-2023, 11:57 PM
    3 responses
    216 views
    1 like
    Last Post PaulMohn  
    Working...
    X