MQL4 and MetaTrader 4 - page 275

To post a new topic, please log in or register
Hello,  I registered yesterday, but today the platform is blocked, it is not updated and at the bottom of the screen it appears "not connected" or " account not valid" ....what can I do? Thanks 
  BTC/USD (2)
Hey everyone my name is Freja. I am into cryptos and the evolution all finances. I am interested in using MQL4 with BTC/USD. I just downloaded and have been searching for guides but all guide i find in search are for MQL5 i think? Can anyone help me find a guide, i'll keep looking in the meantime.
Hi everyone, I am reading the MQL4 documentation online about how is structured MT4 and some mock codes of custom indicators and EA. I would like to know from someone more experienced than me if with my (good) C++ programming background I could learn MT4 style quickly. Of course I know that all...
Hi, I have a problem passing the current MqlRates to a C++ DLL. Here is what I have done so far: MQL #import "MQL.dll"double ihigh(MqlRates&[],int);#importMqlRates rates[];bool called = false;void OnTick(){   if(called == false)   {   ArrayCopyRates(rates,NULL,0);   called = true;...
Hello Mql Team, i have downloaded MT 5. In mt5 you see the MAMA ea and the MAPSAR expert advisor. I want ask you kindly:     Have you an recommdation, for which pair, or index or metal,  these ea`s , and on which timeframe,  these ea`s profitable working ?  How much must the account funding? 50$ or...
good day to you all :) following code is of a trading log function i have written, which writes a number of variables to a file. its all working good besides it writes each order over and over again by each new run of the loop. now i was kind of suspecting this to happen and wanted to come up with a...
Hi, How does one write a script that can apply an indicator onto a chart. I can set the initial parameters of the indicator from the script. Is this even possible ? Thanks.
  MQL4 first step (32   1 2 3 4)
Salute folks, A lot of reading has been going on and the tone is clear on doing the stuff yourself. I have never written a line of code in my life and desperately want to try and code my own basic EA. I have tried to read through the manual and start losing the plot halfway down a page each time...
  close MT4 (2)
I could be overlooking this, but is there a setting in MT4 that gives the user a "are you sure?" question before closing MT4? Using RDP, I've closed MT4 a couple of times when I meant to close RDP. Yes, lot's of cursing... thanks.
Hi,  I am a little bit confused with the use of const inside a function, as an example below. The document says the following "The const specifier declares a variable as a constant, and does not allow to change this variable during runtime. A single initialization of a variable is allowed when...
Hi all i am new in with mql4 and i am learning to programming in this language. I want draw at time [i] the close value of Bar M5 at all hours 20 miinutes. Ie each H1 bar close i want draw  xx:20 (range xx:20-xx:24) M5 close bar. For example: Close bar H1 at 11:59 then mql4 draw close bar M5 11:20....
I refer to the sample given in the documentation. How are we meant to use OnCalculate? With the old "start" event, we have a for loop to calculate the indicator per bar, how do we do that here with OnCalculate?why are these arguments have an ampersand, e.g. &open[]? What is the difference with the...
Hi, I'm about to write my first EA and I was hoping for guidance and perhaps someone could point me towards a similar simple example. I hope to write a simple EA that just calculates and prints values for now and then build on it. As a training project I'm going to use Ichimoku...  Phase 1. Simple...
Hello, I  have ordered an EA. I want some minor changes but it not one file like I use to download from https://www.mql5.com/en/code/mt4. When I opened main .mql file it does not contain anything except information. That's the screenshot: There are couple of .mqh file inside and outside of those...
I'm using MT4 but I can't figure out how to clear the current chart and profile so I can start new chart and create a new profile. When I delete clear the current chart and profile it saves the changes as part of the profile so I lose the original definition fo the profile. It is very frustrating...
I am observing that there is good gap on monday opening in EU from last two weeks. Need some tips to trade this gap.
Hi , i use one NN indicator partial coded by my self. I need to put the result of indicator in one buffer to stay on the chart, is like a target price . My problem is how to do that if indicator wich is reseting it self and by that he use " DeleteAllObjects'(for delete all neuronal network created)...
Can anyone understand why these indicators don't work in MT4? I open the .mq4 file in the editor and I can see the math formula used to calculate it is correct, but the value displayed in MT4 is wrong!
Hi all! The public indicator i-regr is so useful but the maximum degree is 8 and no have extrapolation. Not yet. By example, the statistical software Stata have max capacity of degrees of 11.000. For powerful machines. My intention is to modify i-regr to support many degrees as possible and to have...
Is there any way to automate the process of strategy testing. l want to run multiple tests for various assets with different parameters of each and save the reports. Is there any native or third party api to write code and execute the tests automatically or can l write a script to do the whole...
//+------------------------------------------------------------------+//|                                           MySmoothnessMetric.mq4 |//|                                                  Daniel Donnelly |//|                                             enjoysmath@gmail.com...
A tick seems to occur every second or several times a second in MetaTrader 4.  And every tick OnCalculate() is called.  However, OnCalculate's parameters such as high[i] are such that each index in high represents one minute of data minimally (by setting time frame to 1M). So what is the deal?  How...
Hello, I'm in the process of porting some old code (start(), init(), etc) to the updated MQL4.  I've gotten rid of all the compiler warnings and replaced start() with OnCalculate() and so on.  Now without this one line, the chart window stays open (desired operation), but with the line, it crashes...
Hi, I want to import some csv files with names which differ with metatrader symbols. For example 100 csv files with diffrent names with metatrader symbols. I want to see charts of them after importing csv files(names differ with common metatrader symbols). Is it possible doing this?
Hi,  I would like to know how I would program a indicator that has another indicator as an input?   Example: I would like to put a Moving Average over a Average True Range.. So in human language I woud like something like EMA(ATR(15), 8)[0] to read the current 8EMA of the 15-period ATR.    If...
  Scripts and chart change (20   1 2)
If I run the script below and change charts during it I get the message shown - does anybody know how to get the script to "ignore" a chart change command and just continue? thanks void OnStart()  {    while(IsStopped() == False)   {    .    . some code        Sleep(200);   }  }
Using the crosshair functionality, one can click on a point in the chart, keep the button pressed and move the mouse. This will display a line a distance in points between the initial point and where the cursor is. I would like to read that distance in points (or to calculate it somehow) from my EA....
It is confusing. Since expert advisors and indicators execute just based on basic historical data such as D1 (close, high, low, open) , and on the other hand historical data in demo and real metatader is equal, so why expert advisor and indicators result differs in demo and real MT4?
Hi, I'm trying to run multiple EAs at once using live data.  My bots work fine, and they make trades without clashing. My problem is that I want to be able to pick out which bot made which trade, from the trade report.  Is it possible to append some sort of identifier to the trade report? I've...
Here's the importing hello world indicator: //+------------------------------------------------------------------+//|                                          MyLangTestingGround.mq4 |//|                                                  Daniel Donnelly...