Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
List of doubles/floats in parameter menu
Collapse
X
-
To do that you would create a listbox control.Originally posted by ivb73077 View PostPatrick,
This is a completely viable solution that I can readily implement. Thank you.
For my own understanding, is there a way to have the actual list/array of doubles appear in the parameter list? I had tried creating an array of doubles, but the field gets populated with "double[] arrayName" which, when expanded, reveals the elements of the array.
Leave a comment:
-
Fair enough. Thank you for the solution you proposed earlier. It is sufficient for my needs.
Leave a comment:
-
Hello ivb73077,
I do not believe that is possible, but I could be wrong on this.
Leave a comment:
-
Patrick,
This is a completely viable solution that I can readily implement. Thank you.
For my own understanding, is there a way to have the actual list/array of doubles appear in the parameter list? I had tried creating an array of doubles, but the field gets populated with "double[] arrayName" which, when expanded, reveals the elements of the array.
Leave a comment:
-
Hello ivb73077,
Thank you for your post.
Define the cases in the enum as strings:
Then when you call the actual cases in the switch, assign the actual value:Code:public enum MyDouble { One, Two, Three, Four, // etc. }
...Code:#region Variables private MyDouble myDbl = MyDouble.One; private double result = 0; #endregion
Code:protected override void OnBarUpdate() { switch (myDbl) { case MyDouble.One: { result = 1; break; } case MyDouble.Two: { result = 2; break; } case MyDouble.Three: { result = 3; break; } case MyDouble.Four: { result = 4; break; } } }
Leave a comment:
-
List of doubles/floats in parameter menu
Hello,
I would like to add a drop-down list of double values from which a user can select. Ordinarily, I would simply create an enum, but cannot do this with double data types.
Is there any way to have a "list" of doubles appear in the parameter menu? I am probably overlooking a simple solution to this problem.
Thank you.Tags: None
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
152 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
87 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
131 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
127 views
1 like
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
106 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Leave a comment: