Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
How to pass Primary DataSeries to Custom Method
Collapse
X
-
Hello aventeren,
The message you got is likely because you have your method set to accept a parameter.
Try removing this.
-
When I attempt to not pass a DataSeries to myMethod by doing this:
Code:myMethod();
I then go back to trying to pass myMethod the Close DataSeries by doing this:
Code:myMethod(Close);
Leave a comment:
-
Hello aventeren,
The custom method will use which ever data series you call.
Have you given this a test?
Leave a comment:
-
Originally posted by NinjaTrader_ChelseaB View PostHi aventeren,
You may not need to pass the series.
Have you tried printing the close of the current bar in the custom method without passing the data series?
For example:
protected void myMethod()
{
Print(Close[0]);
}
Leave a comment:
-
Hi aventeren,
You may not need to pass the series.
Have you tried printing the close of the current bar in the custom method without passing the data series?
For example:
protected void myMethod()
{
Print(Close[0]);
}
Leave a comment:
-
How to pass Primary DataSeries to Custom Method
Hello--
I have created a secondary DataSeries (let's call it myDataSeries) and a custom Method that take a DataSeries as one of the parameters (let's call it myMethod(Dataseries targetDataSeries)).
Some times I want to pass myDataSeries into myMethod by doing this:
Code:myMethod(myDataSeries);
Code:myMethod(Close);
Thanks,
AventerenTags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by mly916, Today, 09:48 PM
|
0 responses
10 views
0 likes
|
Last Post
by mly916
Today, 09:48 PM
|
||
Started by Mikey_, Today, 09:21 PM
|
0 responses
11 views
0 likes
|
Last Post
by Mikey_
Today, 09:21 PM
|
||
Started by cre8able, Today, 05:53 PM
|
3 responses
13 views
0 likes
|
Last Post
by cre8able
Today, 09:20 PM
|
||
Started by Aryan Kumar, Today, 09:04 PM
|
0 responses
4 views
0 likes
|
Last Post
by Aryan Kumar
Today, 09:04 PM
|
||
Started by yertle, Yesterday, 05:49 PM
|
3 responses
16 views
0 likes
|
Last Post
by Mindset
Today, 08:38 PM
|
Leave a comment: