Download MetaTrader 5

MQL4 and MetaTrader 4 - page 58

To post a new topic, please log in or register
I was trying to build an EA by using Envelop indicator and EMA indicator. But when I run the code it some orders were placed with wrong conditions. My Strategy is shown in the figure. I assumed Period 1 of EMA is equal to line chart. SELL ORDER - When downward  line chart cross with lower envelop...
  OnTick() time (4)
Hi all, I am trying to back test my EA but when I try to get the time of the tick it keeps returning the actual current time void OnTick()  {//---      WriteLog(IntegerToString(TimeHour(iTime(NULL,PERIOD_M5,0)))+" "+IntegerToString(TimeMinute(Time[0]))); I have tried but Time[] and iTime[] Any help...
Hi users, how do I allow all outgoing and incoming connections on my MT4 terminal on linux? I have the following issue 1) Push alerts will not send from linux server thanks
Hi I (Win7, 64, mt4, b1090) have an indicator CaVol with about 10 Parameter of which only the first two matters (the rest is for the presentation). This indicator has 34 puffer. Now I wrote a second indicator CallingCaVol() that calls the first one - but only with the first two parameters - assuming...
Hello everyone, I'm just learning how to code a EA, I'm very happy if someone explain this error for me This is my mini func int Lenhmua(int Loailenh,short x, short y)     {          if (Loailenh==OP_BUY || Loailenh==OP_BUYLIMIT )     {          if...
Hello, For the passed few weeks I've been a little stumped on where I'd place a variable for identifying reversals in the parSAR indicator. The main goal here is I want to include it in a buy signal, but I'm having issues dissecting it. Here is what I am using....
  Indicator Miscellaneous Questions (151   1 2 3 4 5 ... 15 16)
Hi, #Broker Time   I spent few hours for reading some comments, but I did not figure out how can I set my Broker Time to my indicators / how can I set my indicators to my Broker Time. (maybe I confused) My Broker Time starts from 01:00, but all my indicators works from 00:00. So how can I solve my...
There are several vendors charting system like Renko, rangebar, tick chart and so on. It is easy to attach EA and run EAs on these types of charts. However, back testing EA on these charts is real problem. Some of the vendors have their methods on how to back test but these methods do not back test...
Hello,   Could someone please tell me, how can i get Bitcoin index chart as iq option have? i didnt find any normal solution for getting it working. Maybe some broker you know?   Thanks 
Hi, I would like to know how I can easily check a value of a function / variable in my program. let's say I Have the following variable double TODAY_OPEN = iOpen(NULL,1440,0); is it possible to display the value somewhere so I can have  a look at which amount the variable is showing. thanks
Hi all I am using CCI indicator in MQL4 expert advisor. u want to set its fixed minimum and fixed maximum properties via MQL4 code. please refer to the below screen shot. please tell me how to get it done.
Hi all, I am trying to use SupportResistance custom indicator available in MT4 platform using iCustom function in Expert Advisor. I am using following code.           Resistance = iCustom(NULL, 0, "SupportResistance", 0, 0);           Support = iCustom(NULL, 0, "SupportResistance", 1, 0); By...
This should be an easy question: Does the OrdersTotal() function return the number of open orders for whatever chart the EA is loaded on, or does it return the total amount for the account? I.E., If I have the same EA loaded on say 4 different charts, and only one of them launched orders, are the...
kindly assist me how to install metatrader 4 on my windows mobile phone Nokia Lumia 900. been trying alot of way to install even try to download and install from metatrader 4 mobile and mobile SE, also cannot. so please consult me because im really rely on this mobile software to trade daily...
I have a variable... Double randomnumber1 = MathRand()/32600; But randomnumber1 keeps coming back as 0.0 even though MathRand is choosing random numbers between 0 and 32600!! I just want a decimal number between 0 and 1. JEEEEESUS. I've spent so long on trying to get this one line to work. How is it...
I have no connection to demo server AlpariUS-Demo for hours (as of March 5, 05:30GMT), even after I tried "rescan servers". Does anyone else have the same problem? Thanks.
Hello, when I try "Strategy Tester" of an EA i have "graphic errors". How can I fix the problem? Thank you, Aldo
Hi everybody, I am new on this forum and on MT4. I am programing an EA with MT4 for the forex market and I would like to know if somebody has a smart way to close partially a position otherway than closing all and open a smaller one. Also,is there afunction in MT4 to get the current strategy profit...
Is there any way to replace + ascii sign with a wingding char (225 - arrow up) when the former is set as string and used in objectsettext as part of a bigger text? i.e. if (cur1>=(euril+eurih)/2){ eurm = "+";}elseeurm = "-"; when invoked by ObjectSetText("object","D1: " +...
Hi, I've tried hard enough to find a basic Expert Advisor base on this conditions. If anyone have any, can i have it thank you. Thank you. I have this code from my custom indicator. Anyone have any similar will do. as i'm still learning to code my own, i will try to amend it here and there. Thank...
  price allert (4)
Hi guys, this allert sounds when the price exceeds or is on an exact price level set by the user when the user is charging, but sometimes it works and sometimes no, is there someone that can help me fix it ? extern double SuonoQuandoPrezzoSupera = 0;extern string Commento_Up;extern double...
Hi I am new to Forex and MT4 but I have programming background. I am writing my firs EA and there is one thing that bugs me, I had an impression that the logic flow of buying and selling the currency is as simple as buying something over the counter, i.e if i send a buy order, I am buying certain...
Can I FileOpen and write other things in my computer or is it just the default /mql/files and the Common Folders that I can open and write to with an EA FileOpen?
Is there a way to, for example, have the compiler put the chart's _Symbol right inside a string? FileDelete("Sell_Symbol",FILE_COMMON); If not, Ill have 30 EA's instead of just 1 because of having to write every single currency pair in there. I'm sure there has to be someone else who has faced the...
I am using this code :       dc_haut[i] = High[iHighest(Symbol(),Period(),MODE_CLOSE,15,i) ];      dc_bas[i]  = Low[iLowest(Symbol(),Period(), MODE_CLOSE,15,i)]; It should drow on higher close and lower close of 15 Bars, and here is what I get : https://www.mql5...
Hi, I wrote a function with input parameters but I could not insert an operator as a string: void MyFunction(int Freccia, string Dir){    //.......My code    ObjectCreate("Freccia"+T,OBJ_ARROW,0,Time[1],Low[1] Dir 30*Point);     ObjectSet   ("Freccia"+T,OBJPROP_COLOR,White);     ObjectSet...
Since upgrading to MetaTrader 4.00 Build 1031 (17 Dec 2016) I face connectivity issues on my virtual server. I have 4 clients running on a virtual server (Windows Server 2012 R2). It now happened two times, that after about a week one of the terminals showed "No connection" in the status bar. I...
The last published code in Code Base is dated 2012-09-29. Prior to this, multiple publications every month.....?  
Hello, this is my rule for closing a sell trade: if((Bid>iATR(NULL,0,14,1))) please could somebody tell me what I need to change in that code if I wanted to use three times the ATR (14) value (creating more distance from the bid, not a longer lookback period for the ATR)? Thank you!
Hi, I was trying to print my code on metatrader4 language editor, I clicked on print and print preview but nothing happened. I tried with another mt4 platform editor (the first one was alpari mt4, the second one was tickmill mt4) but the same problem happens. I cannot also access the print setup...