double a=1.0;
PVA wrote >>
The following MQL4 code results in the "a" value of zero:
double a=1;
for (int i=0; i<4; i++)
{
a=a*0.1;
}
Print ("a is ",a);
Output: "a is 0".
Should I make "a" equal to 100000 initially, then the output is "10".
How can I get "0.0001" (The pip value :))?
Thank you in advance :).
if it is pip value why not use Point; What is Poiint -> from the help file of MetaEditor
double Point The current symbol point value in the quote currency.Sample: OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,Ask+TakeProfit*Point); |
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
The following MQL4 code results in the "a" value of zero:
double a=1;
for (int i=0; i<4; i++)
{
a=a*0.1;
}
Print ("a is ",a);
Output: "a is 0".
Should I make "a" equal to 100000 initially, then the output is "10".
How can I get "0.0001" (The pip value :))?
Thank you in advance :).