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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
156 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
90 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
140 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
130 views
1 like
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
107 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment