MT4 - Horizontal Line with alert

 

Guys, is it possible to create a horizontal line in MT4, and when it gets crossed by a candle, to sound an alert (and perhaps open a .dll or .exe file)?

I am using this 4H strategy, and I don't want to be bound to the PC...

Thanks in advance.

Dave

 
Djosser:
Guys, is it possible to create a horizontal line in MT4, and when it gets crossed by a candle, to sound an alert (and perhaps open a .dll or .exe file)? I am using this 4H strategy, and I don't want to be bound to the PC... Thanks in advance. Dave

Price Alert — MetaTrader Indicato

 
Djosser:
Guys, is it possible to create a horizontal line in MT4, and when it gets crossed by a candle, to sound an alert (and perhaps open a .dll or .exe file)? I am using this 4H strategy, and I don't want to be bound to the PC... Thanks in advance. Dave
Files:
 

I use this alert, too but i replaced the 3 alert type lines with this so the symbol is shown in case i am waiting on more than just one pair.

Alert("Price above the alert level."+Symbol());

 

Thanks for sharing guys!

 

Not a coder at all, still... I've changed the HLine Alert.mq4 indicator a bit, and made two - one for giving a signal when the price is lower (Line Lower Alert) than the line, the other - when it is higher than the line (Line Higher Alert). This way it makes a bit more sense compared to the original indie that sounded on both sides of the line within a giving range. Now it simply sounds when the price is lower or higher. The "AlertPipRange" setting in the parameters is really not needed, do not change it.

Hope it's going to be useful.

 

There should be no need for 2 files - 1 higher and 1 lower. They could be combined to do the same thing. If anyone still needs this let me know.

 
master4x:
There should be no need for 2 files - 1 higher and 1 lower. They could be combined to do the same thing. If anyone still needs this let me know.

Hi,

I really need you help because I do not know anything about coding.

Well, what i need is horizontal line for each pips range.

The line range is 240,200,180,160,140,120,100,80...0...-80,-100,-120,-140,-160,-180,-200,-240.

"0" is centre horizontal line ( thick line) and others line number shall thin line and one more thing, when I move up or down the centre line other line shall move together.

Thank you very much if somebody can do for me and sorry for my bad english.

 
nasree:
Hi, I really need you help because I do not know anything about coding. Well, what i need is horizontal line for each pips range. The line range is 240,200,180,160,140,120,100,80...0...-80,-100,-120,-140,-160,-180,-200,-240. "0" is centre horizontal line ( thick line) and others line number shall thin line and one more thing, when I move up or down the centre line other line shall move together. Thank you very much if somebody can do for me and sorry for my bad english.

It sounds like it would take a bit of work. I could do it but I am very busy. PM me if interested.

 
master4x:
There should be no need for 2 files - 1 higher and 1 lower. They could be combined to do the same thing.

True, attached. It creates two lines. Also, I added pipDistance parameter, which is the distance where the lines first drawn from the bid price.

Seems to work OK for me. I feel like a coder now

 

Thanks ZergUt very much !!!

Reason: