Forum

File opening fails with error 5004 but succeeds in all other instances

Hi, I have an issue with file opening during optimization, if the test is ran on visual mode or EA is attached to a chart, the file opening always succeeds, if the file is less than 1.3MB out of 100 passes, the file opening may fail less than 7 times during optimization, with a file greater than

MarketInfo and SymbolInfoDouble return 0 on strategy tester

Hi all am running this code on strategy tester AUDJPY, to confirm if the symbol is valid, the code tries to make a request Using marketinfo and if the return value is > 0, then the symbol is correct. It works properly on live but it doesn't work on tester. Is there a workaround for this? int

Creating fake ticks for MT5

#include <WinUser32.mqh> #import "user32.dll" int RegisterWindowMessageW( string lpString); #import //+------------------------------------------------------------------+ //| script program start function | //+------------------------------------------------------------------+ int start() { //----

Cannot load resource error 4802, How to fix issue?

I've been using resources for a long time in mql4/5 programs, but lately I've realized I keep getting the 4802 error for all new programs, surprisingly old programs still work correctly. At a point I had to copy paste the code from an old program to a new one, and while the issue didn't occur in the

Editing inputs in the order window with dll

Hello everyone, I'm trying to create a library that can open trades the same way a trader sitting in front of MT4 will open trades. So far, I've been able to bring up the order window and simulate a keystroke on it. However I've been unable to edit any of the fields or even click on the "sell by

How to fix “Unresolved import call: Cannot find Add in TestMe.dll” in MQL4

I'm trying to run a function written in C# on MT4 by means of a dll. The dll compiles correctly, however when I try to run it on MT4 i get an unresolved import call cannot find Add in TestMe.dll Am following a guide on this link https://www.mql5.com/en/articles/249 , the dll am using I downloaded it

Draw Colour Lines on MT4

Hi everyone, am creating an indicator for MT4 and I need to be able to dynamically change the line colors when certain conditions are met. Unfortunately, once I specify property indicator_type1 DRAW_COLORLINE the lines disappears entirely and are no longer visible. However if I change

Strikethrough profile names on MQL5

What does it mean to have a profile name with the strikethrough on this site? I've seen a number of profiles with that, but I haven't been able to deduce what it means, at first I thought they've been deleted but I started doubting this when I observed the profiles still open and you can even send

Help me understand bitwise operation "Complement to one"

Could anyone please help me understand what these guys mean by this definition Bitwise Operations Complement to One Complement of the variable value up to one. The value of the expression contains 1 in all digits where the variable value contains 0, and 0 in all digits where the variable contains 1

Need Help calculating angle between two lines on MT4

Hello everyone, Am trying to calculate the angle between two lines placed on the MT4 chart and so far I've been getting a value very close to zero. My approach is this, get the slope of the two lines then use this formular to get the angle. tan# = fabs((m2 - m1)/(1+(m2m1))). Then I get the angle #