Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Accessing User Parameters
Collapse
X
-
Accessing User Parameters
I want to color price bars based on the value of the RSI. How should I construct the test to see if the value of the RSI is above or below the parameters the user selected for the upper and lower values? What variables hold the user selections for upper and lower parameters?Tags: None
-
Which Variable to Reference?
This is the variables section -
Code:#region Variables private DataSeries avgUp; private DataSeries avgDown; private DataSeries down; private int period = 14; private int smooth = 3; private DataSeries up; #endregion
This is the properties section -
Code:#region Properties /// <summary> /// </summary> [Browsable(false)] [XmlIgnore()] public DataSeries Avg { get { return Values[1]; } } /// <summary> /// </summary> [Browsable(false)] [XmlIgnore()] public DataSeries Default { get { return Values[0]; } } /// <summary> /// </summary> [Description("Numbers of bars used for calculations")] [Category("Parameters")] public int Period { get { return period; } set { period = Math.Max(2, value); } } /// <summary> /// </summary> [Description("Number of bars for smoothing")] [Category("Parameters")] public int Smooth { get { return smooth; } set { smooth = Math.Max(1, value); } } #endregion
The RSI has two lines being drawn. The user can specify values for both the upper and lower lines. A gif of the settings that can be specifed by the user is attached.
What variables would hold the value specified by the user for the upper and lower lines? What code would I use to test if the value of the RSI was above or below each of those two user specfied values.
if RSI > ????????
or if RSI <= ??????????
Thanks
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by PaulMohn, Today, 03:49 AM
|
0 responses
3 views
0 likes
|
Last Post
by PaulMohn
Today, 03:49 AM
|
||
Started by inanazsocial, Today, 01:15 AM
|
1 response
7 views
0 likes
|
Last Post Today, 02:18 AM | ||
Started by rocketman7, Today, 02:12 AM
|
0 responses
10 views
0 likes
|
Last Post
by rocketman7
Today, 02:12 AM
|
||
Started by dustydbayer, Today, 01:59 AM
|
0 responses
2 views
0 likes
|
Last Post
by dustydbayer
Today, 01:59 AM
|
||
Started by trilliantrader, 04-18-2024, 08:16 AM
|
5 responses
23 views
0 likes
|
Last Post Today, 12:32 AM |
Comment