Forum

CChartObjectButton State() mismatch

I created a Dialog and added a number of (CButton) buttons to it. Each time I click a button everything seems to work as expected without fail...or was I just lucky? I then replaced the dialog/CButton's with buttons created by the CChartObjectButton OOP class. 9/10 times it seems to work, but

Custom symbol - sequence of events

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... ChartSetSymbolPeriod ( 0 , "MySymbol" , PERIOD_M1); My

MT5 [build 4410]: Bug in CCanvas::Create() method causing error code 5035 to be set.

I have a piece of code that calls into the canvas CreateBitmapLabel() method... #include <Canvas/Canvas.mqh> CCanvas canvas; canvas.CreateBitmapLabel( "test_name" , 0 , 0 , width, height, clrfmt); This in turn makes its way down to the Create() method... bool CCanvas::Create( const string name

Array range X is too large

OK, I appreciate that none of you are mind readers, but have any of you come across the following error before, and if so, did you manage to get to the bottom of it? The piece of erroneous code is shown here... static void Cards::AddCards() { string symbols[]; int count =

Bug found with input group and iCustom()

I recently raised the following issue , where I was having problems using input variables in a common file (MT5 V5.00 build 4150). I eventually got to the bottom of the issue and believe that I have found a bug with input group when used with iCustom(). The input data is shown here... enum LogLevel

Using inputs defined in common file

I have created a logging file, called logging.mqh. Along with the class logic, I have also added the following code... enum LogLevel { Error, Warn, Info }; input group "Debugging Options" input LogLevel Logging_Level = Warn; The 2 reasons for doing this are... So I can compile the file

Print back test history

After running a back test (MetaTester) on a demo account, if I select the History tab in the Toolbox, I can see all the orders/deals that have been processed. My question is, is there a way to print the contents of the History tab as I am not able to

OBJ_CHART Data Window update

I have created a new chart object , i.e. ChartOpen ( "GBPUSD" , PERIOD_M1 ); When the mouse is over the OBJ_CHART, is it possible to get the Data Window to display the data from the OBJ_CHART rather than the main chart in which the OBJ_CHART sits

Using OnTimer() inside a custom indicator created with iCustom() is not working.

I have created a custom indicator using... int indicatorHandle = iCustom (symbol, PERIOD_M1 , "MyIndicator" ); ..and at some later stage, I attach it to a new chart that I have created... long chartHandle = ChartOpen (symbol, PERIOD_M1 ); ChartIndicatorAdd (chartHandle, 0 , indicatorHandle); I

Disable OBJ_BUTTON

I have created a new button object using... ObjectCreate ( ChartID (), "TestButton" , OBJ_BUTTON , 0 , 0 , 0 ); There are certain instances where I would like to disable this button, so is it possible to disable this button object so that it cannot be clicked? So far I can only see 2 options... Wait