Thread: Ask!
View Single Post
  #1091 (permalink)  
Old 05-15-2008, 03:40 AM
saintmo saintmo is offline
Senior Member
 
Join Date: Aug 2006
Posts: 181
saintmo is on a distinguished road
Quote:
Originally Posted by WNW View Post
Thanks for your reply, but you're right, they're not exactly what I'm looking for.
I don't have the code savvy yet to address the problem.

I need the code to return the "high watermark" of the account balance.

Thanks again, any help appreciated.
WNW,

I hope this is not too simplistic nor misunderstanding your needs, but have you considered using a global variable for your "high watermark" of the account balance. The initial global variable balance is set to your current account balance. Then when your account balance is greater than your global account balance (saved) you can perform whatever action you choose and then save the new higher balance to the global variable. The highest account balance is always saved to the global variable and used to test against the newest account balance. Additionally, if the EA terminates from loss of internet connection, etc, the highest balance is still available within the global variable.

saintmo
Reply With Quote