Download MetaTrader 5

MQL4 and MetaTrader 4 - page 341

To post a new topic, please log in or register
I want to add an expiration on my EA based on a alert of the indicator, how do i do that?  How do i change a TRUE/FALSE or number value into a word value?  I want to change extern bool Expiration=false;, or extern bool Expiration=60; into ……….. Expiration = 'an alert from my indicator' ; Ed 
Hello, I would like to ask you whether exists some substitutions for OnTrade() event handler which perfectly works in MQL5 but not in MQL4?    Thank you very much for possible responses and any advices are welcome.   Regards   Lukas 
I have multiple accounts that I would like to be able to monitor in 1 screen (either in MT4, excel or a standalone GUI) without having to have multiple instances of MT4 open at once. Ideally I would like a single screen to be ableto monitor them all in real time but would settle for something that...
Hey everybody, I try to create a little output into the expert log on MT4. What I do: int start() { int i; for (i=0; i<=2; i++) { double lB_EURJPY_D = iBands("EURJPY",PERIOD_D1,20,2,i,PRICE_CLOSE,MODE_LOWER,0); double uB_EURJPY_D = iBands("EURJPY",PERIOD_D1,20,2,i,PRICE_CLOSE,MODE_UPPER,0);  //Print...
Hi, I’m trying to calculate swaps in deposit currency, but the results do not seems to be consistent with whant MT4 shows in the Order windows (Swap column). What does the Swap column show? The Swap is in Points or in Deposit Currency. (While you can choose what to display in the Profit Column, you...
Try to display ATR levels for today's range, 10, 14, and 21 day ranges. The bottom right corner. I made my best attempt at it and have been tinkering with it for quite a while without much luck. Got it narrowed down to only 5 errors. Anyone want to point out the corrections?
I have a bit modified code of the fractals indi and it shows only those ones that've never "met" the price.//----Fractals up      bFound=false;      dCurrent=High[i];      if(dCurrent>High[i+1] && dCurrent>High[i+2] && dCurrent>High[i-1] && dCurrent>High[i-2])        {            int...
  About error (1)
Can any one explain me error 131 is what after attaching robo to chart i got this error.
Hello,  I noticed a problem in MT4 which is the fact that sometimes the working directory is in Program Files and some others times it is appdata\roaming\MetaQuotes\Terminal\ .  I haven't been able to notice any patterns when such a path is switched. This is a bit problematic since any new settings...
Whenever editor help does an update via popup asking if want to do the update, I'm always wondering just what has been added/modified/removed etc. Is there a change log? If not, why not? Surely the platform's language docs are important and coders kept up to date  with the latest changes, yes?  
Hi, I am looking for help on the following:-   I want to check the previous values of MACD Histogram Values and if the slope is pointing up, i want to buy and if pointing down i want to sell. any help would be appreciated. 
Hi everyone,    I have a weird issue with my historical data. What i have done:   Made a fresh installation of MT4Deleted all historical dataDeleted the account, so it cant go onlineMade a CSV files with 2 years of 1M dataImported it into History Centre. The problem is, that there is something...
The following snipett is meant to label bars as either "LONG" or "SHORT" when thier length is compared against a moving average of the previous 5 bars bodies. The labels work but the calculations are off. I have got this to work in excel/vba though it is not much good to me there. double sumSIZE=0;...
Hi I have an Ea that I am forward testing and would like to take a screen shot when it opens and closes a trade. I have tried a number of scripts and indictors that I have found online but none work, does anyone have any suggestions on how I might do this? Many thanks N
Hello , im searching feedback for one of my first EA's . The report is attached. As u can see i have non lots optimized  and im going first long only with these method. Whats most importent to read these reports well and fix these problems ?  It is better to combo more setting methods to an ea if...
Feature Request - Would it be possible to add support for the mouse "Next" and "Previous" buttons into MetaTrader? The idea would be for it to switch the current window to the adjacent tab, i.e. the tab to the left for "Previous" and the tab to the right for "Next" (note this is NOT the same order...
I can not get the install to setup. Able to download with no problem. Install starts. Get a proxy server pop up at the location step. I do not use a proxy. From other articles have tried different browsers, clicked cancel on proxy pop up and tried many times. Even let set at the download step for 30...
Is it possible to get an alert+pop from Indicator Window? Like in following image when indicator touches -80, I get alert   
The below code with #property strict directive compiles without error, but doesn't display anything. If you comment '#property strict' directive //#property strict it will also compile without error and the indicator will display a line. Not working code: #property strict#property...
Referring to https://docs.mql4.com/basis/function/events, OnCalculate paragraph. One can read: We should noted the connection between the return value of OnCalculate() and the second input parameter prev_calculated. During the function call, the prev_calculated parameter contains a value returned by...
I wonder why accessing volume or spread parameter of the OnCalculate function makes the indicator freezing when compiled with "#property strict" property. Have a try. When running, first tick shows alerts up to instruction: Alert("tick_volume[0]="+IntegerToString(tick_volume[0])); Subsequent ticks...
I need the script for viewing the market watch time dynamically in my message.   String Message; Message = " Now the Time is " + " xxx Market Watch time xxx" ; Comment(Message);   I need the solution for the above script   
Hi! I've got a good EA, but If It's open a position, and when this position will go wrong later, I'd like to close it 12 hours later. How could I do this? I know, I need a for cycle. For example:  for (i=0;i<OrdersTotal();i++) OrderSelect(__Ticket(0),SELECT_BY_TICKET)  if (__isExist(0) &&...
Is it just me or has anyone else noticed the Spread: 2 setting for build 625 (and perhaps any other previous builds) being far less than 2 pips (perhaps it's at 0.2 pips)? After recently doing some backtests on the spread 2 setting and getting unbelievably great results on all timeframes, I did...
Please,  can anyone help me solve this. I do not want it to open a new trade, at the exact same price as an exisiting open order. I tryed this, but it keeps open new orders at the same price. I have read a lot in the documentation, book and forum. There must be something that I am missing....
Hi:   Is there any interface to read the MT4 trading history from an external application? And any approaches to communicate between the MT4 and the externals please?   For example, I want to read the last 50 tradings to analyze the trading behavior in Matlab or C++ etc.   Thanks 
Hi guys, I just want to write a small indicator to give me an alert when 3 consecutive bars close (bearish or bullish) ... Any clue how to do it? Thanks in Advance
My fxt file has 3.7GB and the strategy tester finished the test successfully with trades executed throughout entire "From" - "To" testing period. MT4 version: 445. Has the 2GB limit been fixed? If so, when? I can't find any official statement/confirmation.
I have many indicators, scripts and EAs. I know that MT4 needs  the following architecture: MQL4>Experts > EAs MQL4>Indicators > Indicators MQL4>Scripts > Scripts There can be folders within as well! For example: MQL4>Experts>EAgroup1>EA1 MQL4>Experts>EAgroup1>EA2 MQL4>Experts>EAgroup2>EA3...