I created the following Strategy as a Test for viewing Text in a Strategy based-on an indicator's color (somewhat common in MetaTrader EA's).
protected override void Initialize()
{
Add(HeikenAshi());
Color BarColor;
CalculateOnBarClose = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Condition set 1
if (BarColor == Color.Red);
{
DrawText("My text" + CurrentBar, "Color=Red", 0, 0, Color.Black);
}
if (BarColor == Color.Lime);
{
DrawText("My text" + CurrentBar, "Color=Green", 0, 0, Color.Black);
Thanks.

Comment