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
Hello Alexey, to be honest I'm not very good at programming. Does it mean that the code provided by Konstantin should be finalized?
Sincerely, Vladimir.
It needs to be reworked and thrown out.
It needs to be reworked and thrown away.
Why so cruel!
Thank you Alexey!!! Your code works perfectly.
Regards, Vladimir.
Alexey, everything is clear about the search, because StringFind is a search for a substring in a string:
The only thing I can't figure out is why we check the function for equality to zero when searching for a substring in a string.
Regards, Vladimir.
Alexey, everything is clear about the search, because StringFind is a search for a substring in a string:
The only thing I can't figure out is why we check the function for equality to zero when searching for a substring in a string.
Regards, Vladimir.
From the
documentation
Returned value
The function returns the number of the substring in the string, at which the sought substring starts. If no substring is found, the function returns -1.
I.e. chart symbol starts with "GBPUSD" and it doesn't matter what suffix is attached.
I was a bit hasty too, though. If you enter only "GBP" for example, then any graph will be valid if the base currency is "GBP". Additionally, we should check the length of the text in the input line.From the documentation
i.e. the chart symbol starts with "GBPUSD" and it doesn't matter what suffix is attached.
Although I was a bit hasty too. If you enter only "GBP" for example, any chart will be valid if the base currency is "GBP". Additionally, we should check the length of the text in the input line.but just compare? and limit the input to small letters. or enum, that's for foolproof))))
From the documentation
i.e. the chart symbol starts with "GBPUSD" and it doesn't matter what suffix is attached.
Although, I was a little hasty too. If you enter only "GBP" for example, then any chart will be valid if the base currency is "GBP". Additionally, we should check the length of the text in the input line.I see!
Regards, Vladimir.
but just compare? and limit the input to small letters. or enum, for the sake of the fool))))
Hello Valery! Started with ENUM_SYMBOL_INFO_STRING from the beginning, but for some reason nothing worked. You can try it again, though.
Sincerely, Vladimir.
but just compare? and limit the input to small letters. or enum, what's foolproof))))
You could also just compare, but if the characters have a suffix, you have to enter them as is. In general, there are plenty of options, and it is futile to argue about the tastes of flomasters.
But if you have an enum, search in the string will be necessary. Because the enum contains pure symbol names and the chart can contain any attachments.
Why make such a mockery of an immature mind? Your code does not meet the requirement at all. If only "eu" or "eur" is entered in the input parameters, this part of the condition
will be fulfilled no matter what currency pair contains "EU" in its name and it does not matter EUR as base currency or quoted currency. And why go through the SymbolName of MarketWatch searching for the right symbol?
Alexei, it's quite normal code. It's not normal, you have to enter several symbols in a parameter, which is unlikely to be done by anyone.
I have roughly the same implementation in my work product.
This implementation successfully works in a multicurrency solution, what cannot be said about other codes, i.e. the code is universal.
You could also just compare them, but if the characters have a suffix, you have to enter them as is. In general, there are quite a lot of options and it is a futile task to argue about the tastes of flomasters.
But if you have an enum, search in the string will be necessary. The enum is used to store names of pure symbols, while the chart can contain any attachments.
Alexey, thanks for the tip in bold. I will try to rework the very first version of the code I wrote earlier for the sake of interest.
Regards, Vladimir.