Hopefully a quick and easy one, I have written my own custom Bar Type in NT8 and want to add it to a strategy however I can't for the life of me figure out what to put in the BarsPeriodType for the AddDataSeries, any help would be much appreciated.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Adding custom bar series to strategy
Collapse
X
-
Adding custom bar series to strategy
Hello,
Hopefully a quick and easy one, I have written my own custom Bar Type in NT8 and want to add it to a strategy however I can't for the life of me figure out what to put in the BarsPeriodType for the AddDataSeries, any help would be much appreciated.Tags: None
-
You need to assign a unique ID for your bar type, then use the ID to call the bar type in AddDataSeries.Originally posted by ScotCyGuy View PostHello,
Hopefully a quick and easy one, I have written my own custom Bar Type in NT8 and want to add it to a strategy however I can't for the life of me figure out what to put in the BarsPeriodType for the AddDataSeries, any help would be much appreciated.
For example, I assign my ninZaRenko bar's ID to 12345. Then we can add the data series as follows:
AddDataSeries(new BarsPeriod() {
BarsPeriodType = (BarsPeriodType)12345,
Value = 8,
Value2 = 4
});
____________
And here is how I set the ID, which should be done in SetDefaults:
BarsPeriod = new BarsPeriod {
BarsPeriodType = (BarsPeriodType)12345,
BarsPeriodTypeName = "ninZaRenko",
};
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
65 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
139 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
75 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
45 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
50 views
0 likes
|
Last Post
|

Comment