Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How do you write an indicator that is based on values from another indicator?
Collapse
X
-
How do you write an indicator that is based on values from another indicator?
I have an indicator that plots 5 lines on a chart and I would like to write up a custom indicator that reads the values of the lines from the other indicator. I do not know how to go about this. Can someone please explain how I can achieve this and if there is any code samples you know of that I can use for reference, I'd be glad if you could point them out to me. Many thanks. -
Hello mbesha,
Thank you for your note.
You could use Streamwriter to write the values of those plots to a file then in another indicator you could use streamreader to read the values from the file.
Below are some reference samples which demonstrate how this could be done,
Stream Reader,
Stream Writer,
Another Stream Reader Example,
Please let us know if you need further assistance.Alan P.NinjaTrader Customer Service
-
Are you plotting lines or are you drawing them? In all NT, "Plots" are different from "Lines".Originally posted by mbesha View PostI have an indicator that plots 5 lines on a chart and I would like to write up a custom indicator that reads the values of the lines from the other indicator. I do not know how to go about this. Can someone please explain how I can achieve this and if there is any code samples you know of that I can use for reference, I'd be glad if you could point them out to me. Many thanks.
Comment
-
If they are Plots then you access them using the standard method already provided. Essentially you are talking of hosting one indicator in another. How to access the objects in the hosted indicator from the hosting indicator are illustrated in this example that you can use as a guide.Originally posted by mbesha View PostI am plotting them.
ref: https://ninjatrader.com/support/help...lots_are_v.htm
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
560 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
325 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
547 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
547 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment