Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
NT7 Forum Indicators
Collapse
X
-
Hi p_mid,
I see, to clarify, Input[0] refers to something different. Accessing Input[0] is only useful when using PriceType. When you are not using PriceType, Close[0] and Input[0] show the same information by default.
More info at - http://www.ninjatrader-support.com/H...ide.html?Input
and - http://www.ninjatrader-support.com/H...html?PriceType
If you want to access the close of your dataseries, you would use myDataSeries[0], this will get you the close of the the original dataseries.
If you want to pass in the close price of the dataseries to another indicator from the Indicator GUI, you can do what I mentioned in post #11.Last edited by NinjaTrader_Tim; 04-21-2010, 09:47 AM.TimNinjaTrader Customer Service
Comment
-
Sorry,
but this seems to take me far from what I'm trying to accomplish: myDataSeries should be assigned a DataSeries defined in code, not an user parameter).
I just want to write an indicator which, when added to a graph containing a dataseries, takes the prices of the dataseries, and adds the value of an indicator defined by the user as a parameter in its Data/Input Series field.
So, Data/Input Series will be, e.g., SMA(RIMM (Daily),14), and the code would look like this:
protected override void OnBarUpdate()
{
...
double userIndicatorValue = Input[0]; // <<-- this will contain the user indicator value defined as a parameter (e.g. SMA(20))
double originalDataSeriesValue = ??; // how do I retrieve this?
Plot0.Set(userIndicatorValue + originalDataSeriesValue);
...
}
Very simple, but I just can't figure out how to retrieve the original dataseries value.
I hope to have been able to clarify what I'm trying to obtain: the SMA(), or any other indicator to be added to the original dataseries, must not be defined in code, but must be a parameter entered by the user.
Regards,
Paolo
Comment
-
Hi p_mid,
Unfortunately that is not how the value Input[0] works, please see my previous response.
If you want to create a user-defined series, that will be added to your series. You can create enums that contain the series you wish to select from (for example, SMA values).
More info at - http://www.ninjatrader-support2.com/...ead.php?t=3420TimNinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
579 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|


Comment