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 trilliantrader, 04-18-2024, 08:16 AM
|
5 responses
22 views
0 likes
|
Last Post Today, 12:32 AM | ||
Started by Davidtowleii, Today, 12:15 AM
|
0 responses
3 views
0 likes
|
Last Post
by Davidtowleii
Today, 12:15 AM
|
||
Started by guillembm, Yesterday, 11:25 AM
|
2 responses
9 views
0 likes
|
Last Post
by guillembm
Yesterday, 11:58 PM
|
||
Started by junkone, 04-21-2024, 07:17 AM
|
9 responses
68 views
0 likes
|
Last Post
by jeronymite
Yesterday, 11:51 PM
|
||
Started by mgco4you, Yesterday, 09:46 PM
|
1 response
12 views
0 likes
|
Last Post Yesterday, 09:56 PM |
Leave a comment: