I have two MA's crossing and I want to fill the region between them. I am using DrawRegion.
Problem is defining the 'int startBarsAgo' & 'int endBarsAgo'.
When the fast ma crosses above the slow ma is the start of the region to be shaded and when the fast ma crosses below the slow ma is the end of the shaded region. The region obviously being between the two ma's.
Here's the line - DrawRegion("Long zone", CurrentBar, 0, Sma1, Sma2, Color.Empty, shadelong, opacity);
Do I need to state something earlier like CrossAbove(fastma, slowma) = startbar etc and then use the startbar for startBarsAgo?
How do I get it to leave one region painted one color eg red for short then when the ma's cross in the opposite direction paint the next region say green. Would this be 'CurrentBar.ToString ()'? I want it to paint as the bars are formed.
Any examples anyone can point me to please.
Ben
Comment