Does anyone know if there is any way to set the PriceType default value in NT 7? Currently the PriceType defaults to Close. I would like to set it to something other than Close, say Median, yet still allow the user the option to change it. I have searched the forum and have not found any information on this. Thank you.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Default PriceType
Collapse
X
-
Default PriceType
Hi,
Does anyone know if there is any way to set the PriceType default value in NT 7? Currently the PriceType defaults to Close. I would like to set it to something other than Close, say Median, yet still allow the user the option to change it. I have searched the forum and have not found any information on this. Thank you.Tags: None
-
Hi Ryan,
Thank you for your reply but I don't think that this will do what I need. First, I want the PriceType to apply to the Imput Data series, not any specific plot. Second, if I code the PriceType in the Initialize() as suggested, the user will never be able to change it,- it will always reset to the coded value. I would like to change the default PriceType for the Input Data series and still give the user the option to change it. So, I want the same behaviour we have now, except I want to change the PriceType default value from Close to Median.
Comment
-
Attached is a sample that shows how this works, which matches your description as far as I can tell.Attached FilesLast edited by NinjaTrader_RyanM1; 03-15-2011, 10:28 AM.Ryan M.NinjaTrader Customer Service
Comment
-
Hi Ryan,
Thank you very much, I really appreciate this.
I have two quick questions if I may:
1. The code states:
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
Plot0.Set(Input[0]);
What Close[0] are you referring to in here?
2. On a sligtly different, yet related note, if I wanted to say multiply the INput series values by 3, would I use the same program construct? For example, replace
Plot0.Set(Input[0]);
with
Plot0.Set(3*Input[0]);
How would I access these new values elsewhere in the program?
Thank you for your help. It is much appreciated.
Comment
-
Thanks for the reply. It does look like you are locked into the selection specified in Initialize() method for PriceType. Unfortunately there is currently no way to assign a default and allow user to change.
You can make a new data series for your input. This sample can help with custom data series.
#region Variables
private DataSeries myDataSeries;
#endregion
protected override void Initialize()
{
myDataSeries = new DataSeries (this);
}
protected override void OnBarUpdate()
{
myDataSeries.Set(Input[0] * 3);
}
I also removed comments in the sample if they were confusing to you. Those are the standard comments that come whenever you create a new indicator.Ryan M.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
649 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
370 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
109 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
574 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
576 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment