Lot computed wrong ?

 
LOT = NormalizeDouble(account.Balance()/RR,1);

 

RR is 15000 and the virtual account is 48000. the LOT computed is 6.4.

 

why ? :)

 

happens ONLY on Windows 7! on Windows 8.1 the script works fine !

 

much appreciated 

 

Again a bug in your code :-)

 
Alain Verleyen:

Again a bug in your code :-)

one row: it is all you see about computing the LOT. nothing else !

if you see a mistake - please let me know...

 
Calin Trainer:

one row: it is all you see about computing the LOT. nothing else !

if you see a mistake - please let me know...

  • We don't see the declaration of LOT.
  • We don't see the code of account.balance(), and the value returned.
  • We don't see the declaration of RR, and it's value.
  • We don't see the result returned by the running code (output in the logs).

The code you posted doesn't compile, we don't have a way to understand, and reproduce your issue.

All we can say is : this code will NEVER return 6.4 if the values you reported above are right. You have a bug in your code or in your thoughts.

 
Alain Verleyen:
  • We don't see the declaration of LOT.
  • We don't see the code of account.balance(), and the value returned.
  • We don't see the declaration of RR, and it's value.
  • We don't see the result returned by the running code (output in the logs).

The code you posted doesn't compile, we don't have a way to understand, and reproduce your issue.

All we can say is : this code will NEVER return 6.4 if the values you reported above are right. You have a bug in your code or in your thoughts.

#include <Trade\Trade.mqh>
#include <Trade\AccountInfo.mqh>

CTrade  trade;
CAccountInfo account;

extern int RR;
extern double LOT;

LOT = NormalizeDouble(account.Balance()/RR,1);

no errors reported in log - the script runned for hours and hours with the wrong value. 

please advise... 

 
Calin Trainer:

no errors reported in log - the script runned for hours and hours with the wrong value. 

please advise... 

Add this line and post the output :

LOT = NormalizeDouble(account.Balance()/RR,1);
printf("LOT(%.2f) = Balance(%.2f) / RR(%i)",LOT,account.Balance(),RR);
 

had a very similar issue. please find the answer to your request:

LOT(%.2f) = Balance(%.2f) / RR(%i)2.943079.1315000

what seems to be the problem ?

 
Alain Verleyen:

Add this line and post the output :

why my physical ip has been blocked and now i need to connect from another location ?!?!?!?!

i mean... THIS IS SHOCKING !

the problem itself is not important anymore. thank you for the moderator executing this irational action against me...

very unethical and un-serious treatment from whoever blocked me... and obviously you are not serious about fixing your product!!!!!!!

maybe you will change in the future.... and become more professional.