Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Pass Value Generated from BarsType to a Strategy

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

    #16
    Hello martin70,

    Have you tried restarting the platform after adding that to the bars type? I tried the scripts you attached and see the print when running it in a backtest.

    Comment


      #17
      Hi Jesse,

      the calculation to run the test is simply (high+Low)/2 of the last bar.

      In real time this is calculated correctly and the printed value changes on each new bar.

      In backtest, yes, you get a print as you write, but the printed values are ALWAYS the same identical value, referring to the FIRST bar of the chart: the printed value is not changing; therefore the value it is not calculated anymore after the first bar.

      How do I get the backtest print behaviour to be correct like in real time?

      Thank you
      Martin

      Comment


        #18
        Hello martin70,

        In a backtest renko bars do not work the same as they do in realtime so you will see differences in how it processes in that use case. Renko bars use what is called remove last bar supported, any renko code that is similar to the original NT renko or that uses remove last bar will encounter that in a historical test.

        Comment


          #19
          Hello Jesse,
          RemoveLastBar() is not used in UniRenko bars, please check the above posted code. This does therefore not seem to be the issue. What else could be the problem?

          Comment


            #20
            Hello martin70,

            In that case you would need to use prints to debug the bars type logic to find out what may be happening. As that is a third party bars type I am not aware of any specific problems that logic may have when backtesting. In general renko bars cannot be accurately backtested, we suggest to test renko bars going forward in realtime using playback or a live connection.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            599 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            344 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            558 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            557 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X