thanks
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
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.JesseNinjaTrader Customer Service
-
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:
Code:public class RenkoBarsType : BarsType { .. }
The next critical portion would be setting the slot, you will find:
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 FilesJesseNinjaTrader Customer Service
Comment
-
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Mestor, Today, 03:15 AM
|
0 responses
1 view
0 likes
|
Last Post
by Mestor
Today, 03:15 AM
|
||
Started by Mestor, 03-10-2023, 01:50 AM
|
11 responses
305 views
0 likes
|
Last Post
by z.franck
Today, 02:29 AM
|
||
Started by Padan, Today, 02:02 AM
|
0 responses
6 views
0 likes
|
Last Post
by Padan
Today, 02:02 AM
|
||
Started by bukowa, 11-09-2023, 06:07 PM
|
20 responses
408 views
0 likes
|
Last Post
by Adfra
Today, 01:36 AM
|
||
Started by yertle, Yesterday, 05:49 PM
|
2 responses
11 views
0 likes
|
Last Post
by yertle
Today, 12:12 AM
|
Comment