Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Calculate on tick close error

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

    Calculate on tick close error

    Anytime I use calculate on tick close with a trailing stop loss I generally get an error message that you cant place a stop loss above a current price. It usually only happens on the Nasdaq is it because the ticks move faster?

    Is there anyway I can avoid this error message without turning the error handling off.

    #2
    Hello litamm89,

    Thank you for the post.

    The only ways to avoid that would be to either place the target further away or use rejection handling turned off and handle the rejection yourself. That would involve being present when the strategy runs as you will need to close the error dialog still.



    I look forward to being of further assistance.

    Comment


      #3
      NinjaTrader_Jesse

      Thanks for your response. I used the strategy builder to input a tick trail. It follows each tick how would I set the target further? Are you suggesting I set it to follow the trail stop in intervals in 2-3 ticks instead of each tick? I didnt see a setting to do that.

      I look forward to your response.

      Comment


        #4
        Hello litamm89,

        Thank you for the reply.

        To change the distance you would need to edit the trailing stop and set a different Value for it. If you are using Tick calculation mode you would enter a larger number in the Value field to offset the trail further from the price.



        I look forward to being of further assistance.

        Comment


          #5
          NinjaTrader_Jesse

          I had already set the value to 120 ticks. Using the NQ that's already 30 points.

          I have gotten the error message using this setting thats why I thought it was curious it was saying I cant place the stop limit above the market order. The trail stop value is far from the current price when this happens. It seems it happens when there is a lot of volume and the bar moves rapidly.

          Comment


            #6
            Hello litamm89,

            Thank you for the reply.

            I would not expect that type of error with a far offset and with OnEachTick calculation. You would essentially need to see a move that was larger than the offset distance in 1 tick to where the trail updates with a price that is now above the current market. If you have a very simple test script that generates the error and a way to reproduce that on sim we could likely explore that further. An alternative would be to not use the SetTrailStop and instead move the order yourself. You could calculate a price and ensure it is on the correct side of the market at the time you call the order syntax.

            I look forward to being of further assistance .

            Comment


              #7
              NinjaTrader_Jesse

              I am not always in front of my computer and want to make it as automated as possible.

              How would I run the small test script to generate the error for you so you can further help me?

              Comment


                #8
                Hello litamm89,

                This is Jim responding on behalf of Jesse who is out of the office at this time.

                You may provide an export of strategy source code that is set up to hit this behavior quickly. You can consider simplifying the entry logic so it enters positions more often so the behavior is easier to encounter.

                Once that is set up, you can provide an export of the strategy source code and let us know how we should test the strategy to reproduce the behavior so we can have a closer look. It is often helpful to use Market Replay data in the Playback connection to repeat cases that happen with realtime data. For example, you could tell us to test the strategy on X instrument/timeframe with Y day(s) of Market Replay data. Knowing your timezone can also help incase the strategy is making entries based on time.

                Exporting as source code - https://ninjatrader.com/support/help...tAsSourceFiles

                Playback - https://ninjatrader.com/support/help.../?playback.htm

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by NullPointStrategies, Yesterday, 05:17 AM
                0 responses
                63 views
                0 likes
                Last Post NullPointStrategies  
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                139 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                75 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                45 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                50 views
                0 likes
                Last Post TheRealMorford  
                Working...
                X