Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trailing Stops

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

    Trailing Stops

    Hello,

    I've put up a strategy that uses
    Uses an indicator to generate entry and exit signals.
    Entry signal long is at the same time the exit signal for short and vice versa
    I also put in a trailing stop to make sure that, if the exit signal fails, there is a solid exit.

    Now, if I run a backtest everything seems fine, but when I run it agains realtime data something seems wrong. As soon as I start the strategie it says that it has an open position and keeps counting p/l even there is no open position... also the trailing stops stay initialized when a position is closed.

    What do I have to do to get this correct?
    Is there a need to cancel the trailing stop when the exit signal is generated and filled? If so, how is this done?

    Thanks for your help,

    Dennis

    #2
    Hi Dennis,

    I would suggest to start off with a simple version of what you want and run it real-time and verify operation is as expected. Then add the next set of logic and do the same until it breaks and you have an exact idea of what is happening so you can deal with it appropriately.
    RayNinjaTrader Customer Service

    Comment


      #3
      Hello Ray,

      first of all I would like to say: thank you.
      The quickness of your support forum is great, even for europeans that have a different time zone than you do. I really appreciate your good work.

      Second:
      The thing I set up is actually pretty simple. It only uses one indicator and a trailing stop loss. But I will try to find out what it does when I rebuild and run it partly.


      Dennis

      Comment


        #4
        Hello,

        I'm now running the strategy only, as proposed.
        Its a simple one indicator strategy: go long if indicator < trigger go short if indicator > trigger.
        As I understand it's not needed to exit the positions, because entering a short position will close the existing long one and vice versa.

        Now, if I run it against realtime data, is it a regular behaviour that as soon as I start the strategy it starts showing a p/l in the strategy tab (
        the strategy tab will also show a quantity and position) without even having an open position in the position tab?

        Do I need some kind of "flatten all" command within my strategy programming because it's an "always in" strategy?

        Thanks,
        Dennis

        Comment


          #5
          This is expected. This will shed some light - http://www.ninjatrader-support.com/v...ead.php?t=4033
          RayNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          673 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          379 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          111 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          577 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          582 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X