Hello, I'm wokring on a code for simple earnings on M5/M15/M30, just so I don't have to work while studying :P Jokes on side. MQL4!!! I can't get it to work like I'd like to, I want it to close positions when middle bollinger band is touching the candle. Here's that part of code. I've tried many
string cfgFilename = "myfile.cfg"; string page = ""; int h = FileOpen(cfgFilename, FILE_READ|FILE_BIN); if(h < 1) { Alert("[ERROR] "+Symbol()+" Cannot read file: "+cfgFilename); return (false); } else { int len = FileReadInteger(h, LONG_VALUE);...
are they the same? if I put my logic in start() it works just fine but void tick() doesn't seem to do anything. Also I realised that when the price spikes pretty quick, my EA can't really catch it in time with start() so I thought tick() might be a better use..but then I just read that they are the...
Hi, I'm a beginner in MQL4 and my english is not so good, therefore it's a bit complicated for me to learn well MQL4. But I have wrote a script that apply a certain template to my graph, and i would like the same script to also set chart on foreground (price drawing above indicator drawing). Could
hi everyone it's possible to have an icustom inidcator to show both ris and ma of price when applied in charts? thanks
I am updating my EAs to work with the latest release of MT4 Version 4.0 Build 600. Everything has ported across to the new compiler with relative ease, however InternetOpenUrlA is now returning an error. I am using the following code. Can anyone advise why this function is behaving differently with...
#property show_inputs #include <CUSTOMFILES.mqh> int magicNB = 55555 ; input int bbPeriod = 50 ; input int bandStdEntry = 2 ; input int bandStdProfitExit = 1 ; input int bandStdLossExit = 6 ; int rsiPeriod = 14 ; input double riskPerTrade = 0.02 ; input int rsiLowerLevel = 40 ; input int
I've been coding for about a year now but I've coded from a procedural paradigm. If this then that, if price does this, modifyOrder that, so to speak I noticed that MQL4 also can be an object orientated language but I just cannot conceieve where would object orientation apply to algorithmic trading
I have an EA to perform trade (open/close) which handles thousands of orders. Recently found an error as mentioned in the subject. Now I would like to know in what condition or from what kind of API call may raise this error. Why I am asking so is because there are several MQL4 API calls available
Hi, I am new to learning MQL4 coding and I am trying to limit my program to oly allow one open order at a time however in my backtest I am getting multiple orders opened up. Here is my code. extern int TakeProfit = 40, StopLoss = 40; extern double lots = 0.10; void OnTick() { // create
Greetings, Will someone please help me with this. When I go to the Market page and look under Free MT4 EA's, none of them will download for me. It asks "Do you have MT4/Open MT4?" and I do have MT4 installed already, so I click on that and nothing happens. I've tried reinstalling the program,...
Hello, when I run the following code it works as supposed to with no errors, but when I back test it ,it creates the error (incorrect start position 0 for ArraySort function) void OnInit () { int ct = 50 ; long eaHistoryArr[][ 2 ]; ArrayResize (eaHistoryArr, ct); ArrayInitialize
I have a new desktop with an AMD CPU (not sure if that matters). I have been trying to download and install any brokers MT4 and none of them finish installation. They all say near the end of the installation "something went wrong....try again later". An icon appears on my desktop that will not open
Hey guys, When i customize the timeframes (visualization) on my Pattern Indicator (MT4) and switch between timeframes on my chart the arrows of all timeframes get mixed up and floating all over the screen. Refreshing doesn't work and tried different indicators but same problem. When i check the box
Hello, I'm looking for someone who can help me develop an RSI crossing warning indicator. I tried in vain with freelancers and those 4 times. and i ran into crooks. my project is simple if a charitable soul is willing to help me. Adrien Scenario 1 Higher timeframe (h4) -- RSI 1 greater than RSI 2
MT4 newbie. This is actually my first trade so thanks for the patience. Here's what I'm trying to achieve. Buy EURCHF Entry: 1.0800 Stop Loss: 1.0735 Target 1: 1.0875 Target 2: 1.1010 I've read enough about how to do this such that I tried to do this in two trades, each with the same Entry and Stop
[Deleted]
Can anyone explain to me how I would set a custom indicator into a series array? I need to find the highest/lowest value of an indicator for a certain number of bars. I did read somewhere that explained I would need to place the indicator into a series array then do ArrayMaximum and ArrayMinimum to...
Hi, I am new on MT4. I was looking for an EA which allow me to add multiple TP on single trade. for example: Add a Stop loss at -20 pips Add Take Profit 1 at +20 pips Add Take Profit 2 at +30 pips SO basically when Take Profit 1 hit +20 pips it start operating as Stop loss. Trade will close once it...
All of a sudden, when I open up MT4, I'm not automatically logged in as I usually am. Instead, I am prompted to log in. But the listed server, FXCM-USDDemo01, is incorrect. If I click on the drop-down menu and select the correct server, FXCM2-USDDemo01 (notice the "2" that appears after "FXCM"), and
hi, i would like to close open orders, what is missing in my code? especially closing orders part? thank you int period1 = 50 ; int ticket; double volume= 0.1 ; input int trailing = 250 ; int OnInit () { return ( INIT_SUCCEEDED ); } void OnDeinit ( const int reason) { } void OnTick ()
Hello, I am looking for a Horizontal line which do not display by the normal curved line, but instead, I only need it to show horizontal line level. Is someone already have it or, can lead me to do it myself ? Thanks
Hello, I typed my MetaQuotes ID within the Notifications list under Options on my MT4 desktop platform. I tested the push notifications and the message was sent to MT4 on my phone. I ensured that the indicator I am using has "DoAlert" as an option under Inputs. The notifications are not coming to my
hi Everyone, I have written a code for trying to enter a trade and exit a trade based on an fractal indicator . however, im only able to exit trade with trade profit but unable to exit a trade with the fractal. for example...... : -Enter buy trade with an up arrow , and exit the trade when down
Hi there, Can anyone please tell me which indicator is this one that presents: -current price -spread -current candle high -current candle low -pips to HOD -pips to LOD -candle time Thanks a lot.
Hello, I ran a backtest of my EA I'm building using the backtest optimizer. Started with 1000 USD, ran it over 2020 year data full tick data. Was surprised to find some entries that were producing 300K profit in a year with only starting 1000 USD - Thought I had hit the jackpot there for a second
hi when I open position in the chart shows some line and arrow I don't want it puts this objects in the chart when I open position what should I do? Best Regards Neda
Hello, is it possible to have a certain range of bars already on the chart when the strategy tester starts in MT4? Thanks
This code prints "0" though it should print "1". struct X { int N; X() { static int n = 1 ; Print (n); } }; X x; void OnStart () { } This code prints "1". struct X { int N; X() { static int n = 1
How can I program my EA to do something when a new candle has appeared? What is the command for a new candle appearing? Anything like: OnNewBar() I need to do something when a new candle arrives, e.g. to reinitialize the content of a variable. E.g.: if (A New Bar Arrives) {MyVariable = '' '';}
Hi folks, I am trying to retrieve history data from MT4 to build a model with. The problem I have is that I need to load the values of a custom indicator into a 3 dimensional array and when i try to run the Expert is history, it does not work, and gives the alert: "not eough memory for EX4 file" and

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
If you do not have an account, please register
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.