Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Edit @Indicator
Collapse
X
-
Tags: None
-
Hello wbennettjr,
Thank you for writing in. You should not be modifying the @Indicator.cs file. Could you please let me know why you are trying to open it in the editor? If you need a partial class, you will want to write a partial class and place it in the Add Ons folder (to prevent the NinjaScript generated code from triggering).
Thank you in advance.Michael M.NinjaTrader Quality Assurance
-
In NT7, I modified UserDefinedMethods to add properties and methods that I wanted available on all indicators. If I understand correctly, you're saying this should work if I add these properties and methods in a partial Indicator class in the Add Ons folder?
Comment
-
Hello wbennettjr,
This is correct. By placing the file inside the AddOns folder, it will not automatically generate the NinjaScript code like what would happen if you placed it inside the Indicators or Strategies folder. For example:
Code:namespace NinjaTrader.NinjaScript.Indicators { partial class MyClass : Indicator { public void doSomething() { } } }
Michael M.NinjaTrader Quality Assurance
Comment
-
That's not exactly what I needed. What I want is:
Code:public partial class [B][COLOR=blue]Indicator[/COLOR][/B] : IndicatorRenderBase { public int SomeValue { get; set; } public void SomeMethod() { } }
Thanks!
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Net Change
by Segwin
Started by Segwin, 05-07-2018, 02:15 PM
|
14 responses
1,788 views
0 likes
|
Last Post
by aligator
Today, 11:47 AM
|
||
Started by Jimmyk, 01-26-2018, 05:19 AM
|
6 responses
837 views
0 likes
|
Last Post
by emuns
Today, 11:27 AM
|
||
Started by jxs_xrj, 01-12-2020, 09:49 AM
|
6 responses
3,293 views
1 like
|
Last Post
by jgualdronc
Today, 10:56 AM
|
||
Started by Touch-Ups, Today, 10:36 AM
|
0 responses
13 views
0 likes
|
Last Post
by Touch-Ups
Today, 10:36 AM
|
||
Started by geddyisodin, 04-25-2024, 05:20 AM
|
11 responses
62 views
0 likes
|
Last Post Today, 10:08 AM |
Comment