Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1376

 
SanAlex:

I'm learning - Thank you! I'll know now.


Run this script here.

/********************Script program start function*******************/
void OnStart()
 {
  string kav = "";
  ushort numb[] = {83, 97, 110, 65, 108, 101, 120};
  for(int i = 0; i < 7; i++)
   {
    string n = "";
    StringSetCharacter(n, 0, numb[i]);
    StringAdd(kav, n);
   }
  Print(kav);
 }/*******************************************************************/
 
Alexey Viktorov:

Run this script here.

Thank you! very good examples to learn from - Thank you!

kav 4

 
Igor Makanu:

I think the problem here is different - it's more likely to be an attempt to "do it for me" rather than learn how to solve your problem

If it worked for me, I wouldn't ask. I always try my ideas first and then, if it doesn't work, ask.

 
Alexey Viktorov:

There's a lot of advice and none of it's right.

Why do you need inverted commas? This is enough.

two_pair would be "USDJPY", exactly what should be used in function parameters.

In fact, StringAdd performs the same function, but it doesn't work. The MACD derived from the current chart is displayed normally but the MACD for this currency pair is equal to zero. But it turns out that it is the same whether I write USDJPY or "USDJPY" for it, as you say. Have I got it right?

 
I have a question. Is it possible to check the currency pair against the market overview with a function?
 
Michail_David:

Essentially StringAdd performs the same function, but it doesn't work. The MACD from the current chart is OK, but the MACD from this currency pair is zero. But it turns out, as you say, that it is the same whether I write USDJPY or "USDJPY" for it. Did I get it right?

Not correctly.

In the code.

string vp = "EURUSD" // Это правильно
string vp = EURUSD   // Это не правильно

Well, you should at least read the documentation! It's all clearly written there - how, what, why... There are some rare exceptions, but they do not concern your question.

As for "USDEUR", there is no such pair anywhere! (I may be wrong) It is a "custom" symbol. It is not in the overview. If you create and add it - then you won't have problems.

Read documentation.

 
Сергей Таболин:

Wrong.

In the code.

Actually, you should at least read the documentation! It's all clearly written there how, what, why... There are some rare exceptions, but they do not apply to your question.

As for "USDEUR", there is no such pair anywhere! (I may be wrong) It is a "custom" symbol. It is not in the review. If you create and add it - then you won't have problems.

Read the documentation.

I've already reread the documentation line by line. I didn't understand it. That's why I decided to ask again. Thank you for making it clear. I get it now.

 
Сергей Таболин:

Wrong.

In the code.

Actually, you should at least read the documentation! It's all clearly written there how, what, why... There are some rare exceptions, but they do not apply to your question.

As for "USDEUR", there is no such pair anywhere! (I may be wrong) It is a "custom" symbol. It is not in the review. If you create and add it - then you won't have problems.

Read documentation.

If skis are bad ... I do not find in Michail_David's messages reference to this pair... It says USDJPY everywhere

 
Thank you all for your help. Got the quotes sorted out, the currency pair is in the overview, but still no effect. The problem seems to be in receiving data for this currency pair. I will look into why no data is coming in for this currency pair. Thank you all very much
 
Alexey Viktorov:

Either skis are bad... I can't find such a pair in Michail_David's posts... Everywhere it says USDJPY

I don't understand it myself, Alexei, where he dug out this currency pair ))