Adding alert to Indicator

 
Hello everyone - sorry my first post is one asking for help!

There is an indicator that I would like to add a simple alert to (for trading manually). 2 lines are drawn on the chart, and all I want is an alert when the current price either goes above 1 line, or below the other line.

I know very little about mql, but in my naivety I thought it would be simple...

So I started off just by trying to get an alert in one direction (figuring I could add an 'or' argument in once I had this working):

if(Close[0]>g_ibuf_100)
Alert("Short");

--I couldn't figure out the right syntax for current price rather than close...--

But (quite predictably) it doesn't work :(

Any pointers would be great!
 
Hi toast,

the current price for the current pair is in Bid (or Ask), so you could use:

if ( Bid > g_ibuf_100 ) Alert("Short");

Hope the above helps!

thank you
Automated
--
grid trading EA:
http://www.gridtradingcourse.com/videos/grid_trading_eurusd_1/Grid_Trading_EURUSD.html - +558 pips in 24 hours

 
Thanks a lot! I think I have it working now :)
 
you are welcome! :)

thank you
Automated
--
grid trading EA, +558 pips in 24 hours:



 
Automated:

you are welcome! :)

thank you
Automated
--
grid trading EA, +558 pips in 24 hours:




The system works, which is great!

But is it possible to somehow control the number of alerts for when it gets triggered? At the moment, every tick that the price is below/above the trigger line I get a fresh alert. The problem is, when there is a lot of movement it really slows down doing anything on my computer - which is exactly the time I want to be doing something!

 
Hello Everyone,
Can someone do me a favor, actually I have one indicator and I need to add alert when color changes, please do it if any one knows, I am really in need of it, thanks in advance.  Indicator is attached.
Files:
3X-UK.TREND.mq4  13 kb
Reason: