Download MetaTrader 5

MQL4 and MetaTrader 4 - page 125

To post a new topic, please log in or register
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, MODE_SMA,...
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...
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...
When the alert window pops up and you use the scroll feature on the top half it does not work, in fact if you use the scroll feature on the bottom the top half creates a BIG space for what??  See attached. HOW CAN I GET RID OF THAT BIG SPACE THAT DOES NOTHING, IN FACT HOW CAN I TURN OFF ALERTS...
Hi, can I detect from within my EA whether it is running on live (forward) resultsor on strategy tester (historical data)? thx.
Hello, Probably already discussed? but i would like to trade Forex via MT4 or 5 on my new Samsung Galaxy Note. I have a Forex account with Forex.com and trade via MT4 and i have installed a number of EA's. Is it possible to install MT4 on my Samsung and then log in to my account on Forex.com so i...
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 guys, Today I started up my computer and noticed that my accounts where gone. So first I setted these up again. Next I noticed my most important indicator is gone. So I went to Indicators->Market and tried to add the indicator I use most often. However, I can't attach it to any chart, it just...
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...
Hi Guys, My coding below basically to check reliability/validity of Hammer/ShootingStar (period H1) on period M1 chart. - swing up/down on the last 30min before it closed. My problem is with this line ----> while(TimeCurrent() >= MinSec(1,0) && TimeCurrent() <= MinSec(5,0)) The condition is true,...