Download MetaTrader 5
To add comments, please log in or register
Find out how to install MetaTrader on Mac OS
Ian Venner
2583
Ian Venner 2014.07.04 00:30  
I was going to say you seem to be going about it the hard way, I would calculate the zones, or whatever the objects represent, in the EA and not draw the actual objects at all.
Roman Zhitnik
1616
Roman Zhitnik 2014.07.04 06:35  
Well, I make the decisions as well taking into account the visual part of these rectangles b'cause it is a MTS yet. A month ago I didn't even know how the mql indi's code looks like so that's good sign that something is working. And thanks again for giving hints.
Roman Zhitnik
1616
Roman Zhitnik 2014.07.08 15:50  

Not to pollute with new threads. For practicing purposes I've written a simple engulf code and trying to make an alert after engulf creation but when I switch TFs and go back to the TF with engulf the window pops up again. So how should that be coded properly to pop up only once?

p.s. code attached if needed. though very simple.

   if(engulfAlerter && Open[2]>Close[2] && Open[1]<Close[1] && Close[1]>Open[2])
      {
         Alert("Bullish Engulf");
      }
   if(engulfAlerter && Open[2]<Close[2] && Open[1]>Close[1] && Close[1]<Open[2])
      {
         Alert("Bearish Engulf");
      }
/ /12
To add comments, please log in or register