MQL4 and MetaTrader 4 - page 449

Hello, I am trying to compare 2 different EMA from H1 timeframe with close price. But I get "Array out of range" error. I run this indicator on M2 timeframe. How Can I fill the MA buffer from rates_total?...
Today, 22 December 2017, my PC applied updates and now a bunch of my indicators won't work on MT4. Anyone else having this issue? Does anyone have any suggestions how to fix it?
  Help on program  (2)
Hi guys, I am working on this program: int start(){            Alert("Numero Ordini"+CountTrades(MagicID));      RsiPrec = iRSI(NULL, 0, RsiPeriod, PRICE_CLOSE, 2);//Rsi      Rsi = iRSI(NULL, 0, RsiPeriod, PRICE_CLOSE,...
Hello I come from Thailand. I am interested in MetaTrader 4 Mobile I wonder if metatrader has stock price and indicator for Thai market (known as SET) Thank you
Hi, In MQL4 is there any event that notifies when a candle starts drawing? e.g on 09:15 I need to be notified that a new M15 candle started drawing Thanks
Hello friends,  I am new to MT4, know little basic programming for MQL4. I am trading in UTC+5:30 in Indian Stocks. I just want a small piece of code to get today's First candles HIGH and LOW in current TimeFrame. Our trading starts at 9:15 AM IST and ends at 3:30 PM IST. e.g. if I select PERIOD_M15...
  Trade the equity  (11   1 2)
Tradethe equity Thereare so many trading systems out there that all have something incommon: sooner or later they are all facing a more or less heavydrawdown. They have times when they work nicely and times when theydon´t. And as we all heard so often they stop working when we starttrading them live...
Hi, I am looking for MT4 function(s) that allow selection of specific symbol in the watchlist, so the symbol's tick chart is displayed. It is to be called from EA or indicators and would be similar to ChartOpen but for Market Watch, eliminating the need to click on several tabs and select the symbol...
https://www.mql5.com/en/forum/130523I am having an issue in an EA I am trying to write and which has to do with Bars or iBars counting. When I compile or attach the EA on the desired TF, the Bars are counted correctly: When I switch from daily to monthly TF, it reads the Bars correctly and goes on:...
I want to add email alert to below code. I am not programmer. I have tried Sendmail function but couldn't successful. Please give me proper code for email alerts. #define SIGNAL_NONE 0#define SIGNAL_BUY   1#define SIGNAL_SELL  2#define SIGNAL_CLOSEBUY 3#define SIGNAL_CLOSESELL 4#property...
  Confirm on next Timeframe  (15   1 2)
Hi guys, I'm a newbie on MQL4 so I would like to apolagize in advance for my lack of experience and my laughable code. So, I have this function: bool NextTimeFrame(){    // Next Timeframe Confirmation    if(useconfirmation == false)        return(true);    int TimeFrames[10] = { 1,5,15,30,60,240...
Hello, I am developing a multi-currency EA and got a strange bug, which I don't understand. So what I am basically doing, is calling iClose (s, tf, shift) one minute after the close of the last H1 bar for a bunch of symbols to determine the past movement. To debug wrong live entries, I print out the
Enumerate TimeFramesenum TFrame(Period_M1, PeriodM5....); and so on.........input  TFrame TakeTrade =Period_ M1;The above code is meant to list TimeFrames for user to select in Expert Advisor. Please , i am not sure what is being omit.You correction will be appreciated. Thank you.
I am trying to download historical indicator data.  When I use the CopyTime function with the start bar at 0 I only get the most recent couple hundred bars.  When I try to download older data I don't get any data....
  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 MACD...
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!