(coding newbie - but studying a lot!!)
I am working to change the color of the bar when the price
- Closes Bullish
- Closes Above SMA
- Closes Above Parabolic SAR
[*}Other items, but not necessary to list them
I am running into an issue when I am trying to reference the ParabolicSAR in this indicator.
in the OnBarUpdate() section, I have this written:
if(CurrentBar < smaPeriod) return;
double smaValue = SMA (smaPeriod)[0];
bool sarValue = true;
sarValue = (Close > ParabolicSAR(.02 , .2 , .02)) ;
if ( Close[0] > Open[0]
&& Close[0] > smaValue
&& sarValue)
{
BarColor = Color.Blue;
}
I hope my explanation of what I am trying to do, what I have done, and what my problem is has been clear enough. Could you please let me know what I have done wrong, how to fix it, and any explanation to help fill in the gaps in my learning would be greatly appreciated.
Thank you

Comment