Forum

Command line to compile MQ4 source code with metaeditor.exe

The Metaeditor help states you can run a compiler downloadable from: • https://download.mql5.com/cdn/web/metaquotes.software.corp/mt5/mql.exe — 32 bit version. • https://download.mql5.com/cdn/web/metaquotes.software.corp/mt5/mql64.exe — 64 bit version. That compiler is started from the command line

Indicator with '#property strict' directive showing line display issue

The below code with #property strict directive compiles without error, but doesn't display anything. If you comment ' #property strict' directive //#property strict it will also compile without error and the indicator will display a line. Not working code: #property strict #property

OnCalculate() returned value and prev_calculated parameter

Referring to https://docs.mql4.com/basis/function/events , OnCalculate paragraph. One can read: We should noted the connection between the return value of OnCalculate() and the second input parameter prev_calculated. During the function call, the prev_calculated parameter contains a value returned

OnCalculate + #property strict: accessing volume or spread parameter value makes the indicator freezing

I wonder why accessing volume or spread parameter of the OnCalculate function makes the indicator freezing when compiled with "#property strict" property. Have a try. When running, first tick shows alerts up to instruction: Alert("tick_volume[0]="+IntegerToString(tick_volume[0])); Subsequent ticks

Getting Strategy Tester (and terminal) frozen with WindowHandle() function

How to get Strategy Tester frozen with WindowHandle() function: using joined TEST_ST_WindowHandle.mq4 indicator with a dummy EA for the backtest start backtest in visual mode for a dummy EA with, for instance, symbol EURUSD,M1 open offline another timeframe as EURUSD,M15 drop TEST_ST_WindowHandle on

CPU load issue with offline chart updated live by PostMessageA

There are many script/EA available generating offline history (Renko, Free-of-Holes, Constant Range Bars, Tick Chart, Time Frame Converter, and so on ...) you can open as offline chart and run indicators on it live. They all use the "PostMessageA(winHandle, WM_COMMAND, 33324, 0)" Windows function to

Why doesn't bitwise shift work for 32 bits shift? (X>>32)

Normally a bitwise shift operation of 32 bits gives 0x00000000, all bits being shifted out of the integer. I've noticed the code n = n>>32; m = m<<32; lefts n and m variables unchanged though they should be assigned 0x00000000 ! However n = n>>31>>1; m = m<<16<<16; z = z<<31<<31; does the job and