Download MetaTrader 5

object create

To add comments, please log in or register
hayseed
138
hayseed  

i'm sure you've all seen the monitor type indicators that monitor various indicators on multiple time frames in the same indicator window..... so in a quick glance we can see if the macd is positive , stoch is rising and so on, on all time frames......

i'm trying to improve the look of my version.... presently the monitor just returns text in color.... buy sell for each labeled time frame..... you've probably seen this style......

so this is the macd component.....

if (macd > macdsig && macd2 < macdsig2) {macdbuy= "buy";}

here's my delima..... instead of text i would prefer either a small rectangle or a solid bar....

now i can change the "buy" to "-"

if (macd > macdsig && macd2 < macdsig2) {macdbuy= "-";}

that returns - which is a nickel and dime way of obtaining a bar/rectangle... and of course "=" is closer.....

can someone think of a way to code a rectangle which can be called..... the rest of the code will place the rectangle in the correct location and proper color..... i've googled the code to death and can't seem to find anything......

or can you think of an indicator in mq4 form that contains a rectangle....

i'll post the completed indicator in mq4 form when complete, which should allow everyone to customize it to their liking...... thanks......h

-------------------------

ObjectSetText("signal4",StringSubstr(macdbuy,0),12, "Veranda Bold", Lime);

ObjectSet("signal4", OBJPROP_CORNER, 0);

ObjectSet("signal4", OBJPROP_XDISTANCE, 210);

ObjectSet("signal4", OBJPROP_YDISTANCE, 15);

----------------------------

To add comments, please log in or register