![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
I have created a custom symbol using CustomSymbolCreate(). The sole purpose of this symbol is to create a chart that will be used for displaying data, so I am not interested in any tick data.
When I run my EA, I switch to the new symbol using...
My custom chart is then reloaded, but none of the information that I want to display on the chart is displayed.
I figured the problem may be caused by a lack of data, so as a test I added the following code to a timer event in my EA (just to generate some data)...
I put a break point in the OnTick() function, but the break point was never hit. I ran the EA multiple times over a period of time (15-20 minutes), but with the same result. I then stopped and restarted MT5 and tried again, but still no luck. I then checked the MT5\Bases\Custom\ticks folder but could not see a folder for my custom symbol. I restarted MT5 3-4 more times and eventually the break point in the OnTick() function was hit and the chart displayed the contents as expected. I then checked the
MT5\Bases\Custom\ticks folder again, and this time a folder for my custom symbol was present.
So my code is now doing what I expect, but I would like to get a better understanding of the sequence of events that led to it working.
So if I was to delete everything and start again, can anyone enlighten me with regards to the minimum steps that I need to take to ensure the successful creation of a chart that gets updated correctly?
Currently my observations, which are not correct, are...