I am new to this and I am trying to understand how the indicators work in code.
If I have a chart open, with an EMA (Close, 13) and an SMA(Close 20), I am trying to programatically determine with they cross with my own indicator (so I have a total of three indicators on the chart.) This is the code I wrote in my custom indicator which does not seem to work:
if (CrossAbove(EMA(Close, 13), SMA(Close, 20), 1))
{
DrawArrowUp("UpArrow", 0, High[0] + TickSize, Color.LimeGreen);
}
So when your indicators cross, my code does not seem to place the arrow anywhere close to where your indicators show the crossover. Which of these arguments do I have wrong and do not understand?
Thanks so much!
Michael
Comment