Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Has anyone seen this sort of behaviour before?

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

    Has anyone seen this sort of behaviour before?

    Does anyone know what happened here? Please see attached chart.
    Attached Files

    #2
    Hello,

    Thanks for the note.

    You must be using Calculate On Bar Close = False when you run the strategy right? If so your strategy is flip flopping as the condition becomes true and not true intra bar. Would recommend you add some logic to your strategy to stop this since as waiting 1 or more bars before switching position with BarsSinceEntrty() for example. Or running the strategy with COBC=true.



    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      Hi Brett,

      CalculateOnBarClose = true......for strategy and indicators...

      Regards

      Kay Wai

      Comment


        #4
        Hello,

        Alright well then on each bar close its flip flopping. You need to add in a parameter in your entry BarsSinceEntry() or BarsSinceExit() should do the trick to prevent the flip flopping.

        Let me know if I can be of further assistance.
        BrettNinjaTrader Product Management

        Comment


          #5
          Hi Brett,

          Would you mind taking a look at the strategy for me? The first circle of trades shouldn't even have occured as I thought I had coded for an entry to a MAX of 5 bars after the last green count. And this strange behaviour is occuring at least 10 bars after the last green count!

          When I used daily charts yesterday, I didn't see this behaviour but when I tried intraday charts today, this really freaked me out!

          Regards

          Kay Wai
          Last edited by kaywai; 05-06-2011, 07:29 PM.

          Comment


            #6
            Hello,

            For me to be able to look into this, what you would need to do is first debug the strategy on your own. Simplify it down into a simple strategy that I can check into on my side and help you narrow down the issue. However first you must strip out all the code that does not affect the error so that we are able to isolate the issue code. If you have a stripped down version that still has the issue please let me know and I will look into this version.


            I tried to look into your posted code however there were simply too many moving parts to track.

            I look forward to assisting you further.
            BrettNinjaTrader Product Management

            Comment


              #7
              Originally posted by kaywai View Post
              Does anyone know what happened here? Please see attached chart.
              Just wondering,

              Did this happen in real time or market replay?

              And if market replay, is it old data or did it actually play through?

              Comment


                #8
                it happened on historical data and was bad coding on both indicator and strategy.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                666 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                377 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                110 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                575 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                580 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X