Forum

MT4 MQL4: OnInit(), OnDeInit, OnTick(), OnTester(), OnCalculate() (etc.) event execution details - where to find full explanation and documentation (with examples)?

I need to understand exactly how and when all these built in functions are actually triggered and all the details on how they are executed so I fully understand how and when to use them. I have tried searched through the MQL4 and MT4 help and nothing shows up. I have also tried searching the

Function to detect if EA running in Backtest or not

Hi, I want a simple way to determine whether an EA is running in a System Test or if it is running on a chart. How can I do this? I know it must involve using the OnTester() function, but I'm not sure exactly how to achieve this. I was thinking if there is a way to create some global variable that

How do I automatically create a Text Object on the Chart with MQL Code?

I am trying to automatically create a TextObject on the chart as a specific Bar/Time and Price, but I can't get it working. I tried the examples given in the MQL Help, but they don't show any text, they don't seem to work at all. What is the minimum amount of code needed to draw a Text Object with

How do I view or search for all my own Forum Posts?

Is there an advanced search somewhere? Is there a link in my profile that allows me to list all my own Posts

What Buffer Types can I use in MQL4?

Hi, When I try to create an Array Buffer of type 'int' I get the compilation error "'SetIndexBuffer' - no one of the overloads can be applied to the function call": #property version "1.00" #property strict #property indicator_separate_window #property indicator_buffers 1 int BufferIndex[];

Help with plotting basic Ichimoku Indicator using built in function

Hi, I am new to MQL and am trying to get my head around how it works. Analyzing the default Ichimoku Indicator, I wrote my own version trying to use the "iIchimoku" built-in function , but even though it compiles without error it just doesn't work. This is what I have the doesn't work. Can someone

How do I get the timestamp of 'NOW()', i.e. what is the TIME this instant upon execution of this line of code?

I want to be able to print the timestamp something like this: Print ( "The time this instant is "+FormatString("%Y-%M-%D %h:%mm:%ss.%uuu" ,NOW())); To be clear, I want to print the exact time stamp of when this Print function is run, for debugging purposes. I want to insert this into my code at

Trading Computer Hardware Benchmarking - Standard Test

Hi All, It seems no one who benchmarks computer hardware components is interested in anything other than playing games. This is not useful to us here. Since I have identified a gap in the 'benchmarking practise' I have decided to define a Standard Benchmark Test that we, the Trading Community, will