Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How do the breaks work with a line break chart?

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

    How do the breaks work with a line break chart?

    I am running a strategy on a linebreak chart and am having difficulty replicating results between live and backtest. I'm thinking the issue may stem from when the bars are breaking

    #2
    Hello samish18,

    There is a guide that goes over how line break charts work in the following link. If that does not resolve the difficulty that you are having please provide some specific detail about what problem you are seeing so I know better how to assist.

    Comment


      #3
      I am having an issue where my results differ between running a strategy live and in a backtest - they make all the same executions, but differ by a couple of minutes.

      Comment


        #4
        Hello samish18,

        When you say that they make the same executions but differ by a few minutes what specifically do you mean? Do you have a specific example that you can provide?

        The same execution would be at the same time, you can see the time that an order was executed in the executions log. If the executions times in the logs are different then they are not the same. That would mean the strategy had submitted the orders at different times which would cause a visible difference.

        Comment


          #5
          For example: On a given day, in both the live environment and backtest, the strategy will take 2 long trades and 1 short trade. In the backtest, the longs will occur at 8:45 and 10:01 and the short will occur at 3:42. In the live environment, the longs will occur at 8:47, 10:02 and the short will occur at 3:45 - in the live environement, the same trades are taken but always delayed by 1-3 minutes

          Comment


            #6
            Hello samish18,

            Unfortunately this is not a specific example, do you have some screenshots which show the executions and their times or print information for the executions that you can provide?

            The first step at addressing this is to look at the executions in each test. Are the times identical?

            If the times are not identical that means the strategies conditions became true at a different time so the orders were submitted later.

            Comment


              #7
              Specific example: Today on ES
              Live Environment:
              Long condition met at 8:31
              Short condition met at 10:43
              Long condition met at 2:04
              Went long from 8:30 - 9:42, short from 10:43 - 1:21, short 1:23 - 1:24, short 1:25 - 2:02, long from 2:04 to 2:45
              (Exit conditions were not printed but looking at the chart they look reasonable)

              Backtest environment:
              Long condition met at 8:31
              Short condition met at 9:42
              Long condition met at 2:02
              went long 8:32 - 9:40, short 9:43 - 1:59, long 2:03 - 2:46

              Comment


                #8
                Hello samish18,

                I would need to see the details of the executions to get a better idea of the difference that you are seeing. Do you have screenshots showing the executions and their times or your print output that shows bar times/execution prints?

                Additionally what times are you using in your prints? Are you using the bar time for your entry conditions and the execution time for the execution prints? if you are using a bar time for execution events that would not be accurate as to what time the execution happened, the execution has a time property which represents the time it filled.

                Comment


                  #9
                  Please see the previous post for details of the executions - these are the direct results from the executions page and prints.
                  For prints, I was using Time[0], which as expected, would read one bar before the time at which the trade was executed (trades execute on open of bar)

                  Comment


                    #10
                    Hello samish18,

                    Can you provide a screenshot of the executions from each test so I can see the timestamps? In regard to your prints I can use the information you provided when comparing against the execution log to see if that seems to be expected or not. I would also need to know the settings you are using for the chart such as the timeframe and if you are using OnEachTick or OnBarClose processing in realtime.

                    Comment


                      #11
                      I am using 1 minute Linebreak time frame (I added a secondary minute series to get accurate price fills) and am using onBarClose

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by NullPointStrategies, Yesterday, 05:17 AM
                      0 responses
                      55 views
                      0 likes
                      Last Post NullPointStrategies  
                      Started by argusthome, 03-08-2026, 10:06 AM
                      0 responses
                      132 views
                      0 likes
                      Last Post argusthome  
                      Started by NabilKhattabi, 03-06-2026, 11:18 AM
                      0 responses
                      73 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
                      49 views
                      0 likes
                      Last Post TheRealMorford  
                      Working...
                      X