HELP: How to make sound when price line touch horizontal line on mt5?
Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Types
- www.mql5.com
Object Types - Objects Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Hello, use alert function if close price is below/above the hl and a flag variable to detect it only once per crossing.
Hi, You should get the price of horizontal line, and compare with the current price.
int OnInit() { EventSetTimer(1); return(INIT_SUCCEEDED); } void OnDeinit(const int reason) { EventKillTimer(); } OnTimer() { double LinePrice; double CurrentPrice; LinePrice=ObjectGetDouble(0,"LineName",OBJPROPP_RICE,0); CurrentPrice=SymbolInfoDouble(Symbol(),SYMBOL_BID); if(CurrentPrice>=LinePrice) PlaySound("MySoundFile.wav"); )
erna pujilestari: HELP: How to make sound
Perhaps you should read the manual. PlaySound
How To Ask Questions The Smart Way. (2004)
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.
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