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 usazencort, Today, 01:16 AM
    0 responses
    1 view
    0 likes
    Last Post usazencort  
    Started by kaywai, 09-01-2023, 08:44 PM
    5 responses
    602 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by xiinteractive, 04-09-2024, 08:08 AM
    6 responses
    22 views
    0 likes
    Last Post xiinteractive  
    Started by Pattontje, Yesterday, 02:10 PM
    2 responses
    20 views
    0 likes
    Last Post Pattontje  
    Started by flybuzz, 04-21-2024, 04:07 PM
    17 responses
    230 views
    0 likes
    Last Post TradingLoss  
    Working...
    X