![]() |
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
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
|
I'm creating a function library in my own namespace like so:
Code:
namespace NS {
class cname{
public double func1(DataSeries data) {
// Accessing High, Low, Close data from a DataSeries object
return data.Indicator.High[0];
}
}
}
Code:
OnBarUpdate() {
func1(this); // error
myDataSeries = new DataSeries(this);
func1(myDataSeries); // Error
}
I would think I can pull everything out of the current Dataseries, but I don't know how it's called/named. I'd rather not create a parameter for each price point I might need, because some functions could get ugly in a hurry... (20+ parameters) Thoughts? Thanks |
|
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Passing dataseries to my custom .net dll | zlpele | General Programming | 2 | 03-11-2009 06:21 AM |
| Passing DataSeries to Function | SystemTrading | General Programming | 1 | 12-21-2008 02:50 PM |
| Passing variable | caldolegare | General Programming | 6 | 11-17-2008 09:23 AM |
| Passing period parameter to Add function as a variable | JangoFolly | Strategy Development | 11 | 05-10-2008 04:32 PM |
| Example for passing Time/Date as a Parameter | zoltran | General Programming | 7 | 05-17-2007 09:32 AM |