Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Using plots from a seprate indicator (no code access)
Collapse
X
-
Using plots from a seprate indicator (no code access)
I'm building an indicator (my indicator) that needs to look at another indicator's signals (3rd party indicator) as part of a signal bar criteria. I know that the 3rd party indicator plots their signals, I know their values as well. Can this be done in "my indicator" and not use a ninjatrader strategy to accomplish this. What is the best way to do this. Please include sample code if possible. Thanks in advance!Tags: None
-
Possibly if you can initialize their indicator in code.
Code:namespace NinjaTrader.NinjaScript.Indicators { public class MyIndicator : Indicator { private OtherIndicator Other; protected override void OnStateChange() { if (State == State.SetDefaults) { Description = @"Enter the description for your new custom Indicator here."; Name = "MyIndicator"; Calculate = Calculate.OnBarClose; IsOverlay = false; DisplayInDataBox = true; DrawOnPricePanel = true; DrawHorizontalGridLines = true; DrawVerticalGridLines = true; PaintPriceMarkers = true; ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right; //Disable this property if your indicator requires custom values that cumulate with each new market data event. //See Help Guide for additional information. IsSuspendedWhileInactive = true; } else if (State == State.DataLoaded) { Other = OtherIndicator(); } } protected override void OnBarUpdate() { double otherData = Other[0]; // Do something with otherData } } }
- Likes 1
-
Hello ekansbull,
Thank you for your post.
zundradaniel is correct. This is basically how you can reference another indicator in code. More specific code can't be provided since the indicator you want to reference is closed-source.
If you're not able to figure it out, we recommend reaching out to the developer for assistance on how to reference their indicator from within your own script.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
601 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
347 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 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
559 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
558 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment