MQL4 and MetaTrader 4 - page 458

  current chart  (2)
I only have 1 chart open GBPUSD H1 when I run the code below, but the value I get for the closing price does not match the chart.  The output file (attached) gives me '2018.01.30 11:00|1.41090000' but the closing price for that 2018-1-30 11:00 is 1.41258 and not 1.4109 #property copyright...
void CheckForMaTrade() { double UpArrow = ObjectFind(0,"Up Arrow"); double DownArrow = ObjectFind(0,"Down Arrow"); double currentbar = iOpen(NULL,0,0); double previoustbar = iClose (NULL,0,1); if (OrdersTotal()== 0){ if (previoustbar+DownArrow && currentbar==UpArrow+DownArrow){
Hi all, could you explain where is the error? For the first order the expert returns "0" instead of the ticket. total = OrdersTotal();        for(cnt=1;cnt<=total;cnt++)     {         OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);          Print(OrderTicket());               }
I need a custom software for MT4, let me explain you. I waste a lot of time time writing hundreds names for each optimization during backtesting.  Could it be possible to develop a Software which could write the settings automatically the name of the files (report name like .html and optimization...
there is on my EA order count control code, my code check orders in this way: "if there is one or more SELL order do not open another SELL order". i set  MT4 as if cut off electric and computer get reseted my MT4 and EA will opening automatically.  Today my computer getting reseted and opening and...
Hello everyone, I can't seem to fix this warning at the moment. I know its only a warning, but I like to solve it correctly. The program runs fine atm, just annoying warning. void ObjectDiscription()  {   string Label[]={"Labels","Ask","Bid","StochSignal","StochMain","Macd_Signal","Macd_Main"...
Hi All, I am trying to run an indicator using iCustom. The indicator has 8 values in the data window. When I iterate around a loop and output the values of buffers 0-7 to variables, from a number of the buffers, I just get back a value of 2147483647, but, the buffer(s) in question show a "correct"...
The data I am getting from the iBands, iMacd nor Close() are matching my charts. I ran this on H1 GBPUSD and the values in the output file do not match the chart //+------------------------------------------------------------------+ //| Custom
Hi, I have a ex4 indicator , which doesn't have alerts and I don't have the source code  Is it possible to create a script that alerts(push and email)me when value the values is being filled Value 11 = Sell Value 12 = Buy Any idea if its possible Example of the data window
As I am tired to read always the same questions, I am starting this topic to bring together all information about the MT4 Strategy Tester usage, to backtest and optimize. I hope the power users of mql4/MT4 and more skilled members of this forum will appreciate and participate to it. I will edit and...
I want to read the close prices of a pair that is not on themain chart. I have used extern string ref_Symbol = "EURUSD"; and then (inside Start() and inside the loop) PairQuote[i] = iClose(ref_Symbol, 0, i) to read the close price i periods back. The problem is that I get different prices,...
  history center  (2)
I am trying to download historical data into a database, but my history center is not accurate.  In the image below I have highlighted records that are at the 1 minute level but in the 1 hour folder.  I had deleted all of the 1 minute records and then tried to run the script below.  But it keeps...
  Delete Sub Window  (14   1 2)
After removing all Objects from a sub-window eg ObjectsDeleteAll(2), I want to delete the sub-window. Is there a function for that operation?
Hi all, could you explain why it's wrong this way to recall the orders?  Thank you! total = OrdersTotal();     for(cnt=0;cnt<=total;cnt++)     {         OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);     if (OrderSymbol()==Symbol() )              {        ...      
Hi all, I have error 4051 with this code, could you help me? Thank you! I verified by printing that the int "Old_Ticket" is correct, so I don't understand why it returns 4051 error. if (...)    {    int Old_Ticket = StringSubstr(OrderComment(),StringLen(OrderComment())-8,8) ;...
Hi I set up a Linux Ubuntu VPS server, where I installed several of my brokers MT4 platforms, using wine. However, the Market/ products tab at the bottom in MT4 has no Markets tab! So I cant activate and use my EA's that I have purchased. Please help!
  Help on Code  (4)
Hi does somebody could help me? I want the EA to set a Pending Sell Stop Order when I open manually a Buy Market Order, why this code isnt working?  // External extern double LotSize = 0.1; extern double StopLoss = 150; extern double TakeProfit = 120; extern double PendingPips = 30; extern int...
Is It possible check 99% of quality for backtest on hitorical data?
  historical data  (2)
<b>Market:</b> You have activated the product <a href="https://www.mql5.com/en/market/product/15750" target="_blank">RSI Breakout Dashboard</a>, 8 of 10 activations left. (See <a href="https://www.mql5.com/en/market/rules" target="_blank">Rules</a>, IV.10 and IV.11)
[Help] I created Custom RSI indicator manually but it's don't work. How to calculate Average Gains/Loses?? https://en.wikipedia.org/wiki/Relative_strength_index#Calculation I'm using MQL4. There's no built-in function for Average Gains/Loses. If you know how to code that average gains/loses, please...
Hello to All:  How can I get alert signals when the RSI hits a number, let say 30, for one or many currency pairs?  Must I specify the timeframe?  If yes, how?  It's probably easy, I just don't know how to do it?    Sincerely, Garcia Fong 
Hi, I'm having issue with adding default indicators like ATR, CCI, MACD etc. I found that the indicator is marked with grey symbol. I cannot won't add even i treid to add by clicking Tools>Indicators>Custom. There is nothing shows there Also, when I tried to click metaeditor this error appears.  I...
[Deleted]
Hello, I am trying to write a indicator to draw high and low of Last/Current Month andLast/Current Year. With the help of the members here I was able to get the indicatorworking however there are couple of things I would like to get help with: 1. All the lines are drawn RED even though I mentioned...
Each time I make backtest, a plenty of gigabytes destroy my hd; any trick?
Hi friends I wonder how could it be possible for "MarketInfo(_Symbol,MODE_TICKVALUE)" to be equal to zero? I've written the code below to calculate the broker's commission in point but sometime it takes the zero divide error !    double commission_in_point=((commission_per_lot)/MarketInfo(_Symbol...
Hello, I wonder if it is possible to use EA to open positions at the same time in two different MT terminals (two different brokers), that is, opening poistion in one account can automatically open another position in the seccond account?  Please kindly advise  Thanks. 
  Margin % mql4  (3)
How do i get the value of margin percentage(at symbol properties window) in mql4 code?
Is It possible install data from dukacospy without paying tickstory in mt4? Someone can help me with this? Is It necessary a script?
extern int PeriodoEMARapida = 5;extern int PeriodoEMALenta = 21;int MaximoDeOrdenes = 0;int BarsCount = 0;//+------------------------------------------------------------------+//| Expert initialization function...
Hi I am a newbie to the forex coding...   I have been trying to modify the open price of an order when the pre defined conditions are met. But while executing the order modify function, it is returning false and the error code is showing as 1.   I have observed that order open price and modified...