MQL4 and MetaTrader 4 - page 641

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
[Deleted]
  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.
  const variables  (1)
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...
[Deleted]
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....
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...
[Deleted]
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...
//+------------------------------------------------------------------+ //| 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...
[Deleted]
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 somebody
  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....
[Deleted]
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 | //|
[Deleted]
Hi, I am a programmer, my boss has required me to develop a program for MetaTrader that can read his current indicators (7 moving average , 1 MACD and 1 Konkorde). His Idea is that a program recognizes certain signs from those indicators, so then a buy or sell. What language, script, MetaEditor or
How do I get at the datetime string?  In the sense that the following code will then work:           datetime now = TimeCurrent();                almostUniqueIndex = StringSubstr(now, StringLen(now) - 3) + WindowsTotal();   I'm in the processing of migrating legacy mql4 to updated mql4. 
Hitraders, I’m quite new on MT4 forums and couldn’t quickly find answers on my 2questions below.   Forstudy of price patterns I indent to print MT4 chart-pictures, each containingbasic info, linked to time-price bar-positions [ ObjectCreate (objname, OBJ_TEXT,0,time,price) ]. For instance...
Hi, With some indicators that I have code for, when hitting "Debug / Play" in the MetaEditor, the terminal will bring up the input parameter dialog, I hit Ok and then nothing shows up in the chart (where as drag-n-dropping in terminal shows something), and the window focus moves back to MetaEditor
i am currently coding a trading log which executes everytime a trade is closed. one of the values for my log is the stoploss. however, i want to use the original stoploss when my trade opened, but since i modify the stoploss during the trade, calling OrderStopLoss(), does not give me correct value....
I am doing demo trading where an EA (called "Morning System") places pending trades which I then manage further. Now and then (so far it happened two times out of 45 trades) MT4 opens and closes a trade after the closing time of the original trade with an incorrect lot size (based on a parameter in