Download MetaTrader 5

MQL4 and MetaTrader 4 - page 114

To post a new topic, please log in or register
Hi,  i have two identical instance of MT4 where i run some backtest. Same settings, same historical data. One of them was connected to a broker and the restart without credentials just to allow MT4 to use microlots. Now some strange happens in the MT4 that has been connected just one time: With same...
Is it true that I cannot define e.g. for Comment(..) leading zeros  before the decimal point. As I want to show percent-numbers which range from 1.1% to 999.9% and I want to be able to see mat the chart (with Comment(..)) 001.1% .. 009.9 % .. 022.2 % .. 123.4 % .. 999.9 %. I tried StringFormat(%03...
I've been using an EA of my creation for a few years now and it always worked quite well (at least in terms of doing what was expected of it, results are a different story!).. I've only used it on currencies so far without issues, but recently I tried to apply it to XAUUSD The result is that the EA...
I've created an indicator that will plot horizontal lines on each tick. On each tick, I'd like to find the line that is closest to the current price in order do other things (plot vertical line between those 2 points, know how to do that.) I figured the best way would be to just loop over all chart...
I have 3 indicators that i have used for a while, but lately i have tried to automate my trade but discovered that some of the buffers are hidden. Can anyone help to modify it so that it displays its hidden buffers on the data window. I use these 3 indicators for Daily chat trend confirmation. I...
Is this the best way/correct way to code the Exponential Bollinger Bands?? I want to know if my formula is correct. #property indicator_chart_window #property indicator_buffers 3 #property indicator_color1 clrSilver #property indicator_color2 clrSilver #property indicator_color3 clrSilver extern int...
Dear Sir,  Please add settings when reach the profit in basket close all orders at a time. Add Input options 1. Basket Close = TRUE & FALSE 2. Basket Close In = AMOUNT & PIPS  2. Basket Target = 10 if Basket Close TRUE means when reach basket profit $10 close all orders immediately. if Basket Close...
  optimization of code (17   1 2)
Hi, I found somewhere there that i way to optimize the code is to use multiple if() instead of &&. So I made changes in my code and stopped working properly. So where is the bug? Plz help This worked slowly but properly void  SLman() {  int type, ticket;    int total = OrdersTotal();      double...
HELLO I NEED HELP, AND ME AN MY FRIEND AND WE HAVE MADE A TRADING SYSTEM FOR MT4, MADE THE TESTING, OPTIMIZATION I WANT TO SEE THAT TAKES MANY HOURS AND DAYS, THERE BEST SOLUTION TO OPTIMIZE IN LESS TIME?
Dear Friends, I'm writing my first EA. Order send is not firing but i am getting  next line alert at every tick. Could you please clarify why this is happening? //+------------------------------------------------------------------+ //|                                                 Lal-First EA.mq4...
My mt4 platform for android cannot see any trading server why??
Hi, can anyone help with osme code to Martingale Binary Option EA on next candle. I have code from EABuilder which will Martingale n next signal but I was looking to make this an option for next candle or next signal This is the code from EABuilder..  Thanks...
Hi! Instead of hovering my mouse to change the time frame, is there a single hotkey i can set or press to change time frame?  If yes, can i also choose if this hotkey changes timeframe for all my charts or just the chart im viewing? thank you! for Mt4
I am currently working around some really basic stuff and I can't wrap my head around this one. How would a simple program look that would do nothing else but count the amount of ticks recieved in a 30 second period? I'm asking for the actual code that can be executed. I will be forever grateful.
Does anyone know how Point is calculated in Meta trader 4? The documentation for Point says  - ` The current symbol point value in the quote currency.` But what does that mean? I noticed that in meta trader sometimes Point is 0.1 other times its 0.000001 for the same currency pair. Any insight...
Hello Everyone, Am currently building an EA thats base on the ichimoku kinko hyo system i have  manage to code a few lines but am close to no where, cos the EA is incomplete and its giving me errors. Firstly, am having problem in putting the trailing stop in my code so that once the price hit the...
  CHART_SHOW_TRADE_LEVELS (12   1 2)
Hi, I have a problem with CHART_SHOW_TRADE_LEVELS. I have written code:    long tradeLevelsVisible = 0;   if (ChartGetInteger(ChartID(), CHART_SHOW_TRADE_LEVELS, 0, tradeLevelsVisible))      Comment("Show Trade levels="+tradeLevelsVisible);   else      Comment("");   and tradeLevelsVisible variable...
I have a newbie question about coding. As you see on below picture I attached 2 ZigZag indicator to a chart. First with parameter Deviation=1000 color white and second with Deviation=5 color red. As you see there is not influence of Deviation parameter (indicators are overlapped).    I looked at...
Hello everyone, Because i believe in Fibonacci tools, I'm trying to add them all in one simple indicator. So here's my first indicator which will draw almost all Fibonacci tools such as Retracement, Arc, Fan, Expansion and TimeZone based on ZigZag swings (expect the Channel i couldn't make it). It...
Hi, I would like to add the attached indicator to my EA using icustom. What double would I have to declare for uptrend/downtrend ? Thanks
Hello guys, I have this problem I can not solve. I wrote this code: enum Tipo_MM  {   A=MODE_SMA,// Media semplice   B=MODE_EMA,// Media esponenziale  }; input Tipo_MM Tipo_MediaMobile=A; Then I insert "Tipo_MediaMobile" in this code: (iMA(NULL,PERIOD_CURRENT,3,0,Tipo_MediaMobile,PRICE_CLOSE,0) but...
Hi Everyone,  I am coding a EA. I dont know how to make Stoploss move automatically. Could anyone please help me on this ?
Hello folks, What i want to do: I have two target prices. A low target and a high target. I want to check what has been reached last on the current chart. Like checking if the last renko bar was down or up.  I also tried all variations of Low[], High[], iLow and iHigh, nothing changed This is what I...
Hello Members, Here is the code for testing a binary robot: // Trade operation ----------------------------------//    if(OrdersTotal() == 0 && D_B > 0 )    BuyTicket = OrderSend(Symbol(),OP_BUY,lot,Ask,(int)CalcSlippage,0,0,"BUY",MagicNumber,0,clrGreen);    if(OrdersTotal() == 0 && D_B < 0 )...
  Error when Enabling DLL (18   1 2)
Hi, I purchased an MT4 indicator, and I've been told I installed everything correctly... I installed the DLL file in MQL4\Libraries, the EX4 in MQL4\Indicators. Tools/Options\Expert Advisors... Allow DLL Imports, and on the Common Tab of the indicator, I checked off both Allow DLL imports & Allow...
An MQL4 function I've created and used before in prior MT4 versions is now yielding an "array out of range error" in my EA in latest version of MT4. I've searched around and can't find an answer. The error is referencing the line:  Level = Levels[j];  after the word "Levels" How do I fix this?...
I tried compiling an EA which is posted below https://www.mql5.com/en/articles/100 The code is giving compilation error at the following (as wrong parameters count) adxHandle=iADX(NULL,0,ADX_Period); I do not see any issue with the statement. How do I fix the error? Error list is attached.
Am currently building an EA thats base on the ichimoku kinko hyo system i have  manage to code a few lines but am close to no where, cos the EA is incomplete and its giving me errors. Firstly, am having problem in putting the trailing stop in my code so that once the price hit the take profit it...
Hello I have an array of arrays of ints. I want to access a particular sub-array but compiler says: "Invalid array access". What am I doing wrong? Please Note: I do NOT want to access individual elements of the sub-array int            ...
Hi, Gurus: Due to the Bid Price horizontal label Coveres the Ask Price label sometimes if the spread of the instant market quotes is too small and it covered by the Ask Price is really annoying! I know the configuration of the MT4 terminal give our users one option : Select the Ask Price Horizontal...