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
1 minute and 60 seconds chart different
Collapse
X
-
1 minute and 60 seconds chart different
Hi. Why is the Heiken-Ashi 1 minute and 60 seconds chart different in the backtest? The 1 minute chart in real trading mode coincides with the 60 seconds chart on the history and does not coincide with the 1 minute chart on the history. Why is it so? I need the real 1-minute chart to coincide with the 1-minute chart on the history, and not the 60-second chart. Because of this, the strategy's results do not coincide with the history.
Tags: None
-
Hello Kostiantyn,
If you are comparing a heiken ashi 60 second vs a 1 minute that should be different because the 60 second chart is using 1 second data to build bars where the 1 minute chart is using 1 minute data to build bars. The 60 second chart is more granular and has more data points to utilize while building 1 minutes worth of data. In realtime you build the bars based on the incoming data instead so you should see its possibly more similar.
If you want to compare a backtest and realtime you need to use the same data type, for example only use 1 minute or only use 60 second. Comparing 1 minute vs 60 second will yield differences.
On a separate note heiken ashi bars are not going to be accurate for fills in historical because you are basing fills off of imaginary averaged values, in realtime the real market is used to fill orders. For more accuracy in comparing historical vs realtime while using heiken ashi you should avoid using the BarsType and instead use the indicator for heiken ashi that can be found on the public user app share. That allows the underlying bars type of actual market data to be used for fills.
This is a corrected version of the Heiken Ashi BarsType that comes with NinjaTrader that aims to address the following issues: Values do not match rounded indicator (actual candle Open High and Low are not tracked and used in the BarsType) Realtime Close is incorrect (reloading historical data results in different results) The first bar […]
JesseNinjaTrader Customer Service
- Likes 1
-
Can I configure the 1 minute real-time schedule not as 60 seconds, but exactly as 1 minute without using the 60-second schedule? I need the strategy to work on a real account with the 1-minute chart, and not with the 60-second chart. Are there any settings in the terminal NinjaTrader8? I have a very good understanding of it. Thank you.
Comment
-
Hi. I downloaded and installed Heiken-Ashi-Accurate BarsType (NT8) https://ninjatraderecosystem.com/use...-barstype-nt8/. Can you tell me how I can get the series to load in my strategy. The standard Heiken-Ashi does this:
Code:protected override void OnStateChange() { if (State == State.SetDefaults) { Name = "Examples Indicator"; } else if (State == State.Configure) { // Add a 1 minute Heiken Ashi Bars object for the ES 03-18 contract - BarsInProgress index = 1 AddHeikenAshi("ES 03-18", BarsPeriodType.Minute, 1, MarketDataType.Last); } }
Comment
-
Hello Kostiantyn,
You would need to use AddDataSeries for any custom bars type and specify the ID from the bars type. You can see an example of that code in the AddDataSeries help guide page under the tips:
https://ninjatrader.com/support/help...ghtsub=adddata
2. You can add a custom BarsType which is installed on your system by casting the registered enum value for that BarsPeriodType. For example: AddDataSeries((BarsPeriodType)14, 10);
3. You can specify optional BarsPeriod values (such as Value2) of a custom BarsType in the BarsPeriod object initializer. For example: AddDataSeries(new BarsPeriod() { BarsPeriodType = (BarsPeriodType)14, Value = 10, Value2 = 20 });
Because that bars type is open source you can open the file in the NinjaScript editor to find its ID in its OnStateChange override.JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Tim-c, Today, 02:10 PM
|
1 response
7 views
0 likes
|
Last Post Today, 02:52 PM | ||
Started by Taddypole, Today, 02:47 PM
|
0 responses
2 views
0 likes
|
Last Post
by Taddypole
Today, 02:47 PM
|
||
Started by chbruno, 04-24-2024, 04:10 PM
|
4 responses
50 views
0 likes
|
Last Post
by chbruno
Today, 02:38 PM
|
||
Started by TraderG23, 12-08-2023, 07:56 AM
|
10 responses
401 views
1 like
|
Last Post
by beobast
Today, 02:35 PM
|
||
Started by lorem, Yesterday, 09:18 AM
|
5 responses
25 views
0 likes
|
Last Post Today, 12:29 PM |
Comment