Murrey Math Line X

pipsomatic

Newbie
Aug 20, 2023
2
0
1
52
I am referring to MT5 version since on MT4 version I understood, from a previous post that "It is indeed a non-trivial task, as MT4 does not allow direct interaction between its Alert mechanism and indicator's code. It is easy to code alerts for indicators that show some static change (like an arrow appearing on chart), but it is hard to define "a price crossing horizontal line on chart" condition."
Is it possible to add an alert to the indicator when a H1 or a H4 or D1 bar opens below a MML and closes above it and viceversa? For example price opens below MML 4/8 and closes above it or price opens above MML 4/8 and closes below it?
I have tried using the instructions at https://www.earnforex.com/guides/how-to-add-alerts-to-metatrader-indicators/ but they don't seem to work as there is no SetIndexBuffer in the indicator available at https://www.earnforex.com/metatrader-indicators/Murrey-Math-Line-X/
Thank you for your input.
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,614
1,366
144
Odesa
www.earnforex.com
I am referring to MT5 version since on MT4 version I understood, from a previous post that "It is indeed a non-trivial task, as MT4 does not allow direct interaction between its Alert mechanism and indicator's code. It is easy to code alerts for indicators that show some static change (like an arrow appearing on chart), but it is hard to define "a price crossing horizontal line on chart" condition."
Is it possible to add an alert to the indicator when a H1 or a H4 or D1 bar opens below a MML and closes above it and viceversa? For example price opens below MML 4/8 and closes above it or price opens above MML 4/8 and closes below it?
I have tried using the instructions at https://www.earnforex.com/guides/how-to-add-alerts-to-metatrader-indicators/ but they don't seem to work as there is no SetIndexBuffer in the indicator available at https://www.earnforex.com/metatrader-indicators/Murrey-Math-Line-X/
Thank you for your input.
You are right. MML doesn't use buffers, so that tutorial doesn't offer a complete solution to this case. Instead of buffers, to check for alerts, you need to use price levels read from the line chart objects (MML-0, MML-1, and so on).
 
  • 👍
Reactions: pipsomatic

pipsomatic

Newbie
Aug 20, 2023
2
0
1
52
You are right. MML doesn't use buffers, so that tutorial doesn't offer a complete solution to this case. Instead of buffers, to check for alerts, you need to use price levels read from the line chart objects (MML-0, MML-1, and so on).

Can you please advise on what code I need to use? I am not good at coding, I basically understand general instructions, but am unable to code myself something.
Thank you.