Forum

Meta Trader in invisible/headless mode?

I have a script that launches the Meta Trader terminal and runs some EAs on a regular basis. For this, I use an MQL config file that I run this way: C:\Program Files\MetaTrader 5 \terminal64.exe /config:path\to\MetaTrader\folder\config\custom_config.ini The problem is that the Meta Trader window

MQL config file to automatically log in?

Based on the documentation which lists a Login and a Password entries, I thought creating my custom config file that would allow me to run EAs programatically from a Windows command line should be a relatively straightforward task. I created the following very basic .ini file, almost identical to

Inbuilt AMA inconsistency when using iCustom

I have a working script - to a huge part thanks to the precious help I had received from this forum. The script now successfully performs the following steps: gets a filename input and reads the corresponding csv file that contains Yahoo Finance OHLCV data for a given stock, e.g. Microsoft

Calculating RSI on array from csv file in MQL5?

I have a bunch of csv files in MQL5/Files and a function that reads a csv into an array called output_arr[]. The function prototype is: void ReadCsvData( double &output_arr[], string ticker, string column= "close" ) It works fine and I am able to view close prices (or any other OHLCV values) in the

iCustom on array?

I know that for some indicators there exists an ...OnArray() version in MQL4 (e.g.: iMAOnArray(), iRSIOnArray() etc.). I want to apply any custom indicator on an arbitrary array but it seems iCustom() doesn't support this. I'd be surprised if indicator calculation on an array of values was only

Efficiently reading in a csv file?

I placed "AAPL.csv" into the MetaTrader terminal folder 's Files subfolder (MQL4/Files) to be accessible by the EA. The structure of this csv is as follows: Date,Open,High,Low,Close,Adj Close,Volume 1980 - 12 - 12 , 0.1283479928970337 , 0.1289059966802597 , 0.1283479928970337 , 0.1283479928970337

EA to open position based on consecutive PSAR values

Hi there, I am new to MQL4 programming and came across the following practice problem online: create an EA which checks the previous N = 10 candles and if PSAR is consecutively above than iOpen() for all these N = 10 candles, open a sell position; if PSAR is consecutively below iOpen() for N = 10

How to draw MA of OBV indicator?

Hi everyone, I'm a newbie who recently started learning MQL4. I've been struggling with the problem below for quite a while now without success. Basically what I'd like to achieve is having the OBV indicator with a moving average in a separate indicator window. I used the OBV.mq4 for a start and

Why did my indicators' vertical axes stop being aligned?

Hi there, I noticed something weird happening when I want to place two indicators on top of each other. In this case below, I have two CCI indicators in the same indicator window but, as you can see on the attached image , their vertical axes are not aligned. For example the level 0 of the slower