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
Can't get Indicator Values in Strategy Builder
Collapse
X
-
Can't get Indicator Values in Strategy Builder
Hi, I'm trying to use the attached Wave Trend indicator in my strategy. But I can't get the values of the WTFast and WTSlow Plot from the indicator to do comparison. What do I need to add to the indicator script to be able to get this values to use?Tags: None
- Likes 1
-
Hello tjendra,
Are you adding the indicator directly to a chart and the WTFast plot and WTSlow plot are not appearing?
Or are you finding there isn't a public series to return Values[0] and Values[1]?
You can use directly use Values[0] and [1] from a hosted indicator.
For example:
Print(WaveTrendV2(10, 21).Values[0][0]);
Or you could add public series to return the plot series similar to the MACD indicator in the Properties region.Chelsea B.NinjaTrader Customer Service
-
I am trying to use the values in a strategy so I should add public series to return the plot series similar to the MACD indicator in the Properties region? Is it I just add this bottom code to the indicator and recompile?
[Browsable(false)]
[XmlIgnore]
public Series<double> Avg
{
get { return Values[1]; }
}
[Browsable(false)]
[XmlIgnore]
public Series<double> Default
{
get { return Values[0]; }
}
[Range(1, int.MaxValue), NinjaScriptProperty]
[Display(ResourceType = typeof(Custom.Resource), Name = "WTFast", GroupName = "NinjaScriptParameters", Order = 0)]
public int WTFast
{ get; set; }
[Range(1, int.MaxValue), NinjaScriptProperty]
[Display(ResourceType = typeof(Custom.Resource), Name = "WTSlow", GroupName = "NinjaScriptParameters", Order = 1)]
public int WTSlow
{ get; set; }
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by judysamnt7, 03-13-2023, 09:11 AM
|
4 responses
59 views
0 likes
|
Last Post
by DynamicTest
Today, 08:25 PM
|
||
Started by ScottWalsh, Today, 06:52 PM
|
4 responses
36 views
0 likes
|
Last Post
by ScottWalsh
Today, 07:40 PM
|
||
Started by olisav57, Today, 07:39 PM
|
0 responses
7 views
0 likes
|
Last Post
by olisav57
Today, 07:39 PM
|
||
Started by trilliantrader, Today, 03:01 PM
|
2 responses
21 views
0 likes
|
Last Post
by helpwanted
Today, 07:25 PM
|
||
Started by cre8able, Today, 07:24 PM
|
0 responses
10 views
0 likes
|
Last Post
by cre8able
Today, 07:24 PM
|
Comment