Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

SetParaBolicStop calculate OnBarClose.

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

    SetParaBolicStop calculate OnBarClose.

    Dear Sir.

    I would like to execute SetParabolicStop at bar close. My strategy is calculated OnBarClose, but in strategy analyzer SetParabolicStop is trigerred for short positions if Close is greather than values calculated for SetParaBolicStop in the opening of the next candle.

    In the case of market replay, SetParabolicStop can be triggered if market touch the value calculated inside the current bar.

    I would like to obtain similar results in market replay and strategy analyzer. Im using Tick replay due to im using OnmarketData.

    It is possible to trigger the SetParabolicStop in OnBarClose in market replay?.

    thanks

    #2
    Hello memonic, thanks for your post.

    If your strategy in the strategy analyzer is performing actions at the first tick of the next bar then this would be expected to happen since Calculate == Calculate.OnBarClose.

    Could you give an example of what exactly you are seeing?

    I look forward to your reply.

    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hello ChrisL

      this is an example on market replay for ES06-19

      the parabolic stop is 4 ticks higher than the Close[1] or Open[0]bar. The strategy is un 1000 ticks bar

      thanks

      Comment


        #4
        Hi memonic, thanks for your reply.

        There seems to be a difference you see between when you have coded in your strategy vs what the strategy is outputting in replay. I would recommend analyzing this trade specifically with TraceOrders enabled as well as debugging manually with Print statements.

        If possible, please share the most simplified version of this script that still reproduces the problem, and I can test it out.

        I look forward to hearing of your results.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Hi CrisL
          In the up of the screen backtesting. in the down market replay. the strategy is calculate OnBarclose. the conditions for entry was fulfilled in bar[1]

          the backtesting enter short at Close[1]
          The market replay enter short at Open[0]

          the differences make the strategy unrealistic.

          thanks

          Comment


            #6
            Hello memonic, thank you for your reply.

            It looks like the strategy analyzer is not properly detecting the correct fill price. The strategy analyzer fills orders based on the historical fill algorithm.

            To help solve this problem with fill estimation, you should set "Order fill resolution" to a High and select a 1 tick series to fill orders upon.
            If your script has an additional series, you must implement this principle in the order entry parts of your code. The first thing you would do is add a 1 Tick series to your script with AddDataSeries.
            After this, check for the 1 Tick BarsInProgress to come through in OnBarUpdate. If BarsInProgress == the series index of your 1 Tick series, then set the parabolic stop. This will submit the order upon the 1 tick series, giving a smaller granularity of OHLC values thus leading to better fill estimations. More info on multi-time frame scripts can be found on this page.

            Please let me know if you have any questions on this.
            Chris L.NinjaTrader Customer Service

            Comment


              #7
              Hello ChrisL

              My problem continues and using backtesting with tick replay activated the Parabolic stop not executed properly.

              attached you can find an example with FDXM03-20 and 15 minutes bar, the largest losing trade was due by parabolic stop failure execution
              regards

              Comment


                #8
                Hi memonic, thanks for your follow up.

                I do not see a strategy attached to your post. If you have a simplified test strategy I will be happy to test the parabolic stop. Please also let me know what instrument, bar period/type, and the time frame you see this on.

                Chris L.NinjaTrader Customer Service

                Comment


                  #9
                  Hi ChrisL
                  Im using the better renko with 20 ticks. Thatsallow tick replay.
                  The instrument is FDXM

                  Comment


                    #10
                    Hi memonic, thanks for your patience. Did you have an example of this I could try?
                    Chris L.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by bortz, 11-06-2023, 08:04 AM
                    47 responses
                    1,611 views
                    0 likes
                    Last Post aligator  
                    Started by jaybedreamin, Today, 05:56 PM
                    0 responses
                    9 views
                    0 likes
                    Last Post jaybedreamin  
                    Started by DJ888, 04-16-2024, 06:09 PM
                    6 responses
                    19 views
                    0 likes
                    Last Post DJ888
                    by DJ888
                     
                    Started by Jon17, Today, 04:33 PM
                    0 responses
                    6 views
                    0 likes
                    Last Post Jon17
                    by Jon17
                     
                    Started by Javierw.ok, Today, 04:12 PM
                    0 responses
                    22 views
                    0 likes
                    Last Post Javierw.ok  
                    Working...
                    X