Here is some of the code:
///<summary>
/// This method is used to configure the indicator and is called once before any bar data is loaded.
///</summary>
protectedoverridevoid Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Upper"));
Add(new Plot(Color.FromKnownColor(KnownColor.Green), PlotStyle.Dot, "Middle"));
Add(new Plot(Color.FromKnownColor(KnownColor.DarkViolet), PlotStyle.Line, "Lower"));
CalculateOnBarClose = true;
Overlay = true;
PriceTypeSupported = true;
}
///<summary>
/// Called on each bar update event (incoming tick)
///</summary>
protectedoverridevoid OnBarUpdate()
{
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
Upper.Set(SMA(Period)(0) + ATR(Period)[0]);
Middle.Set(SMA(Period)(0));
Lower.Set(SMA(Period)(0) - ATR(Period)[0]);
-----------------------------------------------------------
The compile error refers to lines 48,49 and 50:
Upper.Set(SMA(Period)(0) + ATR(Period)[0]);
Middle.Set(SMA(Period)(0));
Lower.Set(SMA(Period)(0) - ATR(Period)[0]);
After attempting a number of solutions, I can't wrap my head around what the problem is. Any help will be appreciated. Thanks.
John
Comment