Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
new type of bar
Collapse
X
-
new type of bar
I had an idea for a new type of bar based off of a range bar. I unfortunately have no idea where to even start on something like this. I was hoping someone could give me an idea of how to go about programming a type of bar. Any help would be greatly appreciated.Tags: None
-
Hello laces2,
Creating custom bar types is unfortunately not supported by NinjaTrader. However, you can review source code for existing bar types and could create your own as well. You will need something like Visual studio or a text editor to open this file here:
Documents\NinjaTrader 7\bin\custom\type\@BarTypes.cs
You could also take a look at the source code for indicator HeikenAshi, which is a kind of bar type but developed as indicator. Can view this using Tools > Edit NinjaScript > Indicator > Select HeikenAshi and open.Ryan M.NinjaTrader Customer Service
-
There have been a few hacks at custom bar types, and some bar types now available exist because they were first started as unsupported programming by users.
The ability to program a custom bar type exits within NT, but it isn't documented or supported. If you'd like to see NT document and suppport custom bar types, please add your vote to the below thread.
Comment
-
Originally posted by laces2 View PostThank you for the help. Looks like I have a lot more homework ahead of me than I thought. If I manage to make it happen I will post how I went about it.
Hi lace2,
Creating new bar types is time consuming because the normal tools for creating indicators are not available. The output window and the print command do not function with chart types. Also you have to restart NT after every change to activate the new change on the chart.
I have created 4 new chart types myself over the last three years.
It was well worth it to me to create exactly what I wanted.
Good luck with your project,
RJay
Comment
-
laces2, I've recently accomplished developing new type of bars. I did it as indicator having HeikenAshi as an example. I'd definitely advise you to follow that way. I don't really see any flaws in that compared to developing it as native custom BarType. Moreover it seems to me as much easier way, especially if you just start.
Comment
-
I like the idea of going the Indicator route, since it makes development easier (not having to restart NT for each change, etc).Originally posted by danilam View Postlaces2, I've recently accomplished developing new type of bars. I did it as indicator having HeikenAshi as an example. I'd definitely advise you to follow that way. I don't really see any flaws in that compared to developing it as native custom BarType. Moreover it seems to me as much easier way, especially if you just start.
However, I'm looking at @HeikenAshi.cs as a guide, but I fail to see how to force a new bar. It seems the bar type of the chart affects how it outputs. For example, if I put the HeikenAshi on a 3-min chart versus a 1597T chart, I will get a very different output. Thus, not really a new bar type. Instead a bar type modifier.
I imagine going the indicator route is not going to work for me.
Is there any examples out there for going the, actual, new bar type route?
Any help is greatly appreciated,
Daniel
Comment
-
Originally posted by neoikon View Post.. For example, if I put the HeikenAshi on a 3-min chart versus a 1597T chart, I will get a very different output. ...
Daniel
Is that not true of any and every bar type? If you change the time parameters of the chart, the bars show up differently. Am I misunderstanding something here?
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
571 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
330 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 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
548 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
549 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment