Download MetaTrader 5

Return shift by...? - page 2

To add comments, please log in or register
Ian Venner
2584
Ian Venner  
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
1975
Roman Zhitnik  
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
1975
Roman Zhitnik  

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