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
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
-
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
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by johnnymustard, Today, 09:52 AM
|
0 responses
1 view
0 likes
|
Last Post Today, 09:52 AM | ||
Started by SnailHorn, 03-27-2024, 09:54 AM
|
4 responses
17 views
0 likes
|
Last Post
by SnailHorn
Today, 09:19 AM
|
||
Started by ninza33, Today, 07:16 AM
|
3 responses
18 views
0 likes
|
Last Post
by ninza33
Today, 09:01 AM
|
||
Started by foxtrott21, Today, 08:27 AM
|
0 responses
4 views
0 likes
|
Last Post
by foxtrott21
Today, 08:27 AM
|
||
Started by jaypelle3, Today, 08:26 AM
|
0 responses
3 views
0 likes
|
Last Post
by jaypelle3
Today, 08:26 AM
|
Comment