Questions from Beginners MQL5 MT5 MetaTrader 5 - page 598

 
Oksana Berenko:
And then form arrays based on the values.

Thanks, but the point is to change the number of characters and their indexes accordingly.

How do you do that?

 
mila.com:

Thanks, but the point is to change the number of characters and their indexes accordingly.

How do you do this?

Or add such strings as much as possible.

Or let the user write comma separated in one parameter.

extern string Symbols = "EURUSD,USDJPY,GBPUSD,USDCAD,USDSEK,USDCHF";   // Symbols
extern string Weights = "-0.576,-0.136,-0.119,-0.091,-0.042,-0.036";   // Weights

And then you can split the string. Check the textual part. Convert it to double.

 
mila.com:

Thanks, but the point is to change the number of characters and their indexes accordingly.

How do I do this?

Parsing is your best bet. There's no other way.
 
mila.com:

Thanks, but the point is to change the number of characters and their indexes accordingly.

How to do it?

Create an intermediate string variable, copy InPairs there. In the loop, look for a comma and read from the string the number of characters from zero to comma. Then shorten the intermediate variable by reading substring from the specified position to the end and search for a new comma.

 
Done, thank you all for your help.
 

Good afternoon.
Started to write a panel for an EA. At the beginning, I was able to move it, but now it won't move or collapse. What can it be connected with?

I'm not attaching the code in the hope of hearing some general advice, perhaps someone has already encountered this point.

 
a1exb:

Good afternoon.
Started to write a panel for an EA. At the beginning, I was able to move it, but now it won't move or collapse. What can it be connected with?

I'm not attaching the code in the hope of hearing some general advice, perhaps someone has already encountered this point.

Check your code, I had the same thing.
 
Vladislav Andruschenko:
check your code, I had the same thing.
General recommendations, yes, but not that much. I already understand that it should be checked. I just don't know what for. In your case, what influenced this panel behaviour?
 

Help, an error is popping up in the string

StringTrimLeft( StringSubstr(ResultSymbols,1,StringLen(StringSubstr(ResultSymbols,0,1))- 1));

 
a1exb:
General recommendations yes, but not that much. I already understand that it should be checked. I just don't know what for. In your case, what influenced this panel behaviour?

In my code it was all trivial, I hid some data in the global variables for the correct display of the panel when restarting the current and graph changes, which is why it was a stoppage,

I don't know what language your panel is written in, what functions or libraries are used, so you won't get an answer.

Reason: