[Description("The NYSE AMEX and NASDAQ 52 week new high-new low. ")]
public class RC52WN : Indicator
{
#region Variables
// Wizard generated variables
// User defined variables (add any user defined variables below)
#endregion
/// <summary>
/// This method is used to configure the indicator and is called once before any bar data is loaded.
/// </summary>
protected override void Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.DodgerBlue), PlotStyle.Line, "Combo52wn"));
Add(new Line(Color.FromKnownColor(KnownColor.LimeGreen), 100, "Bullishline"));
Add(new Line(Color.FromKnownColor(KnownColor.DarkGray), 0, "Zeroline"));
Add(new Line(Color.FromKnownColor(KnownColor.Magenta), -100, "Bearishline"));
Overlay = false;
CalculateOnBarClose = false;
Add("A52WN", PeriodType.Minute, 5);
Add("Q52WN", PeriodType.Minute, 5);
BarsRequired = 20;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
if (CurrentBars[0] <= BarsRequired || CurrentBars[1] <= BarsRequired || CurrentBars[2] <= BarsRequired)
return;
if (BarsInProgress == 0)
{
double Comboallthree = (Close[0] + Closes[1][0] + Closes[2][0]);
Combo52wn.Set(Comboallthree);
}
}
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Multi Instrument script... problem indicator
Collapse
X
-
Multi Instrument script... problem indicator
I am having a problem getting this indicator to plot. The horizontal lines won't even plot. I must be doing something wrong. I am trying to add together the closing prices of 3 market internals and have it plot as a line. Please see my code below. I have added to the code what I have found in the help file in a step by step fashion for example at first I did not have BarsRequired the CurrentBars check or the BarsInProgress and it did not plot I added these one by one and each step of the way it would not plot. This indicator is being applied to a chart of the NY52WN (JFNT.Z)
HTML Code:Tags: None
-
Please see the log error and instrument manager in the attached image. I have drawn arrows on the image. The error message in circled. The instrument is circled. The exchange in the editor is selected, default also, but it still says "<Select>" in the main Instrument Manager and if you were to click the left arrow to apply it to the default list you would get an error asking for you to select a exchange even though an exchange is selected. I feel this is the problem due to the error message in the log and it seems to be some sort of glich that I have experienced before but did not think to much of it. Please help and let me know if you need further clarification.HTML Code:#region Properties [Browsable(false)] // this line prevents the data series from being displayed in the indicator properties dialog, do not remove [XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove public DataSeries Combo52wn { get { return Values[0]; } } #endregionLast edited by Blash; 05-16-2011, 07:36 AM.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
579 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 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
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment