![]() |
|
|||||||
| 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 |
|
|
|
|
|
#2 |
|
Senior Member
|
answered yet another of my own questions tonight..
I forgot to instantiate my class as an object... was access the class directly - DOH! Sorry - going to bed now. |
|
|
|
![]() |
| 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 |