Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Issues with strategies on linebreak charts

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

    Issues with strategies on linebreak charts

    I would like a clear answer on this as I haven't gotten one yet. I've been running strategies on LineBreak Charts and getting vastly different results between live and backtesting over the same period - I am using all the same conditions and data. There is no consistency between the trades it takes - it may take many more or fewer trades live than in backtest and at completely different times. Why is this?

    #2
    Hello samish18,

    Thank you for your post.

    LineBreaks bars are similar to Renko bars in that they change the open price after the bar is forming. These types of bars aren't great for backtesting, and won't work with Tick Replay.

    You may consider instead testing using the Playback connection with Market Replay data.

    Comment


      #3
      I use a secondary dataseries to get accurate price levels. The repainting of the open price should not affect the times at which trades occur as I am using onBarClose

      Comment


        #4
        Hello samish18,

        The bar itself is going to have different values because of how the bar forms. The Open price can change after it has already formed - it doesn't matter what Calculate logic OnBarUpdate() is running.

        1-tick intrabar granularity can ensure your orders fill at an accurate price, but this won't stop the bar values from being different.

        ​Please let me know if you have any further questions.

        Comment


          #5
          I am aware of the price issue when using lineBreak bars, that is not my concern as for 15 minute linebreak bars, I execute orders on a 1 minute additional data series and get accurate price fills. My concern has to do with the great discrepancy between trades live and in backtest - no correlation between the two

          Comment


            #6
            Hello samish18,

            As mentioned, LineBreak bars aren't ideal for backtesting precisely because of this price issue. This is difficult to simulate historically, which is what backtesting is run on - historical data. This is why there is a discrepancy.

            It doesn't matter if you are using OnBarClose, or executing orders on a more granular data series. The more granular series isn't going to stop the price from changing.

            Comment


              #7
              The strategy I am using is a simple moving average strategy that only considers the closing price

              Comment


                #8
                Hello samish18,

                Please refer to my previous post:

                The bar itself is going to have different values because of how the bar forms.​
                You're using LineBreak bars to backtest - the LineBreak bars values change. This is difficult to simulate historically. The nature of the bars is that the values can change after they have already formed.

                As you've mentioned - you are seeing a discrepancy in live vs. backtest when using LineBreak bars. There is no way to stop or change the price from being different.

                All bars that use isRemoveLastBarSupported aren't ideal for backtesting (Renko, HeikenAshi, LineBreak, etc). If you take a look at the code for LineBreak, you will see that it uses IsRemoveLastBarSupported. RemoveLastBar allows the BarsType to remove the last data point and amend all the values on an already closed bar.

                All bar types that are IsRemoveLastBarSupported cannot be used with TickReplay and generally cause inaccurate results when backtesting in historical data.



                Unfortunately, we don't have a solution or workaround to get LineBreak bars to have high accuracy in backtest. Otherwise, I would have already gladly provided it to you.

                Comment


                  #9
                  Do the close price of bars change after they have already formed or only the open price?

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by argusthome, 03-08-2026, 10:06 AM
                  0 responses
                  116 views
                  0 likes
                  Last Post argusthome  
                  Started by NabilKhattabi, 03-06-2026, 11:18 AM
                  0 responses
                  61 views
                  0 likes
                  Last Post NabilKhattabi  
                  Started by Deep42, 03-06-2026, 12:28 AM
                  0 responses
                  40 views
                  0 likes
                  Last Post Deep42
                  by Deep42
                   
                  Started by TheRealMorford, 03-05-2026, 06:15 PM
                  0 responses
                  43 views
                  0 likes
                  Last Post TheRealMorford  
                  Started by Mindset, 02-28-2026, 06:16 AM
                  0 responses
                  82 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Working...
                  X