kate682:
Hi
I have the attached indicator, but have been unable to get hold of the clever programmer.
The indicator will change your chart back ground colour based on the price to open of the
current candle. I have played around with it, but have been unable to make it default to
the daily candle no matter what time frame you are trading. If anyone can point me in
the right direction that would be great.
Regards
Kate
xx
Hi
You can do so:
#property indicator_chart_window int start() { color clr; if ( iClose( NULL, 1440, 0 ) > iOpen( NULL, 1440, 0 ) ) clr = LavenderBlush; else if ( iClose( NULL, 1440, 0 ) < iOpen( NULL, 1440, 0 ) ) clr = AliceBlue; else clr = White; ChartSetInteger( 0, CHART_COLOR_BACKGROUND, clr ); return (0); }
or as:
#property indicator_chart_window int deinit() { ObjectDelete( "lblChgBg" ); return(0); } int start() { color clr; if ( iClose( NULL, 1440, 0 ) > iOpen( NULL, 1440, 0 ) ) clr = LavenderBlush; else if ( iClose( NULL, 1440, 0 ) < iOpen( NULL, 1440, 0 ) ) clr = AliceBlue; else clr = White; if ( ObjectFind( "lblChgBg" ) == -1 ) ObjectCreate( "lblChgBg", OBJ_LABEL, 0, 0, 0 ); ObjectSet ( "lblChgBg", OBJPROP_XDISTANCE, 0 ); ObjectSet ( "lblChgBg", OBJPROP_YDISTANCE, 0 ); ObjectSet ( "lblChgBg", OBJPROP_CORNER, 0 ); ObjectSet ( "lblChgBg", OBJPROP_BACK, true ); ObjectSetText ( "lblChgBg", "ggg", 600, "Webdings", clr ); return (0); }
OK?

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi
I have the attached indicator, but have been unable to get hold of the clever programmer.
The indicator will change your chart back ground colour based on the price to open of the
current candle. I have played around with it, but have been unable to make it default to
the daily candle no matter what time frame you are trading. If anyone can point me in
the right direction that would be great.
Regards
Kate
xx