Questions from Beginners MQL5 MT5 MetaTrader 5 - page 688
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
Really? Really?
I always thought that(^) was a power increase.
Try compiling this example:
//| Test_1.mq5 |
//| Copyright 2016, MetaQuotes Software Corp. |
//| http://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2016, MetaQuotes Software Corp."
#property link "http://www.mql5.com"
#property version "1.00"
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void OnStart(void)
{
double a=2;
double b=3;
double c=a^b;
int g=0;
//---
}
//+------------------------------------------------------------------+
and the urge to be sarcastic will disappear on its own.
Exponentiation.
I have a broken clock -- it is guaranteed to tell a very accurate time twice a day.
Degree conversion https://www.mql5.com/ru/docs/math/mathpow
So, here, Karputov is right -- ^ is an "exclusive OR".
see the list of operations https://www.mql5.com/ru/docs/basis/operations/rules
Try to compile this example:
//| Test_1.mq5 |
//| Copyright 2016, MetaQuotes Software Corp. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2016, MetaQuotes Software Corp."
#property link "https://www.mql5.com"
#property version "1.00"
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void OnStart(void)
{
double a=2;
double b=3;
double c=a^b;
int g=0;
//---
}
//+------------------------------------------------------------------+
and the urge to quibble will go away on its own.
and does it compile? It doesn't...
And here's what Wiki says:
The magnification sign: ^ (not used in typewritten or handwritten formulas; used in programming, along with the rarer symbols ↑ and **, and in "linear" text formulas).
Gentlemen, stop arguing. I, too, think that this sign in at least the 4-R was an erection to a degree.
You better tell me why this
doesn't work when the internet connection is disconnected?
Try to compile this example:
//| Test_1.mq5 |
//| Copyright 2016, MetaQuotes Software Corp. |
//| http://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2016, MetaQuotes Software Corp."
#property link "http://www.mql5.com"
#property version "1.00"
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void OnStart(void)
{
double a=2;
double b=3;
double c=a^b;
int g=0;
//---
}
//+------------------------------------------------------------------+
and the urge to be sarcastic will disappear on its own.
I didn't fall for the joke provocation, as I immediately saw the error )
And you, Karputov, are a sly one, it turns out.
You have learned how to teach newbies implicitly, like, "try to compile" and you will understand the question more deeply.
I have a broken clock -- it is guaranteed to tell a very accurate time twice a day.
Degree conversion https://www.mql5.com/ru/docs/math/mathpow
So, here, Karputov is right -- ^ is an "exclusive OR".
see list of operations https://www.mql5.com/ru/docs/basis/operations/rules
What if the person didn't give a formula from mql ?
If he just got it from somewhere else?
That's usually how they refer to exponentiation.
Of course, his example (if written correctly) shows that this sign in mql code is NOT exponentiation (pow()), but here we need to clarify what the questioner meant. And judging by his formula GHPR=(BalanceClose/BalanceOpen)^(1/N), he did NOT mean mql syntax, because it clearly shows double, not char values, which are needed for bitwise operations.
I didn't give in to the provocation as I immediately saw the error.
char a='a', b='b';
//--- exclusive OR operation
char c=a^b;
Print("a = ",a," b = ",b);
Print("a ^ b = ",c);
//The result will be:
// a = 97 b = 98
// a ^ b = 3
Bitwise operations are only performed onintegers.
I did not fall for the joke provocation, as I immediately saw the error )
And you, Karputov, are a sly one, it turns out.
Learned to teach the newbies implicitly, they say, "try to compile" and you will understand the question more deeply.
Are you calling me a beginner? Thank you - well preserved it turns out...
So I wonder if Mr. Karputov himself was able to compile his code...
You're the one who called me a rookie. Thank you - I'm in good shape, it turns out...
So I'm wondering if Mr. Karputov himself could compile his code...
Artyom, there's a popular saying: "You live a long time, you learn a long time".
And Socrates said, "I know I know nothing."
I don't know what "Karputov could do." -- I don't know.