thanks
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
CustomBar type
Collapse
X
-
Hello,
Thank you for the question.
For NinjaTrader 7, because these were technically never supported, there is no internal documentation. There are quite a few threads on varied topics spread through the forum which can help with specific topics you may question. The best examples would be the default bar types included with the platform.
You can view the default code used for all the included bar types by opening the file: Documents\NinjaTrader 7\bin\Custom\Type\@BarsTypes.cs
You could copy the Class of the type you want to start with into a new file and work from there, this would be concidered a fairly advanced programming task.
Going forward in NT8, bar types are supported so in the near future there will be further documentation regarding the methods used in a bar type and so on.
I look forward to being of further assistance.
-
Ok, i now tried to add the code or rather the class from the file of that bartype i linked to the @barstypes file in hopes of gettin it to work that way.
but still nothing showing up in ninjatrader (even after restart). can someone pls explain why it isnt working. do i need to link the bartype in some other file to make it work? i dont get what possibly is goin wrong.
EDIT: i uploaded both the original file as well as the edited barstypes file, just in case
Comment
-
Hello,
I wanted to provide some details that would assist in custom bar types. Also I have uploaded a stripped down Renko bar type template.
First, if you have other bar types installed, the initial setup can be difficult in NT7 because there are limited "slots" for bar types. Custom0 - Custom9 and Final0-Final4. If another bartype you have is using one of these slots, yours would not show up so keep this in mind while initially setting up as you may need to change this multiple times until you see your custom type listed.
In the @BarTypes file, you can copy the entire class for the type you want as a template, so for Renko you would copy the entire:
In the class there are a few items that are critical, first is the class name. After copying this into a new file, you need to change all occurances of "RenkoBarsType" in the new file to your custom name, so : CustomRenkoBarsType.Code:public class RenkoBarsType : BarsType { .. }
The next critical portion would be setting the slot, you will find:
This would need to be changed from PeriodType.Renko to PeriodType.Custom0 or any number of a slot that would work with your specific install.Code:public CustomRenkoBarsType() PeriodType.Renko { }
Now for loading the type. Compile a script and then restart the platform, create a new chart and check for the type. If you do not see it, check the Custom0 and change it to a different value, then repeat the compile and restart.
Also if you want to use the NinjaScript editor, you can put the type in the indicators folder during development to edit it in NinjaTrader.
After making these changes, the script should now show up in the menu as an option, keep in mind any changes you do need to restart the platform, this is just the nature of bar types.
I look forward to being of further assistance.Attached Files
Comment
-
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
573 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
331 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
549 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment