MQL4 and MetaTrader 4 - page 480

I'm doing multiple broker backtesting for some strategies I've created. The data used for testing is the same at all brokers (via import). I'm testing using MT4 build 1010 on all. I'm not seeing any errors when testing my strategies at FXCM, Tallinex and ForexWare/TradeWiseFX however when testing on...
Hello everyone I want to create multi-currency EA but i have some problem when I want to check last orderOpentime() for each currency order but EA will check orderOpentime() for last order in list. TimeCurrent()-OrderOpentime() >= Timediff { OPsell(); or OPbuy(); } I dont know how to coding for
The situation: an EA has opened two position with aTckt and bTckt and manages them (controlled Comment()). Now I close manually one of them, e.g. aTckt. But the following code neither set _LastError nor does OrderSelect() return false so that n is not incremented and the EA enters the branch: if(...
Hi! I am backtesting a simple EA I wrote and the EA takes a position when the bar closes outside of the Bollinger Band (either upper or lower). But what I want is the EA to take a position as soon as the BB is hit (next tick).  Probably common question, but can't find the information online...
hello, I am receiving the mobile alerts from mt4 to my mobile very late, with a huge lag, sometimes a few minutes, most of the time 2 or more hours. tried to reinstall the app, but with no change. when I restart the mobile phone for a small time I receive the alerts with less lag (even if not
So I have a super simple EA that trades based on the time of day and a moving average . Just made it for fun. I am starting out with EAs so maybe I missed something, but the download amount in the bottom right corner of MT4 increases per each tick until the program crashes. I have an I7 processor so
  dialog  (2)
#property strict#include<Control/Dialog.mqh>//Declare AppdialogCAppdialog OurInterface;Using MT4 Metatrader Editor. Dialog.mqh is not compiling. Please are there any new changes to  to Dialog.mqh header. Thank you.
Hello Master Coding, please help me to add Timezone in to my Test EA .... i really appreciate who want to help me... thank you.... //+------------------------------------------------------------------+//|                                                         Test.mq4...
GreetingsCan any programmer help me to modify the code of an EA I'm testing?It is an EA that trades when price touches trend lines.It uses the color and description of the Line to identify it and execute the order.But I am using trendlines that are provided by a custom indicator.The original EA code...
Hi, I am new by EA. I try to build a very simple EA such as using the MACD to check if there is a golden cross (MACD crosses over the signal). If there is golden cross, go long. If there is a dead cross, close the long position. My EA is attached. By back testting one can see the long position is...
Hello everyone, I am trying to add a loop in an trading EA someone code for me.  The EA uses an external indicator which supplies the BUY and SELL signals the EA uses to open/reverse trades.  I have managed to add a few cool things to the original version by reading the manuals and internet searches...
Hi, Trying to understand why I got the OrderClose error 4051 (invalid ticket for OrderClose function).  I did read all the documentation I could find on google searching for the error code.  Also read https://www.mql5.com/en/forum/139592 . But because I am writing my first EA I don't fully...
  Lot calculation by Vince  (119   1 2 3 4 5 ... 11 12)
Ported from Roman 14.08.2011 06:37 Hey guys, please advise, I am looking for optimal f (for lot volume calculation) by geometric mean method using R.Vince's method. The task: go through the orders history and with increment f = 0.01 from 0.01 to 1, find its optimal value where TWR is maximal. the
i am making an ea that send orders if the volume is above the 21 moving average of the volume buy when i put my conditions for the order and test nothing happen , 0 trades taken what is wrong with my code? double vol[ 21 ]; for ( int i= 0 ;i< 21 ;i++) vol[i]= iVolume ( NULL , 0 ,i);
Hi, I first open 3 orders manually. Then I start the EA which does nothing but close all the opened orders if I delte it from the chart. My code look as follow: ...//+------------------------------------------------------------------+//| Expert deinitialization...
Hi, I see from an EA followings: ...//--- go trading only for first tiks of new bar   if(Volume[0]>1) return;... It seems only when the Volume[0] = 1. it is a new bar, right?
Hi there, I was wondering how to manage a single MT4 running with MQL5 Signal and my own trading/EA.  Could I trade by myself in the same MT4? Are other orders (not connected to MQL5 Signal) manageable by Metatrader MT4 without issues? Could I run an EA in the same MT4 with MQL5 Signal running?...
  make symbol()  (1)
I brought a file of history through the fileopen function. However, I failed to replace the Symbol. Multi Pair information is needed in ea, but it is not possible for testing. (It is not intended to trade multiple varieties in a single ea In real transaction, I plan to utilize " iopen, " " iclose, "...
Hi, I'm new with this mql languange, I want to connect my mql4 with mysql on the cloud, I use mql4-mysql service. When i just started why it shows me an error like this? https://gyazo.com/914b51e138586bd7ca7fdf8eca01348f I already search for it, but I can't found the solution and why it happens, Is...
Hello, Maybe someone can help which is highly appreciated. I want to  backtest an EA in order to find out the optimal stop loss/profitability. Ea runs based on external value from another software. I have the CSV file for one month(file stored in \tester\files): e.g. 2017.05.01 00:00:00,1 2017.05.01...
Hello. I am trying to release my first program on the market. It is a trading simulator/trading panel with many features. Its main purpose is to allow traders to test their manual strategies in MT4 Tester mode to save time, but it can be used in real trade mode as well. In demo mode the number of...
I am new to coding and still try to learn it.  Can somebody tell me how to do this. The case is there is a  EMA with period of 9 and I need to get a signal after crossing that EMA from current candle close. I appreciate your kind help. thank you.
Hi guys, I am having a bizarre problem. A simple expression is giving me a consistent error. Could anyone give me a hint what is wrong? //--- preprocessor . . . int     A[]; //---- in OnInint() section { A[0]=5; Print(A[0]); } ERROR: array out of range Thanks a lot,
Hi everyone,  Practising writing EA's and want to build a simple robot and see how it works.  I am trying to write a rule: If upper bollinger band is hit sell fixed position size and vice versa.  My reasoning was that I should compare the current price level of the upper band with the current tick...
Hi. I'm in programming some EA, and I have an issue with identification of index of specific candle. I need the High and Low values of the first H4 candle of the current week, it means High/Low of Monday 00:00-03:59 candle. I thought to solve that with    DayOfWeek ===> The shift of Monday will be...
[Deleted]
Hello, I am trying to solve "return value of "orderSelect" should be checked " from the following code. for (cnt= 0 ;cnt< OrdersTotal ();cnt++) { OrderSelect (cnt, SELECT_BY_POS , MODE_TRADES ); if ( OrderType ()== OP_BUY && OrderSymbol ()== Symbol ()&&(( OrderMagicNumber
  Fileopen ==> "1"  (1)
I want to import data(EURGBP30) through the fileopen function instead of history center EURGBP302012.02.27,10:00,0.84648,0.84669,0.84609,0.84664,16392012.02.27,10:30,0.84663,0.84724,0.84633,0.84667,17732012.02.27,11:00,0.84666,0.84712,0.84569,0.84580,16512012.02.27,11:30,0.84579,0.84589,0.84468,0...
Hi is there another way than to open a file to read, read it totally, close it, do some changes e.g. actualize the last access date of a line  and then reopen it again to write and rewrite it completely and close it. I open this file read|write|binary (!), read it, place the file pointer at the...
The charts do not stay in time sync with each other. The S&P can be very inconsistent in the mornings and if no data is received the chart does not put in a gap filler and so when comparing say Gold to the S&P visually it goes out of sync. Does anybody know of a fix for this???
From the dairies of the worlds worst programmer So I run the attached code through strategy tester Yet every time I do it slows down each pass just a little bit more. Initially I could do a non-visual test in under 10 minutes. Now it takes an hour. As for using the optimizer, well given up on that....