Download MetaTrader 5

MQL4 and MetaTrader 4 - page 21

To post a new topic, please log in or register
Hi, I'm try to recall the OrderTicket() in the ObjectSetDouble function, but I haven't in the autocomplete function, when I try to recall it. Where is the mistake? Thank you! void CreateLabels() { int total = OrdersTotal(); for(int cnt=0;cnt<=total;cnt++)     {     OrderSelect(cnt, SELECT_BY_POS,...
  IsConnected() (40   1 2 3 4)
Can someone explain to me how IsConnected() can work after int start() if anything is written after int start() is execute only after a new tick How can the EA get to it at all thanks
#import "kernel32.dll" int GetLastError(); #import This Function Name Matched With GetLastError() in the mql4 functions. I want to know the "_lopen" 's error code in kernel32.dll How to do that?
Hi  I am looking for a way to enter a market order when a market opens. I check for signals after the market has closed and want to enter on the market open. Is there an EA that will do this? I have searched without success, and I don't know how to code. I would want to be able to specify volume...
Hello, Is it possible run existing EA from a script/ea ? If so, is it possible to define the ea settings like Pair, Timeframe and parameters ? Thanks in advance, Manu
  Indicator timeframes (11   1 2)
Hi guys, So I run an indicator that I have written on the hourly timeframes and it gives me fairly reliable signals. However I have noticed that it often notifies me quite late because it waits for the candle to close, which it only does every hour. And by that point the price might be 20 PIPs above...
Hi all, in an effort to debug my EA, I would like for it to programatically take a screenshot of the current state of the chart whenever a trade is placed. I did some searching and found pretty much what I needed at https://www.mql5.com/en/articles/1534. I just have one remaining little issue - my...
Hi, i have problem with button array. I'm not able to fill the object field with the buttons. Is somebody to help me?  #include <Controls\Button.mqh>class Panel : public CAppDialog{private:   CButton           m_BtnSymbol1, m_BtnBymbol2;public:...
I want to edit the main cci indicator file and save it as a customed one for myself for special purpose. I want to use heiken ashi values instead of normal ones. In cci code which i wrote it from cci.mq4 file, there's 2 FOR loops. I want to know should i replace default high, low and close values in...
My EA set pending orders for datetime. All other functions are working well with my Strategy Tester and Real MT4 Platform. I am again saying my EA 100% working well with my Broker. But when i upload to Automatic Validation process it fail to validate the EA. Please look that codes. extern datetime...
I have a program which includes a 'Use Trade Time' option and want to display the answer 'true' or 'false' on a chart. All I can get it to print is '0' zero. Please can anybody help me? Thanks Ken
Hi,  when I try my EA on the EA Tester from yesterday, the orders long don't work, just the short ones, but in the live version is all right, same script both work. The error that is returning is #138 ..."requote". It should be somthing related to broker price. How can I fix it? The live version is...
I have searched whole the net for a heiken ashi indicator for either mt4 or mt5 that displays heiken ashi bars in a new window AND enables me to add any second CUSTOM indicator to it. I mean the calculation of the second indicator to be based on close price of heiken ashi bars. Is there any...
Hi, I was chatting with a developer and he has told me that MT4 has problems using multiple time frames in an EA. I use the following to identify forward trend and then look for lower time frame entry points:          StDev=iStdDev(NULL,PERIOD_D1,10,0,MODE_EMA,PRICE_MEDIAN,index+1);...
Hi All, I try to down load but get the message  Have you installed MetaTrader 4? MetaTrader 4 is required for installing  I have installed Mt4 so click yes but nothing downloads. How do I get the ea's and indicators I've chosen to download??.   thanks  wib
Hello Gurus, I am trying to write and read to files which are saved to C:\Folder instead of inside Metatrader 4 folders. Since MT4 build +600, everything related to import external dd like kernel32 has changed the way they previously working well. Please see part of below code to help if you are...
  ADX Crossover (2)
Hello everyone, I am a little bit stuck on how to check for a cross over, I started writing this code. AVD_Minus = iADX(NULL,0,14,PRICE_CLOSE,MODE_MINUSDI,0); AVD_Plus  = iADX(NULL,0,14,PRICE_CLOSE,MODE_PLUSDI,0); AVD_Main  = iADX(NULL,0,14,PRICE_CLOSE,MODE_MAIN,0); A = fmax (AVD_Plus, AVD_Minus);...
I have been seaching for this indicator without luck. Is it possible to make an indicator that automatic execute trades when The opposite color  has closed and The New candle has started 😊this is for renko and mt4 system 😊 Best regards Henning Berge 
Hi, Have you heard the gospel? Did you know that there are two ways after you die? Hell (Gehenna) (eternal torment in the lake of fire) or Heaven/new earth, new Heaven which is an eternal paradise. People are sinners and they need to repent of the sin like homosexuality,  lying, stealing, and...
Searching for this mostly resulted in a slew of like-minded posts that went unanswered a year or two ago...but on the off chance someone has since figured out a way to do this (or knows for certainty it cannot be done) I figured I'd pose the question. Is there a way to setup a script or EA attached...
Hello, since today I'm not able to drag and drop indicators inside the MT4 window to a chart. The indicator will not show up, that symbol window will freeze, all other windows keep updating but MT4 is completely unresponsive. Nothing on my system has changed. Windows 7, last MT4 build from May,...
Hello, I was able to read from a file outside of MT4 folders using windows API but when I'm trying to write there are spaces in between each letters. It's an old code I found online and tried to fix. I'm guessing it has something to do with the MulDiv function but not sure. Can you please take a...
I am trying to invoke this method in MQL: #import "Trading.dll"int GetSymbolCount(string symbol);#import The C# code is as follows: [DllExport("GetSymbolCount", CallingConvention = CallingConvention.StdCall)]public static int GetSymbolCount([MarshalAs(UnmanagedType.LPWStr)]string symbol) I tried...
Hi I'm asking this because I've recently introduced it into my EA and found strategy tests now taking ages and wondering whether the increase is due to the interaction with the broker. I'm a newbie, so apologies if this has been asked before. Thanks in advance
Ok, I admit it, I'm a newbie to MQL4. That said I've been an IT developer for 40 years now and trading generally for as long as I can remember. This has been asked before, I know, but unless I'm not searching this forum correctly, I've not found an adequate answer. I trade using three different...
Hi , I'm new to MT4 and I would ask if it support ( Min(O,C) and Max(O,C) function. To be more clear: I need to measure from High to Open for the candle that closed Red OR from High to Close for the candle that closed green. Thx
  What is a TICK? (42   1 2 3 4 5)
What is a "tick" in MT4 ?
Hey there! I'm new to coding with MQL4. I'm simply trying to have my indicator plot vertical lines at specified times in history. It actually does this correctly! The only problem is when I initially drag the indicator onto a blank chart, I click "OK", but the vertical lines don't appear. However,...
According to https://docs.mql4.com/basis/types/classes  union is a reserved word. However, when I try to use it, the compiler doesnt recognise it. I have build 1090.
extern double lots=0.1;  int ticket=0;  extern int stoploss=300;  extern int takeprofit=500; int aperto=0; //+------------------------------------------------------------------+ int start() {  double mc1 = iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,1); double mc2 = iMACD(NULL,0,12,26,9,PRICE_CLOSE...