OK, so I am kind of new to c#, but have enough 'coding' background to be able to grasp things pretty well.
I tried creating a simple indicator that draws arrows above and below bars that are overbought and oversold. However without the second and statements, the arrows would plot on every bar that was ob or os.
if (RSI(5, 1)[0] >= 80 &&
RSI(5, 1)[1] < 80)
{
DrawArrowDown("My down arrow" + CurrentBar, false, 0, High[0] + 2 * TickSize, Color.Red);
}
// Condition set 2
if (RSI(5, 1)[0] <= 20 &&
RSI(5, 1)[1] > 20)
{
DrawArrowUp("My up arrow" + CurrentBar, false, 0, Low[0] + -2 * TickSize, Color.Lime);
}
// Condition set 2
if (RSI(5, 1)[0] <= 20)
{
DrawArrowUp("My up arrow" + CurrentBar, false, 0, Low[0] + -2 * TickSize, Color.Lime);
}
Asim
Comment