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
This is probably for those symbols that are not in MarketWatch, as it says for SymbolName:
Output the name of the symbol for which you get an unexpected result and compare with the list in MarketWatch....it is not mentioned in the help, that for successful work of this function it is necessary for the tool to be present in the MarketWatch window
The help really needs to be staffed with normal examples and bottlenecks.
PS
Also, there are often situations where, after making changes in the language, some EAs from the base stop working (or generate compilation errors).
Noticed today...MT5(access.metatrader5.com:443)
EURJPY, Daily:
For example GBPJPY, Daily: Everything is fine here.
And here is a screenshot of EURJPY, Daily of one MT4 DC:
The difference is visible to the naked eye....
How can this be fixed?
This is probably for those symbols that are not present in MarketWatch, as for SymbolName it says:
Output the name of the symbol for which you get an unexpected result and compare it to the list in MarketWatch.For symbols that are not present in MarketWatch, SymbolInfoTick() returns an error ERR_MARKET_SELECT_ERROR "Symbol not selected in MarketWatch" (code 4302). Only EURUSD and GBPUSD are selected in MarketWatch. An elementary run shows that SymbolInfoTick() returns an error ERR_MARKET_SELECT_ERRORfor unselected symbols :
By the way, the last data block in sergey1294's log is different from the others: first, SymbolInfoTick() returns the same error code this time, and second, - don't you think that the instrument, base currency and margin currency have some strange names in this data block?
Is this a bug? Have you noticed this weirdness at all?
As for the last data block, it's just the brute force loop glitched a bit and in the last data query accessed a non-existing symbol, so all fields except deposit currency are empty
How is this? I mean, the log is not from the version of the code that was given?
Judging by the code, everything is fine there.
Or SymbolsTotal() returned one value, but during the script run, somewhere in the middle of the cycle, by a terrible accident, the broker, setting the server part, removed one symbol from available, and the SymbolsTotal() - if the script requested it - would return a new value, one less, but, since the loop end condition was based on the old value stored in the Total variable, then the corresponding functions at the last iteration when accessing the now non-existing symbol returned empty lines? :)
So far, only this scenario came up to make this happen. :)
... Then the calculated value is explicitly converted to ulong. Exactly to ulong, because there is a guarantee that the value to be casted is non-negative.
While being cast to an integer type, the fractional part of the real type is discarded. It is not rounding to the nearest one, but precisely the throwing away of the fractional part that guarantees non-increasing of maximum lots' value, which free margin allows. That is exactly what we need.
Developers.
How do I make parameters appear in the scripts (I'm too lazy to constantly change the code for new conditions)...?
Developers.
How do I make parameters appear in the scripts (I'm too lazy to constantly change the code for new conditions)...?
#property script_show_inputs