MQL4 and MetaTrader 4 - page 311

To post a new topic, please log in or register
I am getting an error message while attempting to write to a file location.   0 16:13:12.522 HL GBPCHF,Daily: Alert: hist0935 Events File Error.5004 0 16:13:12.523 HL GBPCHF,Daily: Alert: hist0935 Events File Error.5004 0 16:13:12.525 HL GBPCHF,Daily: Alert: hist0935 Events File Error.5004 0 16:13...
I try to send notifications to my phone, but in the journal I see "Notifications: failed send request (HTTP session creation failed [15105])" Is some program missing or a firewall rule? It fails even if I turn the firewall off, so I think it is not a firewall issue, but then what? I'm running MT4 on...
Hi all, is it posible to export optimization results to a csv file when optimization finished automatically from code?. The same way like dumping trades from a backtest into csv.    
Hi everyone, I need a help to write a funcion that give back the BBW value, so I have few question: - to calculate correctly BBW i can use the formula (BBU-BBL)/BBM, upper-lower/medium value. Now the question is: to calculate those values is necessary to use a buffer isn't it? - if I use a buffer...
Hello Masters in the house, Please I don't seem to get how to write lot size for standard and micro account especially the five digits brokers. It keeps giving me not enough money and invalid lot size, what do I do please, help! Any help that solves this problem shall be greatly appreciated. Thank...
hello, i am making a little ea and i need an advice. i make an alert for rsi crossing up the 70 level and i want another alert for when rsi coss down the 70 level. how can i make this coss down code?   thanks  
OOnChartEvents()  allows to interfere into functioning of EA in live trading. It does not work in Tester. Could anybody tell me how can I transform my EA in order to be able to use ChartEvents  in Tester to. I know that this is possible: see "MT4 Trading Simulator.ex4". Regards, Slava.
Ok.  So I probably haven't been paying much attention here, but I went to create an EA using a template I created for my EA's.  When I clicked File, New, One of the options I used to get was to use my own template.  Now, that option has gone.  Question is, what's replaced it? -Michael.
I somehow deleted the MT4 app on my phone along with the data associated with my meta quotes demo account. Is there any way at all to get this account back without the login and password?
Hi guys,   I'm having trouble assigning Bid or Ask price into an array. When I try to assign it to my array nothing happens, when debugging it just simply stops without any Err. ?? float  _Ask[];float  _Bid[];      for(i=0; i>=0;i--)      {  _Ask[i]=Ask;         _Bid[i]=Bid;         }
I am writing a library in mql4 language in which I would like to have multiple inheritance. I use the following format: class A{   // some variables and functions};class B{   // some variables and functions}class C : public A, public B{   // some variable and functions}; But at compile time it...
Sir can u help me out how to figure out a profit in MT4.   Market of USDCHF  if my bid price is 0.99006 and ask price 0.98956. after calculating this i m getting a profit of 50 but this MT4 giving a profit of 50.50.   how? 
New article Optimization. A Few Simple Ideas has been published at mql5.com: The optimization process can require significant resources of your computer or even of the MQL5 Cloud Network test agents. This article comprises some simple ideas that I use for work facilitation and improvement of the...
New article Studying the CCanvas Class. How to Draw Transparent Objects has been published at mql5.com: Do you need more than awkward graphics of moving averages? Do you want to draw something more beautiful than a simple filled rectangle in your terminal? Attractive graphics can be drawn in the...
New article Neural Networks Cheap and Cheerful - Link NeuroPro with MetaTrader 5 has been published: If specific neural network programs for trading seem expensive and complex or, on the contrary, too simple, try NeuroPro. It is free and contains the optimal set of functionalities for amateurs. This...
//--- input parametersextern double   Lots=20;double MAX_RISK = 0.005; //The maximum to be risked of the account.int MAX_ORDERS = 3;int StopLoss; //Defining a stop loss.int MagicNumber = 99;int ticket;double Ma1,Ma2;void start(){//Write a program which calculates a StopLoss value at each tick...
I thought I'd try a new broker and wanted to check out spreads using the code below. Running the EA showed figures (screenshot below)  which don't seem realistic and they don't change (as on another broker where the spreads are always changing) The broker doesn't appear to even understand the...
I know this is "convention", but all conventions need to be questioned, otherwise mankind would never have left the trees. MetaTrader not only does not record ticks in it's history, but it only has the OHLC of the bid prices. However, long trades are opened on the ask and closed on the bid, and...
I can’t find the problem of this indicator. I set it to show two separate charts (High and Low price) simultaneously,but it just shows one chart (High or Low). It seems that the problem is aboutthe buffer adjustment. However, I couldn’t find the problem  even by printing the values. Please help...
Hi,  I need a simple function.   I know stop loss and fixed amount of money (let's say in USD).  I'd like to know, where SL should be placed.   Please, don't post some topics, libraries, big parts of code, that doesn't solve the exact problem... Just something like double LotsizeFromMoney(StopLoss...
i have a problem installing MT4, i choose a specified folder to install in program files but somehow is keeps installing in C:\Users\User Name\AppData\Roaming\MetaQuotes\Terminal\47209F621A0824DC435D5461B238BDDD\templates i'd like to have the program installed to program files and read and write...
Hi I use Latency EA on my MT4+ platform and yesterday I received a message in the Journal Tab:  "failed to get list of signals, connection error". I have 4 accounts and I received this message on all 4 of them. Is this affecting my live trading somehow? Or it is just a malfunction of the system...
Hello Forum, good day. I have the following code that shows the MA of RSI in one window and RSI in another separate window: double RSI = iRSI( NULL, 0, RSI_Period, RSI_Price, 1 );double Get_MA_7_RSI( int shift )  {    double data[];    ArrayResize( data, MA_RSI_Total );    for ( int count =...
Hello everybody. I'm new to MetaQuotes 4 and the Metatrader 4 platform (I have a good expereince in C programming though ). I realized a basic demo program just to have some idea about the subject . Now I want to update the source code  and create a new version,  without losing the old one. I...
I have an EA that sometimes needs to close a trade and open another one on current bar. But what I see happening is a multiple of trades happening on the bar with I guess each tick and drawing down the account. Is it possible to have an EA close and open a trade only once on the same bar in MT4?...
Hello, This is the code which strategy tester won't print any results from. I don't know why. Any help would be very greatly appreciated. //--- input parametersextern double   Lots=20;extern int      StopLoss=20;int MAX_ORDERS = 5;int MagicNumber = 99;int ticket;double Ma1,Ma2;void start(){//The...
Hi, I just don't get the explanation or the example in the documentation.  If I have  string txt= "Profit="+DoubleToStr(prof,2); for when profit=10 and 1000, output will be Profit=10.00 Profit=1000.00  but if I want it to output the DoubleTo Str with always a minimum of 8 characters Profit=    10...
I noticed that when using indicators for back testing (e.g. cci overbought/sold) that results are completely different between brokers. What may seem like a good setup on one, is not on another. E.g. One broker shows the cci overbought but the other is not yet overbought. Is this normal? Why are the...
I  use an indicator plotting round levels on my charts. But when I plot a normal horizontal line and I want to move or delete it it often happens that I select the round number line instead of the horizontal line I wanted to select. So I would like to avoid that any round number line can be selected...
I am running with broker ForexBrokerInc and a few weeks ago I sent a message to support that using the backtester,  the number of trades between Visual mode and non-visual mode were different, giving vastly different outcomes.  Now, the non-visual mode does not make any trades.  The chart has to be...