MQL4 and MetaTrader 4 - page 512

  Draw TrendLine  (5)
Hi there, Sorry for the basic question but - is it possible to programmatically draw a trendlinebetween 2 points (ie. Close of 4AM bar and Close of 10AM bar)? Thanks in advance!
Anyone know how to develop a multicurrency indicator ? I want to choose BETWEEN 1 to 10 different currencies and 5 bars for each currency. But i don't know how to do this
Hello world ! I switched from NinjaTrader to MT recently and am trying to get the hang of MQL-code, so please be gentle. I am currently trying to add a 'Breakeven / Trailling' functionality to my EA. I copied code from  the (in?)famous UniversalMACrossEA.mq4 (http://www.forex-tsd...
Hey People, i m testing a new strategy and there are always this errors ? 2017.02.06 19:04:54.903    2017.02.02 23:59:48  BO_EA_vortex_pme - 3 EURUSD,M1: OrderSend error 134 M1 Order send error: 138 can sb help me pls ?
Hello, How to use "\n" or "\r" into Comment() ?? instead of "  >|--|<  " to separate, I would like to go to the line down. Comment("|--|<  Daily Opened Price = ",Daily_Open_Comment,"  >|--|<  Marge_Pips = ",Pips_Marge_v1,"  >|--|<  Today_Profit = €",Today_Profit_USD_News,"  >|--|<  DrawDown = %"...
So this is odd. I have a function that is called before even OnInit() in my EA script. Of course this leads to problems...   Take a look. This is my initialize function: [...] double pips; double BottomLevelPrice; int LongTicketsStartLevel; int ShortTicketsStartLevel; int LongTickets[]; int...
  NormalizeDouble info  (17   1 2)
Hello everyone , I'm trying to normalize the decimal places of the moving average , this code is correct or not? Even if I do not receive errors , I am not entirely sure of what is written! for (L= 0 ; L< 50 ; L++){ if ( NormalizeDouble ( iMA ( NULL , PERIOD_CURRENT , 120 , 0
I have written the function below to close my orders. I want to close only the orders for this symbol and magic number, and only either buy or sell. I've placed the order close within a loop that checks if orders are still open on this currency pair and continues to attempt the close until...
Hi, In previous version I use to do this way and it worked fine:       /// --- Prepare data --- ///                 if (Symbol()=="AUDJPY" || Symbol()=="CADJPY" || Symbol()=="CHFJPY" || Symbol()=="EURJPY" || Symbol()=="GBPJPY" || Symbol()=="USDJPY" || Symbol()=="NZDJPY" )                {double...
       int window = 0; double NewProfit; datetime CurrTime; ChartXYToTimePrice(0, 320, 410, window, CurrTime, NewProfit); Why am I getting zero values for CurrTime and NewProfit?
Hey guys, I have some problem to get the right signals.  I have already loaded the solar_wind indicator in the EA with iCustom, but the signals aren't really reliable. The indicator buy/sell signal aren't synchronous with the indicators alerts (alerts happens when cross is happening).  Now I noticed...
What formula can I use to assign EQUAL distance between ask and profit level accross instruments when going bullish? I realize that instruments with higher spread give shorter distance on the chart, and vice versa. I have tried the following but the distances still vary.extern ProfitLevel = 200;...
On MT4 build 1045 I try make optimization my strategy. Optimization made some passes, but only one (first) includes trades. Because of my strategy is not simple, For surveythis problem I made very simple strategy. It only make order send in initsection and on first tick. But this have this problem...
  MT4 EA Candles History  (14   1 2)
Hello,  I have an EA that needs to get all M1 bars currentyl in the server for a symbol. How can I achieve that?   Thanks  
Is there any way around this? As you know (or maybe not), trying to backtest an EA that uses the function FileOpenHistory generates the error: "function is not allowed in test mode"
Hello dear Traders : ****************** I need to make Break Even for 2 orders with the same symbol simultaneously I get error 130 and error 1 Any Ideas? Here is the code :  void Break_Even(){ {   if(OpenOrdersThisPair(Symbol())==2)  if(OrderSelect(0,SELECT_BY_POS...
Hi, Need help to code with time. I want to place orders before market opens. Since there are no ticks I don not get the EA to trigger on time. The specific case is to make the EA send stop entry order at server time 06:30:00.000 I tried to search the forum but maybe I am not using the right keywords
I'm trying to ensure that all my trading history is kept for tax purposes even though some brokers might delete transactions history from their end. Here's my setup: I have a few accounts from different brokers running on MT4 VPS, and I'm using ftp publishing to export the history to an external...
Hello guys, sorry for stupid question, but what is the purpose of the history center ?  I have the feeling, that i am continuously have to run for historical market data.   Not each time but very often when i open the history center, for instance the 1 hour bars for AUDUSD are just back 1 year and i...
How could I do to see exactly what I have on my computer to my phone, without using programs like teamviewer As I can install the programs that I use in my computer MQL4 and that those same programs can be seen in my program MQL4 of the phone with the application of mql4 for example I download some...
Hello, I coded a strategy in which trades / pending orders are placed at 00:05 server time. I use same code on my PC with different brokers works perfect placing trades on 00:05 But on VPS same code same brokers EA does not even try to place order at 00:05 But if i try EA with 02:05 time to...
Hi, can I detect from within my EA whether it is running on live (forward) resultsor on strategy tester (historical data)? thx.
Hi I'm going through an old EA I found on a post from some years back, I've come to this and don't understand what logic is behind it. extern string entrylogics="Entry Logics"; extern int timeframe=0; extern int period=5; extern int shift=2;                      // bar in the past to take in...
Hi Guys, I'm new in mt4 code, i have the issue on the loop. I'm using MODE_HISTORY on the OrderSelect() to find the close order. My EA will run 2 order at 1 time. each time the order is closed. It will check the condition of the closed order and open the new order. Sometime, the EA will have 2
HOW TO HIDE OR TO SKIP OR TO SHIFT SATURDAY AND SUNDAY DATES FROM HORIZENTAL SCALE OF METATRADER 4 !?
hello how can i make simple robot in metatrader4 with c++ ? is it possible? thanks
Hi I am looking for an EA that can open two opposing trades at the same time. I am assuming this would be on two separate accounts as most brokers do now allow two two trades on the same currency.
Hi Everyone! I am brand new to FOREX and MQL4. I had some limited C/C++ previously and when I realized that there is a possibility to program Expert Advisors I became very excited. So I started learning it from different materials on the net and applied for some udemy tutorials as well. I am...
Hi. In these years in the market, I could observe that price patterns is the key and best behavior on market prices future. The history always repeat itself. Past and future are an illusion, all is a continuum line of time.  But all know that a heuristic calculus is a little heavy. So, why not use...
Hello, I have a .csv file with some data, if i try to import the data to my MT4 the History Center can read the data, but it dont import all data (see attach file). For exaple ther is some data missing: 20:45 20:20 20:15 20:10 but as you can see, this data are exist in the .csv file. Could anyone