Thread: Daily Profit
View Single Post
  #2 (permalink)  
Old 09-03-2006, 10:39 AM
cardio cardio is offline
Senior Member
 
Join Date: Sep 2005
Location: St Louis, MO, USA
Posts: 176
cardio is an unknown quantity at this point
re-thought

I see I was making a stuff-up, all one doesn't have to count the closed orders, as they are wrapped up in the accountbalance or accountequity. So the calc is far more simple, maybe this is right.

Code:
bool IsProfitforDayReached()
{
//Got to get this function to see the new Day
static int totalPips = 0;
static double totalProfits = 0.0;
static double currentBal

if newday()
{
 totalPips = 0;
 totalProfits = 0.0;
 currentBal = AccountEquity();
}
   if((AccountEquity()-currentBal)/currentBal>0.05)
   {
    return(true);
   }
   else
   {
    return(false);
   }
	 
	
}
Reply With Quote