Forum

Overload of compare function not working

Hello, time ago I downloaded from MQL4 the attached sample and it was working fine. The sample generates a list and sorts it using different criteria. The sample overloads COMPARE function to generate custom sorting. Now the overload is not more working and the sample uses the base class sort. I put

It is possible to add controls to CPanel?

Hello, I have a dialog and I added to this dialog a CPanel control: . everything is OK. Now I would like to add controls to cpanel so that when I hide/show the cpanel all controls disappear/appear. How to to do? No ADD function for cpanel...... Thanks MT4 build 765

Indicator with dialog over canvas: strange behaviour

Hello, I developed an indicator having a canvas, where I draw several lines, and a dialog. The creation order is: 1 ONINIT: canvas creation 2 ONCALCULATE: one time creation of the dialog after the last bar drawing everything is OK (please look at cattura3.jpg) If I close and restart the terminal i

Chart+Canvas+Dialog: issue in ChartXYToTimePrice

Hello, I have a chart, over the chart I create a canvas to draw several lines, then I add a dialog, the order is: 1- Chart 2 canvas+bitmap label on window 0 3-Dialog on window 0 everything is working fine but when I trap CHARTEVENT_MOUSE_MOVE the function ChartXYToTimePrice is unable to extract date

How capture the redraw event

hello, I draw lines using Canvas over my chart. I would like to capture chart redraw events so I can redraw my canvas. Currently I am redrawing the canvas using the cart event ID=9 ON_MOUSE_FOCUS_SET but I would like to use a more elegant solution. Any idea? TX

Redraw events capture

hello, I draw lines using Canvas over my chart. Everything is working fine. When I zoom the chart MT4 redraws the bars and immediately after clears and redraws the canvas. I would like to clear the canvas before MT4 redraws the bars and draw the Canvas after MT4 redraws the bars. How to capture

How convert time/price coordinates to screen coordinates and viceversa?

Hello everybody, I'm playing with CANVAS functions. I have to transform X time/ Y price coordinates into X/Y screen coordinates and viceversa. Any pre-built function or I have to write a windows/viewport conversion function? Thanks

It possible using Server api to change Magic Numbers?

Hello, One broker has changed mt4 provider and moved all orders from one provider to another one but now all magic numbers of the old provider are missing in the new one. I know it is not possible using MQL to change the magic number of an order. I am asking here if the owner of full license of mt4

OnChartEvent always fires 11 times!!

Hello Everybody, I trap trend line create and delete events: int OnInit () { //--- enable object create events ChartSetInteger ( ChartID (), CHART_EVENT_OBJECT_CREATE , true ); //--- enable object delete events ChartSetInteger ( ChartID (), CHART_EVENT_OBJECT_DELETE , true ); } but when I