stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

add sound to TP of a position
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1482
Page 1 of 1
Author:  FreddyFX [ Tue Feb 12, 2013 6:25 pm ]
Post subject:  add sound to TP of a position

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
Author:  NeoTrader [ Tue Feb 12, 2013 6:33 pm ]
Post subject:  Re: add sound to TP of a position

Hi Freddy,
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?
Look into the PlaySound Function to get what you want.
Hope this helps.

happy trading,

NeoTrader

-
Author:  FreddyFX [ Tue Feb 12, 2013 6:50 pm ]
Post subject:  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.
Author:  ZeppDK [ Mon Oct 07, 2013 8:20 pm ]
Post subject:  Re: add sound to TP of a position

FreddyFX 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
i took a Little other aproach than putting it into all EA's
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);
All times are UTC Page 1 of 1