This forum is in read-only mode now. You may discuss your questions on forums of MQL4.community and MQL5.community
daily Profit LimitBack to topics list |
|
Alexac04
2005.07.27 12:20
hi
is possible programming daily Pro fit Limit ? z.b. if (daily Profit Limit > 19 USD ) return(0); |
|
hdb
2005.07.27 15:18
the only way i found, and it is not terribly elegant, is:
1) account history, u need to set it to today (do this every morning) 2) scan the history records and sum the realised profit 3) scan the open positions and sum the unrealised profit. hugues |
|
Alexac04
2005.07.27 17:27
thanks
here my
void start()
{
double db=GlobalVariableGet("Date");
double d=GlobalVariableGet("A");
double value=AccountBalance();
if (db != DayOfWeek())
{
GlobalVariableSet("Date",DayOfWeek());
GlobalVariableSet("A",value);
}
if ( value - d > 10) return(0);
...
}
|
Download MetaTrader 5 (450 Kb, web installer) — a new terminal for financial markets
