Last account balance

To add comments, please log in or register
stanlotrading
11
stanlotrading  

Hello,

I'm blocking on a code.

I wish the ea keeps in memory the last highest balance, here is my code but it does not work, can you help me?

 double  highestbalance()

  {

   double highestbalance1=1000;

    if ( AccountBalance() > (highestbalance1 )) highestbalance1 = AccountBalance();

      return(highestbalance1);     

       }
Andrey Barinov
49415
Andrey Barinov  
stanlotrading:

Hello,

I'm blocking on a code.

I wish the ea keeps in memory the last highest balance, here is my code but it does not work, can you help me?

double  highestbalance()

  {

   static double highestbalance1=1000;

    if ( AccountBalance() > (highestbalance1 )) highestbalance1 = AccountBalance();

      return(highestbalance1);     

       }
stanlotrading
11
stanlotrading  
Andrey it works, thank you very much
To add comments, please log in or register