/// Enter the description of your new custom indicator here
///</summary>
[Description("Enter the description of your new custom indicator here")]
publicclass MACDHILO : Indicator
{
Variables
///<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.Red), PlotStyle.Dot, "PlotLo"));
Add(new Plot(Color.FromKnownColor(KnownColor.Lime), PlotStyle.Dot, "PlotHi"));
CalculateOnBarClose = false;
Overlay = false;
PriceTypeSupported = false;
}
///<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.
PlotLo.Set(MACD(8, 17, 9)[0] < MACD(8, 17, 9)[1]);
PlotHi.Set(MACD(8, 17, 9)[0] > MACD(8, 17, 9)[1]);
}
Properties
Thank you
Jim
Comment