
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
If you are trying to pull data from a full year on every tick then it's understandable that it will be slow and thats probably your issue so you might try and reduce the size of the requests
It also happend on that simple example of code - maybe you can take a look
The code like this works in the strategy tester like I would expect it, but Live it doesn't
Also a picture of the strategy tester that shows that that kinde of code works in ST
Please edit your posts and use the code button (Alt+S) to paste code.
Also please remove all the blank lines so that others can read your code easily.
Please edit your posts and use the code button (Alt+S) to paste code.
Also please remove all the blank lines so that others can read your code easily.
Ok I think it should be better now
Ok i'm not sure why you coded it like that and it seems also incomplete.
It does not make sense to make an array with instrument names and then to call the instruments by the SymbolName() function in the loop.
You can either hardcode the names which is broker specific or you can use SymbolName() function which will retrieve the names from MarketWatch.
Ok i'm not sure why you coded it like that and it seems also incomplete.
It does not make sense to make an array with instrument names and then to call the instruments by the SymbolName() function in the loop.
You can either hardcode the names which is broker specific or you can use SymbolName() function which will retrieve the names from MarketWatch.
It is there to get symbols into the market watch if they are not, especially for the strategytester but its not the part that makes the for loop slow
But this only loops over the first 3 SymbolNames.
But this only loops over the first 3 SymbolNames.
Actually there are 36 Symbols but my problems seems to disappear after the first loop is executed which needs more than 32s. After this the code is executed in the expected short time of under 1s
Perhaps you should read the manual, especially the examples.
How To Ask Questions The Smart Way. (2004)
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.
They all (including iCustom) return a handle (an int). You get that in OnInit. In OnTick/OnCalculate (after the indicator has updated its buffers), you use the handle, shift and count to get the data.
Technical Indicators - Reference on algorithmic/automated trading language for MetaTrader 5
Timeseries and Indicators Access / CopyBuffer - Reference on algorithmic/automated trading language for MetaTrader 5
How to start with MQL5 - General - MQL5 programming forum - Page 3 #22 (2020)
How to start with MQL5 - MetaTrader 5 - General - MQL5 programming forum - Page 7 #61 (2020)
MQL5 for Newbies: Guide to Using Technical Indicators in Expert Advisors - MQL5 Articles (2010)
How to call indicators in MQL5 - MQL5 Articles (2010)