Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Reversing a strategy

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

    Reversing a strategy

    Hey,

    I was trying to create an automated strategy and I ended creating an absolutely awful strategy -- now obviously, I want to reverse the signal and profit from it. Problem is the strategy has a trailing stop (this is what seems to be making it perform so poorly).

    How would one go about "reversing" a stop loss. For example, if I currently have a short position with a 5 tick stop loss, but I want to end up with a long position and that same "trailing stop" signal, how can I program this? Since I no longer have a short position, the trailing stop won't work the same way...

    Any ideas? I've tried a bunch of different things but nothing that generates the same trades.

    Hope this helps others with extremely bad strategies...

    #2
    pmorissette, depending on how you have the stop loss and trail stop coded up, it could potentially be completely automatic. If you just do SetTrailStop(...) and/or SetStopLoss(...), then you wouldn't need to change anything. If you have a custom stop/trail strategy, then the code would get more complex.

    If you don't mind, could you please post the code you're using here so we can see if anything else looks out of place?

    Keep in mind that if you're using trailing stops, simply reversing the trades would not result in a reversed profit as well. Trailing stops are a path dependent function, so a trail stop from a long would be much different than a trail stop started at the same point as the long for a short.
    AustinNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    649 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    370 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    109 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    574 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    576 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X