Hi guys.
I would like to add sound to my EA if it takes out a position.
Anybody that can help me with that, please?
Freddy
add sound to TP of a position
-
FreddyFX
- Trader
- Posts: 28
- Joined: Sun Dec 04, 2011 6:51 pm
- Location: Puerto Vallarta - Mexico
add sound to TP of a position
Trading forex is easy, making money is simple.
It is the mental part that is difficult.
It is the mental part that is difficult.
- NeoTrader
- Trader
- Posts: 436
- Joined: Wed Apr 04, 2012 2:52 pm
- Location: small Village at Lake Chiemsee, Bavaria, Germany
Re: add sound to TP of a position
Hi Freddy,
Hope this helps.
happy trading,
NeoTrader
-
Look into the PlaySound Function to get what you want.FreddyFX wrote:I would like to add sound to my EA if it takes out a position.
Anybody that can help me with that, please?
Hope this helps.
happy trading,
NeoTrader
-
-
FreddyFX
- Trader
- Posts: 28
- Joined: Sun Dec 04, 2011 6:51 pm
- Location: Puerto Vallarta - Mexico
Re: add sound to TP of a position
NOT so far at the moment, guess I should not mess with coding and leave it to the professionals, lol.
But I have sounds on taking a position, so figured would be nice when it takes out in profit.
But I have sounds on taking a position, so figured would be nice when it takes out in profit.
Trading forex is easy, making money is simple.
It is the mental part that is difficult.
It is the mental part that is difficult.
-
ZeppDK
- Posts: 1
- Joined: Fri Oct 04, 2013 12:46 pm
Re: add sound to TP of a position
i took a Little other aproach than putting it into all EA'sFreddyFX wrote:Hi guys.
I would like to add sound to my EA if it takes out a position.
Anybody that can help me with that, please?
Freddy
instead i made a seperate EA that makes an TP sound, and sends a push message to my phone telling me that i earned Money, and how much..
it should properbly be made different, but for my personal use its sufficient.
Code: Select all
double AccountB;
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
//----
AccountB = AccountBalance();
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
if(AccountB < AccountBalance())
{
double AllAc = (AccountCredit()+AccountBalance());
double Nuff = (AccountBalance()-AccountB);
PlaySound("alert2.wav");
SendNotification("TP reached <=> +"+DoubleToStr(Nuff, 2)+"$ <=> new balance " +DoubleToStr(AllAc, 2)+"$");
AccountB = AccountBalance();
}
else
{
}
return(0);