For now I am drawing an extra vertical line if the conditions are right. I know the up and down arrow are on the bottom, 0 line, of the chart.
The arrows did show in the chart above and under the trigger bar, but not now.
This is the code:
/// This method is used to configure the strategy and is called once before any strategy method is called.
/// </summary>
protected override void Initialize()
{
CalculateOnBarClose = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Condition set 1
if (CrossAbove(RSI(5, 3).Avg, 30, 1)
&& CrossAbove(DoubleStochastics(10).K, 15, 2))
{
DrawArrowUp("My up arrow" + CurrentBar, false, 0, High[0] + 2 * TickSize, Color.Lime);
DrawVerticalLine("My vertical line" + CurrentBar, 0, Color.ForestGreen);
}
// Condition set 2
if (CrossBelow(RSI(5, 3).Avg, 70, 1)
&& CrossBelow(DoubleStochastics(10).K, 85, 3))
{
DrawArrowDown("My down arrow" + CurrentBar, false, 0, Low[0] + 2, Color.Red);
DrawVerticalLine("My vertical line" + CurrentBar, 0, Color.Crimson);
}
}
Comment