// This namespace holds all indicators and is required. Do not change it.
namespace NinjaTrader.Indicator
{
///<summary>
/// Plot up/down marker at CCI -100 and 100
///</summary>
[Description("Paint up/down marker at CCI -100 and 100")]
publicclass CCI100Marker : Indicator
{
#region Variables
// Wizard generated variables
privatebool inputdownt0 = true; // Default setting for Inputdownt0
privatebool inputup1 = true; // Default setting for Inputup1
// 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>
protectedoverridevoid Initialize()
{
Add (new Plot(Color.FromKnownColor(KnownColor.Red), PlotStyle.Line,"Plotdown0"));
CalculateOnBarClose = true;
Overlay = true;
PriceTypeSupported = false;
Add (new Plot(Color.FromKnownColor(KnownColor.Lime), PlotStyle.Line,"Plotup1"));
CalculateOnBarClose = true;
Overlay = true;
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.
Plotdown0.Set(Close[0]);
Plotup1.Set(Close[0]);
}
if (WoodiesCCI(2, 5, 14, 34, 25, 6, 60, 100, 2).ChopZone[0] >= 100)
{
DrawTriangleDown("My triangle down" + CurrentBar, true, 0, 0, Color.Red);
}
// Condition set 2
if (WoodiesCCI(2, 5, 14, 34, 25, 6, 60, 100, 2).ChopZone[0] <= -100)
{
DrawTriangleUp("My triangle up" + CurrentBar, true, 0, 0, Color.Lime);
}
PriceTypeSupported = false;
I am stuck. Please help!
Thanks!
J
Comment