Forum

Problem with simple sell deal

Hello, I want to make a simple sell but I always receive error. This is my code: bool cTrades::Sell( string iSymbol, double iVolume , string iLabel = "" ) { MqlTradeResult Result = { 0 }; MqlTradeRequest Request; Request.action = TRADE_ACTION_DEAL ; Request.symbol = iSymbol;

Custom symbol data generation

Hello everybody, I try to create my custom symbol and I generate tick history for it. But the bar history is missing. It is possible to generate the bar history from tick history automatically from the platform (MT5), or I must generate it manually

Linear regression in MQL5

Hi everybody, I want to solve one task with linear regression: I have the function y = ax1 + bx2 + cx3 + dx4 + ex5 + fx6 y and x1 to x6 are known and I have the matrix with their empiric values (100 examples). I want to calculate the approximation of a to f. I download the library "alglib.mqh" which

Can I get a historical tick range

Hello everybody, the function SymbolInfoTick get the current Tick information. It is possible to get a range of ticks? For example in current time (today) I want to get all ticks for yesterday on specified symbol

How to initialize if EA starts in sunday

Hello, I have a problem when my testing interval starts in Sunday. I used current time for starting point (marked in yellow). If the EA starts in Sunday I do not accept data. When the EA is already started - no problems. Can somebody gave me a solution? CopyBuffer(Handler, 0, TimeCurrent() , 100

Terrific slowdown when use a lot of indicator instances

Hi everybody, I try to make a indicator parameters optimization. The algorithm is: 1. Take a indicator handle with main parameter = StartValue; 2. Take a data and calculate QualityRating (my own algorithm); 3. Release handle ; 4. Repeat points 1, 2, and 3 for each value between StartValue+1 to

Currency indexes in MT5

Hi everybody, can I use currency indexes in MT5 like standard currency pair

EA visualization settings

Hi everybody, in my EA I use a lot of indicators. But by default, all used indicators automatically appear on the screen. Is this possible to switch them off and especially only some of them

Overloading operator =

Hello everybody, I have a strange problem with overloading operator = in MQL5. I have a struct used for data storage: struct ZigZagData { double Value; datetime Time; }; Here everything is OK. I use this data type in one array I need to overload operator = and change the example: class

What file is *.ex5

Can somebody tell me what kind of file is *.ex5 - machine code or code for virtual machine