There is no problem with StringFind(), fix your code.
Hi, thanks for the response!
I don't see the error in my code so therefor I did the post.
Your code | ushort sep = StringGetCharacter("_",0); StringSplit(name,sep,temp_array); |
Simplified | StringSplit(name,'_',temp_array); |
Your code | |
Simplified |
Hi, thank you for the response!
I did the suggested correction but ... this part of the code is working just fine, the issue is StringFind()
I really cannot understand why once it finds the string, once not (80/20)
The string in the global var is in format "Msg_123456789_-213.34" and StringFind() is seeking the # 123456789(temp_array[1]) in that string
Hi, thank you for the response!
I did the suggested correction but ... this part of the code is working just fine, the issue is StringFind()
I really cannot understand why once it finds the string, once not (80/20)
The string in the global var is in format "Msg_123456789_-213.34" and StringFind() is seeking the # 123456789(temp_array[1]) in that string
Show your log.
Here it is.
Thanks for helping by the way :)
Here it is.
Thanks for helping by the way :)
There is no problem in this snippet of the log.
Please provide the log file, not a picture of it.
There is no problem in this snippet of the log.
Please provide the log file, not a picture of it.
Here it is ...
0 16:02:07.672 HedgeEA_v.4.0 AUDNZD,M5: Alert: t- 25721959 0 16:02:07.672 HedgeEA_v.4.0 AUDNZD,M5: Alert: gn- Mag_25716995_-211.60 0 16:02:07.672 HedgeEA_v.4.0 AUDNZD,M5: Alert: 0
What is the problem with StringFind() ? There is not, the function can't find something inexistent.
Fix your logic and your code, and stop blaming the language for your error, it will help you to progress.
What is the problem with StringFind() ? There is not, the function can't find something inexistent.
Fix your logic and your code, and stop blaming the language for your error, it will help you to progress.
Sorry but I really don't see any error in my code.
Anyways I'm attaching the EA so you also can check ...
Thanks for your patience ... I know the error is with me somewhere but can't find it, so I'm seeking help from pro guys here on the forum
Thanks
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi guys,
I'm facing a problem when Using the StringFind() function.
Here it is my code:
GlobalVariableName is in format: "Msg_123456789_-213.34"
So time to time it Alert "1", and 20% of the time StringFind () no works and it Alert "0"
Please help if you can see what I'm doing wrong.
Thanks in advance!