I have a “simple” indicator that will plot “B” and “S” When the moving average over CCI is crossed.
The signal works fine ONLY ON ONE INSTRUMENT! (6E)
When I switch instruments it will not plot.
Also, is there a way to may the "B" and "S" font size bigger when it plots?
Please help…. In layman’s terminology.
Thanks.
J
protectedoverridevoid Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
Overlay = true;
}
///<summary>
/// Called on each bar update event (incoming tick)
///</summary>
protectedoverridevoid OnBarUpdate()
{
// Condition set 1
if (CrossBelow(SMA(CCI(14), 20), CCI(14), 1))
{
DrawText("My text" + CurrentBar, "B", (int) (Close[0]), Low[0]+ -6 * TickSize, Color.DarkGreen);
}
if (CrossAbove(SMA(CCI(14), 20), CCI(14), 1))
{
DrawText("My text" + CurrentBar, "S", (int) (Close[0]), High[0] + 6 * TickSize, Color.Red);
}
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
// Plot0.Set(Close[0]);
}
Comment