Announcement

Collapse
No announcement yet.

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 NullPointStrategies, Today, 05:17 AM
    0 responses
    44 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    124 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    65 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X