congamike
New member
New member question about stacking elses
This:
AssignBackgroundColor(if (MACDH > 0 and close > sma)
then GlobalColor("above")
else GlobalColor("below"));
mostly works. Sadly, there is a third condition I want to trap but can't seem to describe it in TOS.
I tried breaking it up into two AssignBackgroundColor statements, but that crashes.
I want no color assigned in that awkward period when MACDH is up and sma is down (or vice versa). For this I need a third condition which would be a second 'else' layer (no?).
Help? Thanks.
This:
AssignBackgroundColor(if (MACDH > 0 and close > sma)
then GlobalColor("above")
else GlobalColor("below"));
mostly works. Sadly, there is a third condition I want to trap but can't seem to describe it in TOS.
I tried breaking it up into two AssignBackgroundColor statements, but that crashes.
I want no color assigned in that awkward period when MACDH is up and sma is down (or vice versa). For this I need a third condition which would be a second 'else' layer (no?).
Help? Thanks.