Hi
Try this example:
// Rates structure array for the data of the last complete bar MqlRates MyBar[]; CopyRates(Symbol(), PERIOD_M30, 1, 1, mrate); // Distance between HIGH/LOW of 30 min BAR multiplied by pip factor value. double dHigh_Low_Distance = (MyBar[0].high - MyBar[0].low) * 10000; // Check if distance is greater than or smaller than 30 pips if(dHigh_Low_Distance > 15 && dHigh_Low_Distance < 30) { Alert("The BAR value of symbol = ", Symbol(), " is between 15 and 30 pips ", dHigh_Low_Distance); }
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi friends,
Good Day and a very happy new year. Iam a new member.
I need to get automatic alerts whenever the bar length is 15 to 30 pips in a 30 minute bar chart for specified currency pairs. How do I start. Pla help.
Thanks
Ravibala