Download MetaTrader 5

I suddenly cannot multiply

To add comments, please log in or register
No time to learn MQL5? The source code library is at your service!
MikeT
232
MikeT 2015.10.27 02:06 

Hi Guys....

I suddenly cannot multiply....  '*' - illegal operation use

I initially thought this was just a temperamental phase that my computer was going thru... BUT... it's now becoming serious.... 

Can anyone help me out here.... I am speechless....  It's driving me nuts....

 

      ,"\nBB Value = ",BBvalue*PipMultiplier);

 

Thanx....
Stuart Browne
5815
Stuart Browne 2015.10.27 02:20  
Can you at least show the full line of code? Pretty hard to work out your problem with that snippet
MikeT
232
MikeT 2015.10.27 03:42  

Hi Stuart...

 That's exactly my issue.... It is as simple as that.... I suddenly cannot '*' multiply anymore... I get the error msg:  '*' - illegal operation 

Seriously... I'm not trying to be funny here...

 I have other sections of my code that multiply and carry on as usual...

...but suddenly.... I can't...?

It's driving me nuts because this should be such a simple procedure.... and I can't work it out.....

 Soooo...... 


MikeT
232
MikeT 2015.10.27 03:57  

Ummm... this is very strange but I'm probably getting it wrong...

 If I do this... it works no problem:

double a;
double B=BBvalue;
   a=B*PipMultiplier;

 But then... if I try to simply do this:

      ,"\nBB Value = ",BBvalue*PipMultiplier);

 ...then I get the error message....

 I guess I can live with this but I would really like to know why I had to do this work around....

 Anyways....

Thanx 

Stuart Browne
5815
Stuart Browne 2015.10.27 05:10  
MikeT:

Ummm... this is very strange but I'm probably getting it wrong...

 If I do this... it works no problem:

 But then... if I try to simply do this:

 ...then I get the error message....

 I guess I can live with this but I would really like to know why I had to do this work around....

 Anyways....

Thanx 

Hey Mike

That snippet of code looks like it's from a Print() or Comment() block. Can you post the whole thing mate? If that line is out there by itself then it makes no sense which is why it won't work....
Osama Shaban
1448
Osama Shaban 2015.10.27 13:25  
MikeT:
,"\nBB Value = ",BBvalue*PipMultiplier);

Be sure that BBvalue never equal to zero during EA operation ... also ...

use DoubleToString(xxxx,xxxx) for Comment( ), Alert( ), Print( ), .... 

Farrukh Aleem
381
Farrukh Aleem 2015.10.27 14:49  
May be types of variable different , when you ask for help you should paste an executable code to be tested.
Hector Pacheco
14778
Hector Pacheco 2015.10.27 14:53  
,"\nBB Value = ",BBvalue*PipMultiplier);

 

 Hi, how are you. Verifies that the value of the function is not passed by reference. That could be the error because you can not return a value to a mathematical operation.

To add comments, please log in or register