Are any methods available for manipulating Price /Time/Volume series? More specifically,can a binary search be performed on them? Please advise. Thank you.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
ISeries Methods
Collapse
X
-
Hello,
Thank you for the post.
Regarding a binary search, this is not something NinjaTrader specifically has but is likely possible to create using NinjaScript. C# List objects have a binary search method which could be used on a custom set of data: https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx
I look forward to being of further assistance.
-
Thanks Jesse,
I am aware that NinjaScript does not implement Binary Search. The question really becomes whether it is possible to cast the ISeries objects that NinjaScript implements to a list or an array so that we can perform a Binary Search on them. Can you please let me know if there is a way to convert a NinjaScript ISeries to a list or an array?
Comment
-
Hello,
There is not a direct conversion method to List from Series but you could certainly populate a list with data from a series while a script is running. One idea would be using OnBarUpdate to populate the list with close values for each closed bar.
As series works differently than a List any use of List would need to be custom coded for your use. A series uses BarsAgo where a List would use an Index location which is the reverse of BarsAgo. You would likely need to either populate a list for each bar closed or write your own loop to iterate over a series and form the list as needed.
I look forward to being of further assistance.
Comment
-
Thanks for the info Jesse. In fact that is exactly what I ended up doing but I thought I'd check just in case there was something already implemented.
I think that it would be a good idea if NT could provide a mechanism for converting an ISeries to an ordered List or an array. Just a thought. Thanks for your input.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
28 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
20 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
183 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
336 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
260 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|

Comment