[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
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
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
-
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]; } } #endregion
Last edited by Blash; 05-16-2011, 07:36 AM.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Vikuno1, 11-28-2023, 11:42 PM
|
15 responses
357 views
1 like
|
Last Post
by PaulMohn
Today, 12:45 AM
|
||
Started by PaulMohn, Yesterday, 02:06 AM
|
3 responses
12 views
0 likes
|
Last Post
by PaulMohn
Today, 12:33 AM
|
||
Started by gertrudeabrams, Today, 12:33 AM
|
0 responses
3 views
0 likes
|
Last Post Today, 12:33 AM | ||
Started by NJA_MC, 01-03-2021, 10:34 PM
|
11 responses
150 views
0 likes
|
Last Post
by wzgy0920
Today, 12:14 AM
|
||
Started by sidlercom80, 10-28-2023, 08:49 AM
|
173 responses
2,367 views
0 likes
|
Last Post
by jeronymite
Yesterday, 11:20 PM
|
Comment