williamwong
williamwong
williamwong
Added topic Hide all indicator data after a certain date
I would like to hide all indicators data on the chart after the date of a vertical line drawn (named "RANGE_END").  For example in the following diagrams, left chart is before the vertical line is drawn, right chart is when the vertical line is
williamwong
Added topic Custom symbol gaps in price data
I have written a custom symbol to calculate USD index based on all the crosses against USD using the synthetic instrument formula. If I start my PC after a period of time, I find a gap in the index.  The custom symbol does not seem to
williamwong
Added topic How to position multiple arrows properly on a single date in multiple timeframe and window size
I need to draw multiple arrows on a single date.  It works for one time frame but when I resize the window or change to another time frame, the arrows overlapped.  Here is the sample code: // h is the high of the bar at object_date // first
williamwong
Added topic Trapping mouse select-drag-drop events
My indicator tracks a date set by a vertical line every second (set by timer).  A long calculation is called if the vertical line is changed.  But when I click on the vertical line, while dragging to another price-bar and before releasing
williamwong
Added topic Forward declaration compilation error
The following gives CBuffer struct undefined compilation error, please help: class C1dArray; class C1dBuffer; class CBuffer; class C1dIntArray; class C1dArray {    C1dBuffer   *m_1dBuffer; }; class C1dIntArray: public C1dArray {
williamwong
Added topic Debugging undeleted objects
After executing a program, it reported a  few undeleted objects of certain type. How to find out where are these undeleted objects? Is there a way to access the calling function stack?  I am thinking a solution to store the calling stack at
williamwong
Added topic Restricting use of template
I am trying to use template to define an array: template < typename T> class C 1 dArray { T m_array[]; public : // some non computational methods int size() { return ArraySize(m_array); } // some computational methods T average() { T s= 0 ; for
williamwong
Added topic Using template to define n-dimension array
I understand that template <typename T> can be used to define a container class of type T at compile time.  For example: template <typename T> class C1dArray { T m_array[]; public: // and methods that deal with 1darray operations };
williamwong
Added topic How to use class forward declaration?
I am trying to build a 1d array that can take in 2d array as index and return another 2d array with the contend of 1d array: C1dArray < int > labels = {10,11}; C2dArray < int > index = {{0,1,1,0},{1,0,0,1}}; labels[index] will return
williamwong
Added topic Getting price data aligned to a time
Very often we need to code our indicator to display a historical point in time to check if the data calculated and the signal generated during backtest are the same and also we need a way to paper trade visually to validate our strategy before embark
williamwong
Added topic default user directory
how to reconfig MT5 default user directory from  C:\Users\xxxx\AppData\Roaming\MetaQuotes\Terminal\6F9C869F6858C85D7809F35BE65FFDE3\MQL5 to a directory of my choice
williamwong
Added topic Time series as a committed resource
We all know that MQL5 does not guarantee the availability of time series data hence our indicator/experts because more complicated with extra codes to cater for cases that the data may be available now but may not be in the next tick.  This is
williamwong
Added topic font size and pixel
I am trying to adjust the edit control width to fit the text it contains.  How do I calculate the width (in pixel) for a string of a given font size
williamwong
Added topic very long time to copy rates
void OnStart()   {    datetime t[];    datetime d=D'2011.5.2 20';    uint time=0;    int i;    for(i=0;i<5;i++)      {       uint
williamwong
Added topic Invalid ex5
I was trying to report this in service request but it failed to save: Client Terminal Build and Version (32 or 64 bit) Build 470 Problem description No compilation error but I when I tried to load my expert: expert xxx (EURUSD H1) loaded
williamwong
Added topic Calendar usability features request
Is it possible to add local time for the calendar event? We can rename the current "Time" column to " Server Time ", then add a column "Local Time". And also is it possible to add a right menu item to go to the next event directly instead of
williamwong
Added topic Hiding future bars when looking at historical price
I would like to write an indicator to hide price bars after an input date. The purpose of this indicator is for educational, when I look into history, I would like to hide those bars on the right of a historical date I set so that I can analyse the
williamwong
Added topic auto version upgrade
Understand the version upgrade is automatic, can we have a menu item to invoke it to start the upgrade?  i ran my system and waited for 2hours, it still didnt start the update.  In this case, can i download the new version and install over
williamwong
Added topic copytime returns -1
void OnStart ()   {    datetime start= D'2010.12.6' ;    datetime end= D'2010.12.6 7' ;    datetime time[];    int copied=- 1 ,loop= 0 ;    while (copied==- 1 && loop< 100 )
williamwong
Added topic Constructor in dynamic multi-dimensional arrays are not called properly
If I declare a multi-dimensional arrays of objects and resize it, the constructor of the objects are not called properly, please check the attached example.  I have to overcome it by using an object pointer and create the object using new
12