I have looked but cannot find an example.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Accessing an indicator plot value
Collapse
X
-
Accessing an indicator plot value
I want to build a strategy which reads a plot value from a custom indicator. I have no source for the indicator. Besides plotting, the value also shows in the data box.
I have looked but cannot find an example.Tags: None
-
Hello,
If you can see the plot you can likely access the plot by its name from a strategy. A simple example is how the Bollinger indicator works, you can use this as a source example of how to expose values as well.
In a strategy to access the Lower plot of the Bollinger you would use the following syntax:
This is likely the same with the custom indicator, look at the plot name and the indicator name. In the NinjaScript editor type the indicator name:Code:Bollinger(2,12).Lower[0]
When you press the Open parenthesis it should prompt you on what is required, fill in the parameters and close the parenthesis )Code:Bollinger(
Now type a period and the Plot name followed by a [0] to access the Current bars value.:Code:Bollinger(2,12)
Try this and let me know if this does not work.Code:Bollinger(2,12).Lower[0]
I look forward to being of further assistance.
-
Your example worked as expected.
However, the actual indicator has 20 arguments and I have been unable to figure out what should be entered. I do get some very interesting syntax errors.
All I have to work with is the parameter specification at the top of a chart, and the values in the indicator window. The indicator itself is encrypted by the vendor and not available to me.
Alternatively, the value I want is displayed in the data box, and If I could just read its value
Comment
-
Hello ninjaGeorge,
Jesse has provided the officially supported way that you would go about this. For your specific scenario I would recommend contacting the vendor directly and asking them if the variable you are looking to use is exposed or not and if it is, what its' name is so you can access it via code.
We do not have enough information on our end to investigate further unfortunately.
Please let me know if you have any questions.Michael M.NinjaTrader Quality Assurance
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
85 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
48 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
29 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
32 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
67 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment