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
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
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
-
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 ghoul, Today, 06:02 PM
|
2 responses
12 views
0 likes
|
Last Post
by ghoul
Today, 06:36 PM
|
||
Started by jeronymite, 04-12-2024, 04:26 PM
|
3 responses
44 views
0 likes
|
Last Post
by jeronymite
Yesterday, 10:10 PM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
7 responses
20 views
0 likes
|
Last Post Today, 06:16 PM | ||
Started by AttiM, 02-14-2024, 05:20 PM
|
10 responses
180 views
0 likes
|
Last Post
by jeronymite
Today, 06:11 PM
|
||
Started by DanielSanMartin, Yesterday, 02:37 PM
|
2 responses
13 views
0 likes
|
Last Post Today, 05:26 PM |
Comment