Download MetaTrader 5

MQL4 and MetaTrader 4 - page 235

To post a new topic, please log in or register
Hey guys,  I am very new to MQL so please don't go hard on me. I started developing a project that trades when I flip a coin. Essentially, when It lands on head it should buy and when it lands on tails it should sell. The problem is when I back-test the code, it only buys and dosen't sell.
I need to insert this function (extern double BandsDeviations = 2.0) but I have a big problem ... I know nothing about programming, I hope some expert can help me Thank You PS: sorry for my bad English   #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1  Red...
Hi all, i only want a line of close price H1 in timeframe M5. I am using this code but.... i dont understand where i am failing: int start()  {   int counted_bars=IndicatorCounted();   if(counted_bars>0)      counted_bars--;   int limit=Bars-counted_bars;   for(int i=limit;i>=0;i--)     {       int...
I throw a lot of info on the chart in my EAs and would like to organize that a little better. To separate values I now go about it as follows: string text;text=StringConcatenate("tic= ",tic,"    tac= ",tac,"    toe= ",toe);Comment(text); I basically thow in a bunch of spaces. This has the...
Hey guys, I want to store the current Bid value in an external file so that I can use this information on another account. I thought about using the FileWrite function. But I really don't understand how to do that. This file should also be refreshed with every tick. Does anyone no how to do that? Or...
Hello i have been struggling with arrays, in this case i need to look to rsi in bar number 5,6 or 7 but it does a array out of rage, can you figure out what am i doing wrong, Thanks. Here is  the code --------  double RSI[]; extern int RSIPer = 14;//RSI Period extern int Limite_Der_a_Izq_Inicial= 0;...
  round number (5)
Hi all, could you indicate a system to round the number 5142.37 to 5150 ? Thank you!  
Does anybody know how to cancel an open order during a closed market(at MT4 ? Thank you.
  need help with loop (13   1 2)
Can somebody help me with loop    
Hello,   i need a function to read/write text file outside mt4 folders    waiting for help thanks, 
Hello, in my EA I create a txt file in "File" directory. Now I want to execute this file for showing it in Notepad... can someone tell me how to do it? I searched a lot but didn't find anything about this. Thanks a lot Massy
Greetings Everyone, The Metatrader 4 was working perfectly until yesterday, i got this error message "Conexion failed" right down the window. I tried to reinstall it and create a new demo account, I tried to stop my antivirus but still not working, Btw my internet connection is very good.   Any one...
Hi all, Can you do it? class a {};class b : public a {  b(int i):this("explicit call")    {   }  b(string s)   {    str=s;   } }    
The following data is part of my 'log' file and represents data from a custom indicator. In this case the variable is on the 1 minute chart, last value (i.e. 0 )and 5 periods At 1 second past 15 minutes the variable changes (as expected) and remains the same throughout the fifteenth minute (as...
Hello, I wont to close an expert from the init() function in certain conditions. Is there a command, which can do it? It must be simple but I cannot figure out. Thank you!
Until the 1970's, and for the previous 100 years, the value of most currencies was tied in some way to the value of gold. In 1944 this "gold standard" was replaced by the Bretton Woods Agreement which valued the United States dollar against gold, and all other currencies against the US dollar. In...
Is it possible to add a custom text box or a dialog to the market watch panel in meta trader 4 or mt5 ?  
I never seen an EA trade like this so forgive me if this has already been made   I'm planning a ea based on the zigzag indicator, which opens a sell + closes buys after the last highest position and opens a buy + closes salls at lowest. If there is a new lowest after the first, it will open a new...
Sharing a great EA: Pick/get valiant rare mega-bubble points so far away from majority market noise points-> Sequence more Turning point with deepness/MTF. The code read 10% Day Move (20100 analysis per move). In near future will peruse a month tick by tick. The party is starting....
Hi Coders, Is it possible to get the type of the backtest model? I would like to know, weather it is working in Control Point mode or in Every Tick mode. Thank you in advance. Relative
Hi, Is there easier way to copy trend lines or fibs from one chart to another without doing the 'save template' function in MT4. For example I have 2 charts, one 15 min and the other 4 hour. I draw some trend, horizontals, fibs lines etc... on the H4 but I want my H4 analysis (some or all) to be...
Im trying to get the object OBJ_ARROW_THUMB_UP to appear every time the if condition is true when i test over a few days. Code as follows : input int MaPeriod = 200;input ENUM_MA_METHOD MaMethod = MODE_EMA;   input ENUM_APPLIED_PRICE MaPrice = PRICE_CLOSE;// OnTick() event...
Hi, can anyone help on this one?       Spent most of a day trying to get the value of  account balance before a trade and again afterwards. I want to see the amount of cash that the trade costs.       Still  trying to work out why the account balance has not altered. Code as below....
good day to you all! attached code is of a 10 period rolling window with linear descreasing weights. this is my first and very rudimentary step towards implementing an adaptive feature into EAs so that parameter values adapt to changing market conditions with weight on more recent data. however, it...
I want to trade the same EA on different currency pairs(charts) and it seems there is a conflict. I loaded my EA on EUR/USD and it placed an order, however it didn't place an order on GBP/USD when the entry condition was meet. Please how do i code the same EA to run independently of each other, so i...
Hi,  I would like to create an indicator with an arrow and a text of what the arrow means. Does anyone know how to do it? Or better still have a source code for an indicator that does it. THANKS.  Here is an example below.    
For example, if you use the functions "SymbolInfoInteger(Symbol(),SYMBOL_SWAP_ROLLOVER3DAYS)" and "MarketInfo(Symbol(),MODE_SWAPTYPE)", you'll get the integer that is not easy to understand.  Is there a existing function or an easy way to translate the integer back to the enum identifier or...
Hello,  I registered yesterday, but today the platform is blocked, it is not updated and at the bottom of the screen it appears "not connected" or " account not valid" ....what can I do? Thanks 
  BTC/USD (2)
Hey everyone my name is Freja. I am into cryptos and the evolution all finances. I am interested in using MQL4 with BTC/USD. I just downloaded and have been searching for guides but all guide i find in search are for MQL5 i think? Can anyone help me find a guide, i'll keep looking in the meantime.
Hi everyone, I am reading the MQL4 documentation online about how is structured MT4 and some mock codes of custom indicators and EA. I would like to know from someone more experienced than me if with my (good) C++ programming background I could learn MT4 style quickly. Of course I know that all...