Download MetaTrader 5

MQL4 and MetaTrader 4 - page 85

To post a new topic, please log in or register
how to get current total pips in all open trades? mql4 and mt4 for a 5 digit broker let's say 1st order has opened at 1.00005 and now it's on 1.00025, and second order has opened at 1.00015 and now at 1.00035, then I want a code to get the current total pips of both trades which is +40, how to do...
Hello fellow traders, I want to modify an existing Murrey Math Line indicator (https://www.mql5.com/en/code/8570) on how it drawth the lines. Right now it draws the Line as a Horizontal line on the charts but I want to change it so the line will be only displayed from the current candle (start) to...
Hi there,  Just want to ask, if I use an activation on my current PC. But my PC seem have some problem so I have to take it to the shop and might reformat the PC. So is that mean that I will need to spend another activation on the next? 
I am trying to write ea that will place buy when the indicator show arrow sell or buy. I am using icustorm to do that but i am struggling with comparing values. here is my code:        void OnStart()   { //---        double sell=iCustom(NULL,0,"myIndi",0,0);        double buy=iCustom(NULL,0,"myIndi"...
Hi, I'm a relative newbie to MQL4 (but not programming). I have created a new EA. I find when I run the EA it somehow defaults to the symbol at the top of the Market watch window, in this case USDCHF. I.e. the Symbols() function returns USDCHF. The output in the Experts window also refers to USDCHF...
Hi I'm trying to retrieve the last 3 values of stochastic main,  and calculate the angle of these three values/lines Is there a way to do this?  I have no issue calling the values out, just can't figure out how to get the angle of these 2 lines (that connects these three Dots)  Thanks! 
Hi, I would like to add an alarm on trade entry to my EA, can someone assist with the code. Thanks
Hi, Is there a function out there that scans forex factory for upcoming news and if there is, it will not trade?  I'm trying to code an EA to have the ability to know if there is upcoming news and if yes, how many minutes away, and if it's high risk news.
Hi Guys ,    I am new in Programing , and want use from an Indicator ( its name is Trend Signal ) , and Signal Line , I tried use iCustom in my EX but it don't give any data , I will be very thankful if you say me where is my wrong ....
how to limit the number of orders on mt4 to be allowed ? to open maximum 5 orders for example? is there any EA or script for this? or configuration?
i have been baffling with the alert when on the current candle , that is i want it to be given immediately the arrow show on current candle. Have worked on the arrow to be showing on current candle when conditions are met  by changing the array to 0 (zero) in other be reading current candle. if...
There doesn't seem to be any function that indicates whether the market is open or closed. I have looked at: IsConnected() IsTradeAllowed() MarketInfo(Symbol(), MODE_TRADEALLOWED) However all of these still return true or 1 during the weekend. Is there a foolproof and good way to truly determine...
Hi, In the attachment is an indicator which does similar to StochRSI. There are two input paras: RSI and K and D. When I chose RSI=14, K=2 and D=2, I get error message as follow: ... 2017.07.09 21:03:30.843 StochRSI EURUSD,H1: zero divide in 'StochRSI.mq4' (77,56) ... But by some other timeframe...
Hi guys I've encountered a bug when spanning a single MT4 instance across 2 or 4 screens.  whenever you buy, sell or close a position, the MT4 will randomly minimize itself back to a single screen (and also then re-arranges the task bar which is quite annoying!) My guess this isn't a supported...
hello, for some reason my mt4 platforms will not open from desktop icons or through the terminal.exe in the metatrader folders for the specific brokers. only one of my several brokers will open. Running windows 10. tried to re download platforms but still have same issus. Also tried a full system...
Hi guys, I have an idea to locate my stop loss (in case Buy Order): at the lowest of 3 previous candles (i used M15 chart) I tried using iLowest ((iLowest(NULL,PERIOD_M15,MODE_LOW,3,1)) but when tested in MT4 it wont modify the SL at correct price, even in other trade SL was not modified at all....
  Doubts (3)
When two currency chart's are open  the first chart is inactive.  How to make it active using mql4 without closing second chart through programming.
Ok. I'm quite <Deleted> right now.  I spend hours creating profiles for each currency pair and now I noticed that they are all mixed up!  I do save one after another but now when I try to open let's say EURUSD which was saved first it show me NZDUSD that was saved somewhere in the middle of the...
Hi, Hoping someone can help me with this. I'm trying to send an HTTP Post with parameters, but have not used them much. How do I format/send the parameters? Where do the parameters go? Here is my basic code so far: void OnStart()  {//---   string headers = "Content-Type:...
when some condition come true and after that need to find current candle'shigh to sell order or current candle’s low to buyorder in same current candle. How to write code? please guide me. void OnStart()   {    doubletickLast;                              double tickCurrent;    double tickNext;...
if(Buy Condition Come true) //buy   {     static double LastAsk=Ask;     double CurrentAsk=Bid;            if(CurrentAsk<LastAsk)      {        LastAsk=CurrentAsk;      }     if(CurrentAsk>(LastAsk+2*Point))     {         tkt=OrderSend(Symbol(),OP_BUY,Lots,NormalizeDouble(Ask,Digits),0,0,0,"BO exp...
Hi. To realize a simple Exper Advisor i need to know the value that MT4 writes to the right of the momentum graph at the top gray line that delimits the graph. To understand this is the dynamic value that appears in the right column at the top limit of the graph. If you can not read it, someone can...
When I run strategy tester, a balance chart is created and stored in .gif file. Is there a way to create same chart for equity instead of balance?
Hi, Im very new to day trading :) I would like to download my indicators from my pc metatrader 4 to my android phone app MT4. I have 3 indicators that are essencials to my trading strategy. If its not possible, i would like to know if i can download those indicators at a online mt4 plataform so i...
Hi, i wanna build a custom indicator containing alert or notification from offline chart. But this indicator will attach or put in H4 or other available TF chart (not the offline). Is this possible?
Hello guys, I am trying to read data from a txt file but for some reason it doesn't work. I wanted to share the code with you in case you may have a solution. Thanks a lot in advance. So the file is a TXT file having only 2 integer values of 1 and 10 separated by XX. So the file content is like...
Splitting a string works if I use: StringSplit(strFile,'\t',arrTab); but this does not: StringSplit(strFile,"\t",arrTab); What is the difference that one works the other not?
The Sleep() function documentation in the MQL4 reference currently reads: The Sleep() function suspends execution of the current expert within the specified interval. The Sleep() function cannot be called from custom indicators since they calculate in the interface thread and may not...
Quick couple of questions, hoping someone can help. If I did this #define NoBox 0#define BoxForming 1#define ActiveBox 2#define ActiveTradePattern 3int GetBoxCondition;int somefunc()   {    if (A==B) GetBoxCondition = NoBox;   else if (A==C) GetBoxCondition = BoxForming ;   else if (A==D)...
Hello All: I am a beginner. I need some simple mql4 codes of buy & sell! 1. Buy: When current market price is lower than last close price,their absolute value of the difference between the last close price and the current market price is 6, then open a buy ticket. 2. Sell: When current market price...