MQL4 and MetaTrader 4 - page 620

To post a new topic, please log in or register
i printed OrdersHistoryTotal in Strategy Tester, I got the maximum value as 99. whereas in demo/live it shows more than 400. Why is it so?
hi all, is there a way to hide this screen after i click on buy/sell button. ??  Script or EA to Auto click on OK! or simply doesn't show.. !
bool OrderClose(        int ticket, double lots, double price, int slippage, color Color=CLR_NONE)Closes opened order. If the function succeeds, the return value is true. If the function fails, the return value is false. To get the detailed error information, call GetLastError().Parameters...
  Foolproof arbitrage EA (11   1 2)
Hi All, I am very new to MQL4 but have been wondering about the possibility of a trianngulararbitrage EA for a while. Here is the code ,courtesy of Codersguru, for a fractional product oscillator. I notice this uses MODE_CLOSE for each pair, could this be applied to live tickdata? As I am...
Since Java is run by any OS (apple's OS, windows or android), why is MT4 not written in Java? Or transferred into Java from MQL4?   
#property indicator_chart_window//+------------------------------------------------------------------+//| Custom indicator initialization function                         |//+------------------------------------------------------------------+extern int HMA_Period = 21;extern int History = 500;double...
I think I remember previous builds being able to select multiple entries in the account history and then drag them onto the chart.   This automatically draws the arrows for the entry and exit and the connecting dashed line that shows which exit arrow belongs to a certain entry arrow. I can now only...
How to use the code control MT4 test? somebody helpe me. Thank you
  DateTime Comparison (11   1 2)
Question i m using 1H chart,and i would like to 1)get today Bar Highest and lowest Price from 12:00AM to 5:00A.M 2)how to check is the trade date is today date?? using the OrderOpenTime()
Hi there everyone, this is just confusing me, and I need to get my ordering right. if( A < B  &&  C < D  ||  E < F ). In that statement, does it mean:   if ( A < B  &&  C < D ) "or" (A < B  &&  E < F ) or does it mean: if ( A < B  &&  C < D ) "or" ( E < F ). In other words, does the "or"...
  Trendline EA (3)
I am new to EA's.  Is it possible to code an EA to take a trade once market moves 10 pips past a trendline?  Once a candle crosses the trendline this is what we call "the breakpoint". We then need trade to be taken once market moves 10 pips past this breakpoint. We also would need the EA to set a...
I'm considering getting an iPad for travel, but I want to make sure I can trade FOREX on something similar to the Metatrader 4 platform on the PC.  Is there an MT4 that works on an iPad?   Are there any brokers that use it?  Same question for MT5?
What are different variables to process or to use on MT4?
Hello forum, I have a feeling this may be quite basic but am not sure how to proceed, my goal is to code the following simple logic:  "if some [condition 1] is met, then [create a record], ONCE, and keep it for reference till [condition 2]". For example, I want to create a record of "bid" level at...
hi all, my robot finally near completion but right now my robot doest seem to be trading accordingly, can anyone please look at my code and give me suggestion? it dont do sell signal, man, and there is tons of modify error, 130,131,138,1, this is annoying, can anyone help me solve this or give me...
hello all,   please provide me  a practical way to send sms from mt4 whether paid or free.... method should be working with ea...
Hi, I am trying to create an indicator which subtracts one MA from another MA, then plots an MA of the result and plots a single period rate of change of the result. The two inital MAs are of equal length (let the length be X) and are separated by a window period (let this be W, please note that X...
Hi, I've been trading since 1986, and I've tried all kinds of differentplans and platforms. I am in the US and my main forex broker is oanda, I have been withthem a very long time. A while back I downloaded their mt4 platform, and I really like theautomation of it, and the wide spread...
hello all,   i want to create a alert based on hma colour change..please help hma _clour file is given above.. 
Hi, Can anybody help me how to export close bar values from current symbol into HTML or CSV file from MT4? Attention: Each HTML/CSV file with current period (for example PERIOD_H1 ) should have max 400-500 bars. The file should contains two columns: DATA_TIME, CLOSE_VALUE. I would like to work with...
I am starting with mql indicator programming and want to draw a small arrow on the actual price in the past, when a defined rule is fulfiled. But how can I get the actual price on a specific moment? I only can get High[], Open[],Close[] and Low[], or??
In the simple EA Example of have here, the open trade time setting works, the Close trades time does not? It appears there is more code needed here. I am trying to have the EA or EA'S trade at certain times of the day for  different currency pairs. This is my first use or attempt using the Time...
Hello, I have a simple EA that opens my pending orders with Entry Price, Stop Loss and Take Profit parameters that I manually enter.  I want the EA to alert me when a pending order is filled.  I tried using     if(OrderOpenTime() !=0) but pending orders are considered "open" when they are accepted...
B"H Hello all, I've managed downloading history-data using MT4's internal History-Center for several coin-pairs, but NOT even once for a CFD symbol (e.g. SPX500). It keeps opening a dialog stating: "There are no new data for symbol ...". How can back-testing on a CFD be performed? Is there another...
Hello, Perhaps this question has already been answered, if so, please refer me to the forum post or community article that explains how to do it. I want to write MT4 scripts that allow me to enter input before the script is executed.  Right now I am using EAs to perform this function. Thanks in...
Hi, I'm working on a code that loops through all the symbols available anddo some data processing. Here, as example, I’m writing to file the current pricesof the new incoming Tick: int start()  { int Handle=FileOpen(fName, FILE_CSV|FILE_WRITE, ';');   for ( i=0;i<cntCrx;i++) {      string...
Hi all, I need to loop through all the crosses available. The broker is unknown in advance, so I need to query realtime which is the list of all crosses available at the given time for that particular provider. Is there a native function to call into, to have that list back?   Thank you very much in...
When I setup email in Metatrader, using my Gmail account, when I send the "test" message, the journal says: Mail 530 5.7.0 Must issue STARTTLS command first.  Has anyone else run into this?  Is there any way around this? Peter J Shepherd
Hi Has anyone come by this EA and got it to work? https://www.mql5.com/ru/code/10071 (English version also attached) When I add the EA to the chart, the EA loads properly however there's no indication that the re-written chart with the merged bars has been generated. Or if anyone has another...