This is not possible in Ninja Trader 8. Why..?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
DataSeries
Collapse
X
-
DataSeries (now Series<T>) has been completely reworked under the hood. The property you mention was never supported and was not exposed in NT8 as there was not a known use case.
If you can kindly let us know how/why you were using that we can either provide a workaround, or we can revisit with our development team if this property should be available again in NT8MatthewNinjaTrader Product Management
-
DataSeries
I have a different kind of requirement where the condition is evaluated at runtime. For this scenario, I cannot hard code or provide condition while creating my own indicator. For example, the below condition will not be given in Indicator class and is not compiled in advance.
SMA(14)[0][0] > SMA(21)[0][0] and (CCI(10)[0][0] < CCI(20)[0][0] or Bollinger(2,14)[0][0] > High[0])
In my application, there is a textbox, where the user can type the above condition. I evaluate this expression at runtime using Reflection. Therefore, SMA, CCI or Bollinger(whatever the user selects) will be stored in DataSeries variable and compared with each other(in NinjaTrader 7).
For example, it works in a loop. In loop's first iteration, DataSeries variable holds the first condition(SMA(14)[0][0] > SMA(21)[0][0])
DataSeries ds1; // Holds SMA(14)
DataSeries ds2; // Holds SMA(21)
In code, I evaluate expression like below
if(ds1.Indicator.Values[0][0] > ds2.Indicator.Values[0][0])
{
return true;
}
Next, in the loop's second iteration, as like the above, CCI will be compared and the third iteration, Bollinger values will be compared.
Is there an equivalent type for DataSeries in NT8 that could hold the information of Indicator a runtime? How do I also decide the Plot and LookBackPeriod at runtime?
Comment
-
Thanks for your clarification, however I'm not sure why you would need a data series for this project. If you do not know the indicator type on complication, you can just use a generic Indicator object
Code:Indicator indicator1; Indicator indicator2;
Code:indicator1 = SMA(20); indicator2 = CCI(20);
Code:if(indicator1[0] > indicator2[0]) { return true; }
MatthewNinjaTrader Product Management
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by casabella, Today, 04:12 AM
|
0 responses
10 views
0 likes
|
Last Post
by casabella
Today, 04:12 AM
|
||
Started by Ludwik, Today, 03:52 AM
|
0 responses
7 views
0 likes
|
Last Post
by Ludwik
Today, 03:52 AM
|
||
Started by wuannetraam, Today, 02:40 AM
|
0 responses
10 views
0 likes
|
Last Post
by wuannetraam
Today, 02:40 AM
|
||
Started by cyberpete76, 03-27-2023, 12:29 AM
|
7 responses
272 views
1 like
|
Last Post
by slightly
Today, 01:47 AM
|
||
Started by renewsaltwater, Today, 01:15 AM
|
0 responses
4 views
0 likes
|
Last Post Today, 01:15 AM |
Comment