MQL4 conceptually does not allow user to either touch or query aBarOBJECT.
There are simply no functions to ask in a similar way, like you can ask any other MT4.Graph.anyOtherGuiOBJECT
.
The color settings per se are configurable via a manual GUI-dialogue under [F8] Properties
However, MQL4 can detect indirectly rising up Bullish / falling down Bearish bars:
bool isThisBarBULLISH( int aBarPTR = 0 ){
return ( Close[aBarPTR] > Open[aBarPTR] );
}
bool isThisBarBEARISH( int aBarPTR = 0 ){
return ( Close[aBarPTR] < Open[aBarPTR] );
}
# ||||||||||||||
#
# kindly notice, aBarOBJECT.color has a tri-<state> behaviour:
#
# { aBullish | anIndifferent ( Hammer | ... ) | aBearish }
# ____________________________________________________________________________________