Adding alert to Indicator

To add comments, please log in or register
Toast
227
Toast  
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!
Jay
79
Jay  
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

Toast
227
Toast  
Thanks a lot! I think I have it working now :)
Jay
79
Jay  
you are welcome! :)

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



Toast
227
Toast  
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!

InvestingView
53
InvestingView  
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:
To add comments, please log in or register