![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Senior Member
Join Date: Dec 2008
Location: Castle Pines, Co
Posts: 621
Thanks: 1
Thanked 2 times in 2 posts
|
I have a data series that contains the difference between two bar numbers.
private DataSeries scalpSeries; I want to use High[scalpSeries[0]] to get the high of the bar back. Compiler says cant convert double to integer .. |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
What are you trying to do with High[]? High[] is a DataSeries containing the high price information of the bars. It is not a function you can pass another DataSeries into.
If you are trying to find the highest value in your DataSeries consider using MAX().
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Dec 2008
Location: Castle Pines, Co
Posts: 621
Thanks: 1
Thanked 2 times in 2 posts
|
I want to find the High[x] x bars back.. My dataseries contains the "x" bars back number, like scalpSeries[1] might return 2, scalpSeries[2] might return 5 etc.
|
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Try casting it as an int.
High[(int) scalpSeries[0]]
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to copy DataSeries to another DataSeries | xewoox | General Programming | 8 | 12-02-2008 07:53 AM |
| need help converting volatility indicator | maestrom | Indicator Development | 1 | 10-29-2008 10:02 AM |
| Converting easy language | chartlearner | General Programming | 11 | 09-23-2008 11:39 AM |
| problems converting a few lines | Burga1 | General Programming | 4 | 12-04-2007 09:17 PM |
| Converting double to int | JangoFolly | General Programming | 8 | 09-11-2007 02:01 PM |