CurrentValue = MyIndicator()[0];
CurrentValue = MyIndicator(a, b, c)[0];
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Indicator Overloading
Collapse
X
-
Indicator Overloading
I have an indicator with an unusually large number of input parameters having to do with things that will be irrelevant when called from a strategy. Is it possible to create one or more overloads with a public partial class so the indicator can be alternatively called without passing parameters or with only some small specified subset, like shown below, without interfering with NT 8's internal processing?
Code:Tags: None
-
Hello caveat_lector,
Thanks for your post.
This would not be something that would be 100% supported, but you could try creating your own partial classes similar to what you see generated in the NinjaScript Generated Code section of an indicator.
There may be issue taking this approach that we could not assist with, but if it works for your needs, great!
If you have any new inquiries, please do not hesitate to open a new ticket.Attached Files
-
-
For others who may be interested in this, I had no difficulty whatsoever making it work. However, unless your memory is better than mine, if you do this you probably should leave yourself remarks in the code to avoid wasting time figuring out why some simple future change "broke" your code.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by SalmaTrader, 07-07-2026, 10:26 PM
|
0 responses
35 views
0 likes
|
Last Post
by SalmaTrader
07-07-2026, 10:26 PM
|
||
|
Started by CarlTrading, 07-05-2026, 01:16 PM
|
0 responses
20 views
0 likes
|
Last Post
by CarlTrading
07-05-2026, 01:16 PM
|
||
|
Started by CaptainJack, 06-17-2026, 10:32 AM
|
0 responses
12 views
0 likes
|
Last Post
by CaptainJack
06-17-2026, 10:32 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:15 AM
|
0 responses
18 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:15 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:06 AM
|
0 responses
20 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:06 AM
|

Comment