I built an indicator, but I want to copy and paste the entire script into a strategy instead of adding the indicator as a private variable in the public class scope of the strategy. Is this possible?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Paste indictor script in Strategy
Collapse
X
-
Paste indictor script in Strategy
Good morning,
I built an indicator, but I want to copy and paste the entire script into a strategy instead of adding the indicator as a private variable in the public class scope of the strategy. Is this possible?Tags: None
-
AdeptistJune I do not think you really want to copy your code from an indicator to a strategy what you want to do is leverage your indicator in a strategy they will get out of sync quickly
Ninja Documentation
search AddChartIndicator()
Take the case of having an indicator with a name of IndicatorName
Create a reference to it
indicator named: MyIndicator
strategy named: MyStrategy
Under Public Class MyClass
private IndicatorNameMyIndicator;
under else if (State == State.DataLoaded)
MyIndicator = InicatorName(Period,StopTicks,Risk_Planned);
MyIndicator.Panel=2;
AddChartIndicator(MyIndicator);
In onBarUpdate
MyIndicator.Monitored_item[0]
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
88 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
134 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
68 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
119 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
69 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment