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.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Pass Value Generated from BarsType to a Strategy
Collapse
X
-
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
-
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
-
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
612 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
355 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
561 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
564 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment