Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Enter and close at same price

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

    Enter and close at same price

    Hi,
    I am trying to develop a strategy using RSI as an entry trigger. My only exit is via a profit target or stop loss. But on running the backtester I am finding that frequesntly it enters a trade and closes the position immediately at the same value at which it entered. I do not understand why. I have attached a screenshot showing an example of this, and the code, which was generated by the Strategy Wizard.
    Thanks for any help you can offer.
    Regards,
    Annette
    Attached Files

    #2
    From the screenshot it seems you reversed at this price, so no exit via stop loss or profit target.

    Comment


      #3
      Hi Bertrand,
      Thanks for your reply, but I'm sorry, I don't understand. How can it close a position when I haven't asked it to? What has caused it to reverse?
      Thanks,
      Annette

      Comment


        #4
        You would see the reverse because of your entry rules, please add a drawing on your conditions to see when you should expect an order.

        Comment


          #5
          What I wasn't understanding previously was the fact that if you have say a long position open and you enter a short position, it first closes your long position then enters a short position - two actions not one. Can you please tell me where in the documentation this is explained? It is not mentioned under enterShort or enterLong which would seem to be the logical place.
          Are there any other situations where Ninja performs two actions when you might only expect one?

          Comment


            #6
            annettes, I'm not aware of other occurences you would need to keep in mind - thanks for pointing this out - we're working on enhancing / overhauling our documentation for NinjaTrader 7.

            To enter you into a long position NinjaTrader would logically need to take your current (if any) position flat, otherwise you could just enter up being flat instead of the desired 'long'.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            633 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            364 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            105 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            567 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            568 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X