MQL4 and MetaTrader 4 - page 318

To post a new topic, please log in or register
  runtime error (1)
 I got a runtime error: 2015.01.14 22:11:40.134    cannot load 'C:\Users\Monika\AppData\Roaming\MetaQuotes\Terminal\......\MQL4\Libraries\stdlib.ex4' what can i do? schiller
Hi, I'm trying to write a function in MQL4 which will calculate my total profit (could be negative, which would mean loss) at a given price. In other words, if I have an open Buy order at price P1 then: my profit at P2 would be ((P2-P1) * volume) - but that's in most simplistic terms, now I need to...
I would like to draw a Trend (cf: the red line in the screenshot) which starts on the current bar and ends on the next new bar. I am using this function: ObjectCreate( trendName, OBJ_TREND,window, timeStart, priceStart, timeStop, priceStop); I have probleme of getting the timeStop value. On Forex,...
Before the new script  starts to run, there are 13 closed orders already. All the 13 orders have absolutely different magic numbers from the one of the new script. However, in the script I wrongly initialize  histroyPOS=0. I found a bug after the new script opened an order and closed it soon in my...
Hello Guys, I heard while ago that mql4 offers programmers to make EA and Custom Indicators. When I search the site I haven't found anything. I'll provide the details of EA once I am on the appropriate path. Could you help find a programmer through MQL4 because I don't want to pay anyone while there...
Is having a script that connects to the MT4 server andperforms trading operations , basically can connect to MT4 server directly withoutrunning MT4 client platform, possible…?   Something like a PHP script to work instead of the MT4platform but not like a web application though, rather it should be...
Hi I have downloaded the attached indicator and it has been working for a while, but today when i was looking at the file inside MetaEditor and i compiled it (without changing anything) I got this errors?? and the EA stopped to work. This is the error part of the indicator. void...
Hii people, im trying to code a system that ill can insert a BUY & SELL rules and the rest will be managed by the "system", i would love to get some help with this, so please just aboard if you interested :).    //IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII # 1:  -  We set...
I have been away from the market for about a year. I found this indicator and liked it. My system kept locking up and freezing and the problem was this indicator. I put in and ran a compile on it and it had 16 warnings. So I fixed the warnings. I changed the alerts to false for personal preference....
Hi all, I am pretty new to MQL4 and have a question about polymorphism in MQL4 which think will be most clear if I show some C# code of what I am trying to achieve: class B{ public void X() { }}class C<T>{ protected T t;}class D : C<B>{ public void Z() { t.X(); }} So, from...
    dears as shown in the picture, i have installed MetaTrader 4 on my new laptop. i realized that the side menu and the tabs are very small     any one can help ?   where can i adjust the settings to make it more visible ?   thanks   faisal 
Dear, Is there any documentation or Doc file details about Dialog.mqh. Because i didn't fine. Thanks. 
Could anyone explain why the log doesn't contain the opening of order #2 ?   (please see the pictures)   
I am back testing with Renko charts and although some pairs work just fine for some reason other pairs open one trade then immediately close it and does not trade any more after that. The error I get is: "tester cannot calculate prices". I do not think that this is a bug with my EA as it works fine...
Can I access the values of this default indicator like I can do for iMa? Or I should need to download the indicator that you have on the mql4 database and work with that? Thank you Greetings BeLikewater
I am trying to make my EA work to record an indicator (using stochastic for now) using the FileWrite() command.  The goal is for this to record the indicator values at every 10th minute and 30th second of every hour. This will be changed for future purposes. The file writes properly and saves as I...
Python has superb libraries for data handling, math and machine learning. Enabling direct integration with MT4 for algorithmic trading would be a big win, enabling the large number of existing Python programmers to just get to work. 
There are frequent questions in this forum (e.g. 'Difficulty using FileReadString on file opened outside /experts/files') about reading and writing files anywhere on the hard disk, but there only seems to be one published library for doing so, and it's fairly limited: 'File Operations without...
Hi, I think most of you know that script below. You can drag it into a chart, select a timeframe and all opened chart windows will be set to this timeframe. //+------------------------------------------------------------------+//|                                                    ChgTF-All.mq4...
If I am posting in the wrong area Please let me know where the correct area would be. I have searched everywhere for an indicator that will place a horizontal line at the previous candles open close MID Point and no luck. And no the moving average set to 1 and H/L/2 is not what I want does anyone...
I want to know EA's sequence. If I set "AA.mq4" ea to same symbol 3 charts ex)1  EURUSDH1 AA      2 EURUSDH1 AA      3 EURUSDH1 AA      (with different inputs)   If a tick provided simultaneously,   What EA runs first, second, third?
Hi   I am trying to create a signal where the entry bar must appear after a certain number of higher highs or lower lows. eg like an outside bar / inside bar / pin bar. So affectively i want a check to make sure the bar is in a good "location" ie top or bottom of a swing for example.   I tried to...
  Alert Problem (4)
hi I'm trying to make a simple ea but i have some problems i want to make an ea with rsi and stochastic; when both indicatros cross 30 level i want  a alram (the same when they cross level 70) i make this, and id dosen't work double     SignalBuffer[];double     MainBuffer...
Every broker has maximum limit on the lot size of a symbol. However, the live trade can't be  proceeded if the lot size is too big.   Which below will happen if the lot size is too big according to your real experience?  1. the live trade can be proceeded only if the lot size is less than the...
I tried backtesting from jan,02 2015 to jan,05 2015 using tick chart. ea place order on 2nd jan. but when i backtest from dec,31 2014 to jan,05 2015 ea does not place order on 2nd jan 2015. Note: Jan 31st Market closed at 20:00 and 02nd market started at 09:00, its server time. Please note the...
I have a piece of software that I would like to connect to MT4 to place orders. I was hoping to do this through the MT4 Client Terminal API that is mentioned on the metaquotes website. Does this exist as there is very little documentation that I can find, and mainly third party add on that claim to...
Hi, I thought that MathRand()  returns an Integer value within the range of 0 to 32767 based on MathSrand(). Can somebody please tell me why this script always prints the same number? void OnStart()  {   MathSrand(Bars);   int test = MathRand();   Comment(test);   }  How can I modify it that I...
Re: https://www.mql5.com/en/forum/136275/page3#532562 I got my php working as a Cron job. I created a simple EA to send the file via FTP and set the Cron job (I use cPanel based hosting) to run every 2 mins. The php . . . <?php$to = "your@email.com";$subject = "EA is silent";$body = "EA has...
Has anyone a code snippet to share that can pull the current  time of a city from some available server (whatever that may be) , including dst if applicable.   This information is obviously available from many servers eg  http://www.timeanddate.com/clocks/free.html       http://www.timeanddate...
Where does History Center store its records? I tried deleting some files in the history folder say USDCHF1440.hst, close and reopen MT4 but the history center still has the records in it.  What I am trying to accomplish is to write a script that I intend to run at the start of the week that will...