Чемпионат Automated Trading Championship 2011 стартовал! - страница 9

 

Can you please help me? Why happend this?

"

2011.10.06 13:28:56 Zero divide in 'tf_V1_00.mq5' (199,90)

double percent = 0;

if( AccountInfoDouble( ACCOUNT_EQUITY ) != 0 ) {

   percent = maxProfit / AccountInfoDouble( ACCOUNT_EQUITY );

}
"

How can be my ACCOUNT_EQUITY 0 ???

Between the condition and Dividing was a Connection Error??? Or how?


Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Account Properties
Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Account Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Account Properties - Documentation on MQL5
 
zoka:

Can you please help me? Why happend this?

"

2011.10.06 13:28:56 Zero divide in 'tf_V1_00.mq5' (199,90)

double percent = 0;

if( AccountInfoDouble( ACCOUNT_EQUITY ) != 0 ) {

   percent = maxProfit / AccountInfoDouble( ACCOUNT_EQUITY );

}
"

How can be my ACCOUNT_EQUITY 0 ???

Between the condition and Dividing was a Connection Error??? Or how?


ACCOUNT_EQUITY be zero if no data, that is, when disconnection.
 
zoka:

Can you please help me? Why happend this?

You had to do something like this: 

double percent = 0.0;
double equity = AccountInfoDouble(ACCOUNT_EQUITY);

if(equity!=0) 
 {
  percent = maxProfit/equity;
 }

 
tol64:

You had to do something like this: 

I´m realy sad...

The next function would be dangerous to use?


    double getAccountInfoDouble( ENUM_ACCOUNT_INFO_DOUBLE propertyId ) {   

   
      double result = AccountInfoDouble( propertyId );
     
      while( result == 0 ) {
         result = AccountInfoDouble( propertyId );
      }
     
      return result;     
    }
   
    ...
    double percent = maxProfit / getAccountInfoDouble( ACCOUNT_EQUITY );
    ...
Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Account Properties
Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Account Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Account Properties - Documentation on MQL5
 
zoka:

I´m realy sad...

The next function would be dangerous to use?

...

Wasteful in relation to resources. Options presented above is sufficient. 
 
sergey1294:
смените браузер и будет все в норме.
Проблема-то в том, что именно с IE8 не работает. Хотя предполагается корректная работа. Или хотите сказать, что у всех остальных пользователей IE8 такой проблемы нет?
 
Yedelkin:
Проблема-то в том, что именно с IE8 не работает. Хотя предполагается корректная работа. Или хотите сказать, что у всех остальных пользователей IE8 такой проблемы нет?
У меня проблем нет.
 
у меня наоборот, на 32 бит показывается на 64 бит не показывается :-) 
 
Interesting:

Как вариант наращивания там наверное Мартин? Все им лавры Manov-а (Dimitar Manov) спокойно жить мешают..

Фразу дополнить нужно думаю так: "А те кто очень сильно рискуют уже ничего не пьют". :)))

Для Мартингейла сейчас рынок просто сказка - никуда не идет, болтается в треугольнике. Думаю, если встретится хороший безоткатный тренд, как в 2008-ом, то эксперт не справится. Другое дело, что за ближайшие одиннадцать недель такой рынок может не попасться.
 
Interesting:

Как вариант наращивания там наверное Мартин? Все им лавры Manov-а (Dimitar Manov) спокойно жить мешают..

Фразу дополнить нужно думаю так: "А те кто очень сильно рискуют уже ничего не пьют". :)))

"Кто не рискует, тот не пьёт шампанского. А кто рискует, тот не обедает!"
Причина обращения: