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
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!
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
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.
JesseNinjaTrader Customer Service
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.JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by MacDad, 02-25-2024, 11:48 PM
|
8 responses
173 views
0 likes
|
Last Post Today, 06:57 AM | ||
Started by alancurry, Today, 06:53 AM
|
0 responses
6 views
0 likes
|
Last Post
by alancurry
Today, 06:53 AM
|
||
Started by Juanhuisman, Today, 06:51 AM
|
0 responses
5 views
0 likes
|
Last Post
by Juanhuisman
Today, 06:51 AM
|
||
Started by sidlercom80, 10-28-2023, 08:49 AM
|
173 responses
2,339 views
0 likes
|
Last Post Today, 06:38 AM | ||
Started by ArkansasClint, 04-25-2024, 09:28 AM
|
1 response
23 views
0 likes
|
Last Post
by Leafcutter
Today, 06:28 AM
|
Comment