is there anyone who could help me, please?
- 2007.05.03
- Andrey Khatimlianskii
- www.mql5.com
is there anyone who could help me, please?
- When you post code please use the SRC button!
Please edit your post.
General rules and best pratices of the Forum. - General - MQL5 programming forum - Help you with what? You haven't stated a problem.
You have only four choices:- Search for it,
- learn to code it, (you couldn't be bothered to learn MQL4/5, therefor there is no common language for us to communicate,)
- Beg at Coding help - MQL4 and MetaTrader 4 - MQL4 programming forum or Need help with coding - General - MQL5 programming forum or Free MQL4 To MQL5 Converter - General - MQL5 programming forum or Requests & Ideas (MQL5 only!),
- or pay (Freelance) someone to code it.
No free help
urgent help.
Hi,
I would like to add a sound alert to this mq4 indicator(it seems very simple to get it done but I am really not good at even the basic coding),
is there anyone who could help me, please?
thanks in advance!
yours,
shunfengcn
Hi,
Modify your indicator by inserting this code as example below :
1. Input parameter
//--new input input bool alert_sound=true;//Sound Alert input bool alert_screen=false;//Screen Alert
2. Buy :
void ArrowBuyCreate(string name, datetime time, double price) { ResetLastError(); if(ObjectCreate(0,name,OBJ_ARROW_BUY,0,time,price)) { ObjectSetInteger(0,name,OBJPROP_COLOR,clrDodgerBlue); ObjectSetInteger(0,name,OBJPROP_STYLE,STYLE_SOLID); ObjectSetInteger(0,name,OBJPROP_WIDTH,1); ObjectSetInteger(0,name,OBJPROP_BACK,true); ObjectSetInteger(0,name,OBJPROP_SELECTABLE,false); ObjectSetInteger(0,name,OBJPROP_HIDDEN,true); ObjectSetInteger(0,name,OBJPROP_ZORDER,0); //---new code--Sounds if(alert_sound) { PlaySound("Alert.wav"); Print("!* Arrow Buy: ",name," has been created."); } //---new code--Screen if(alert_screen) Alert("!* Arrow Buy: "+name+" has been created."); } }
3. Sell
void ArrowSellCreate(string name, datetime time, double price) { ResetLastError(); if(ObjectCreate(0,name,OBJ_ARROW_SELL,0,time,price)) { ObjectSetInteger(0,name,OBJPROP_COLOR,clrTomato); ObjectSetInteger(0,name,OBJPROP_STYLE,STYLE_SOLID); ObjectSetInteger(0,name,OBJPROP_WIDTH,1); ObjectSetInteger(0,name,OBJPROP_BACK,true); ObjectSetInteger(0,name,OBJPROP_SELECTABLE,false); ObjectSetInteger(0,name,OBJPROP_HIDDEN,true); ObjectSetInteger(0,name,OBJPROP_ZORDER,0); //---new code--Sounds if(alert_sound) { PlaySound("Alert.wav"); Print("!* Arrow Sell: ",name," has been created."); } //---new code--Screen if(alert_screen) Alert("!* Arrow Sell: "+name+" has been created."); } }
And don't forget to use SRC button when posting the code.
Good luck,
Yo. (^̮^)
- When you post code please use the SRC button!
Please edit your post.
General rules and best pratices of the Forum. - General - MQL5 programming forum - Help you with what? You haven't stated a problem.
You have only four choices:- Search for it,
- learn to code it, (you couldn't be bothered to learn MQL4/5, therefor there is no common language for us to communicate,)
- Beg at Coding help - MQL4 and MetaTrader 4 - MQL4 programming forum or Need help with coding - General - MQL5 programming forum or Free MQL4 To MQL5 Converter - General - MQL5 programming forum or Requests & Ideas (MQL5 only!),
- or pay (Freelance) someone to code it.
No free help
urgent help.
thanks for your guide, and I am really not aware of the rules for the forum.
I've edited the code with SRC button.
yours,
shunfengcn
Hi,
Modify your indicator by inserting this code as example below :
1. Input parameter
2. Buy :
3. Sell
And don't forget to use SRC button when posting the code.
Good luck,
Yo. (^̮^)
Thanks a lot for your help, Yohana!
I've added the code for the alert into the original one.
I will try it and see if it works later.
yours,
shunfengcn
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I would like to add a sound alert to this mq4 indicator(it seems very simple to get it done but I am really not good at even the basic coding),
is there anyone who could help me, please?
thanks in advance!
yours,
shunfengcn