Download MetaTrader 5

MQL4 and MetaTrader 4 - page 343

To post a new topic, please log in or register
Hi, I try to make a EA, but I stuck . I want to add the formula: (Open+Close+High+Low)/4 It's like the Heiken Ashi bar but the value of it is different. I attach my tradingsystem (PDF). The profit is good. But when I calculate the formula by my self I lost every time my entry point. Thanks in...
Hi Guys, I try to create Alert when Bid price cross the trend line. First I would like to position the trend line and then get only one time alert after cross: 1) When the price cross from above to below; 2) When the price cross from below to above; But I get error message /warning/ during...
Is it no longer acceptable to assume arrays are initialized to zero when they are declared ? If so what is the proper method ? Using ArrayInitialize() locally will cause array to be reset on every tick there doesnt seem to be a sensible alternative ? Always declare them globaly and use OnInit() ?
Hi! I´m looking for a indicator that will draw multiple lines on a chart based on prices put in a external file. If the external file is called "EURUSD.cvs" and have this content: ------------------ Orange lines: 1.3870 1.3736 1.3743 1.4046 1.3867 Red lines: 1.4118 1.4078 1.4068 Green lines: 1.3818...
I'm checking a very simple EA which should trail the stop using OrderModify(). At the beginning, I used "Ask manual confirmation" to check if everything o.k. Now, after UNselecting "Ask manual confirmation" and even restarting the terminal, EA still prompts for confirmation in a pop-up dialog window...
I have read the previous posts about problems but cannot find a similar situation than mine. When I save a template it does not appear on the list of templates that I can load. It is also not to be found anywhere on my disk - and I know where to look under my Win7 virtual store or the normal...
Hi there - when I execute: double LotSize = MarketInfo(Symbol(), MODE_LOTSIZE); on symbol .BrentCrud I get LotSize back as 1.0 - I would expect 1000, because 1 Lot of Brent Crude is 1,000 barrels? Am I misunderstanding the definition of a term? Thanks
HI, How can I find out (at init() e.g.) that trade is allowed (terminal-options are set) even if the server is busy (or market closed?)? IsTradeAllowed(); Returns true if the Expert Advisor is allowed to trade and trading context is not busy, otherwise returns false.
New article Data Structure in MetaTrader 4 Build 600 and Higher has been published: MetaTarder 4 build 600 features the new structure and location of the client terminal files. Now, MQL4 applications are placed in separate directories according to the program type (Expert Advisors, indicators or...
I just stumbled over these two entries in the MQL4 Reference: IsOptimization(): Returns true if Expert Advisor runs in the Strategy Tester optimization mode, otherwise returns false. and IS_PROFILE_MODE: Flag that a mql4-program operates in profiling mode non zero in profiling mode, otherwise zero...
This seems somewhat related to this bug here: https://forum.mql4.com/60924 In this bug, the strategy tester report did not properly display the string inputs. This bug was fixed in 610. A new bug relates to the tester log files ([mt4 folder]\tester\logs ; all tests are done in portable mode and...
Hi, Could someone help me ? Below is my codes in ea: int iarray[]; ArrayResize(iarray, 10); when I excuted the ea, I got an error says : Access Violation read to 0xCDCDCDC8 in 'a.ex4' Hanxu
Hi Everyone In my EA, whenever i open an order, i will open 2 one after the other. For the second order, i will put in a TP value (fixed at 10 pips).            res=OrderSend(Symbol(),OP_SELL,LotsOptimized(),Bid,3,0,0,"",MAGICMA,0,Blue);           res=OrderSend(Symbol(),OP_SELL,LotsOptimized()*2...
I want to make a simple one button panel in mql4 4 Please help???
if i move the mouse on the chart, the index of the specific bar is shown like the picture, how can i get this index ? i means get the index of bar depends on the location of mouse.... i would like to express by comment() function. Thanks a lot your help ~
Just a quick one - with iCustom must you pass every input parameter (or none at all)? Example: the indicator has 10 input parameters. Can you pass just the first 4, and iCustom will use the defaults for the remaining 6?
I have saved my strategy report, but I can only view it through internet explorer.
Hi, I need calculation of freemargin and equity for opened orders. If i close open orders, what will be free margin and equity? Is it possible to calculate?
Hi Coders! Can I hide OBJ_BUTTON objects from the object list? I use the same code as the MQL4 Reference shows: //+------------------------------------------------------------------+//| Create the...
Hi all! I am developed an EA to find peaks and valleys. It worked well its job, but when the mt4 build 600> appeard i tried to make it in new language, but i cant realize the problem of array out of range, and the debugger is showing stupid things :( If somebody smarter programmer than me :) could...
After a OS restart all known autostart software programs cannot restart the MT4 correctly because of a bug of build 600. The terminals are losing in this case all personal data like accounts, experts, indicators, profiles, etc. Has anybody heard if and when Metaquotes will offer a solution?
Hi I would like to know if anyone else has experienced what I believe to be a fatal flaw in the new build, when an EA is placed on a chart and then the time frame is changed, I have found that the EA does not load correctly, the wrong values are placed in the wrong places, I have code that I have...
Running a strategy test on "Open Prices Only" and using: Print(">> ", Time[0], " ", Open[0], " ", High[0], " ", Low[0], " ", Close[0]); Returns the same value for the Open, High, Low, Close Prices: 2009.09.29 09:01:34 2009.09.09 23:57 TEST EURUSD,M1: >> 1252540620 1.4560 1.4560 1.4560 1.4560...
i have 2 questions to the metatrader4 terminal first. when i set up an hotkey for my script it works, but after a reboot of my pc the hotkey setup is erased. (profile/template i have saved after setting hotkey) is it possible to set the hotkey, so it is saved after next reboot? second. when i´m...
  EA use (1)
From the same platform, I have two accounts [one demo the other live, with equal margin, I employ the same EA. Problem is the live one trades one currency pair, few trades, all shot. The demo, on the other hand trades a basket of pairs long and shot, needless to say its growing exponentially. Let me...
What is the problem causing this error message? or if this is in the wrong forum please disregard. https://www.mql5.com/en/forum/22035 MetaEditor 5.00 Build 883 / MetaTrader 4 Build 604 //+------------------------------------------------------------------+#property copyright "Copyright 2014,...
Hi!! I have just updated my MT4 to the Build610. I found a problem, when I write a program in MetaEditor4 I used to compile very often for testing purpose, and doing it didn't create any problem untill now. Now everytime i press the Compile button, all the EAs that are running in the MT4 from where...
Hi, Let us say in an indicator there are three buffers. Can we attend buf_0 (i) minus buf_1 (i-1) to buf_2 (i). Buf_2(i)=buf_0(i)-buf_(i-1). It says out of range error. Why? Notice time difference . (i), (i-1).
iATR(Symbol(),0,3600,1) is reporting 0 even when Bars=3601. Also, when it finally starts returning a non 0 value (1000's of bars further), it still seems quite far off compared to the iATR with the same perimeters calculated by MT5 at the same spot.
Hi, I'm pointing to a bug with string (unicode) transmission into .DLL #import "..." bool protocol_Auth(string,string);#import First example doesn't work good. class protocol        {        ...        public:                bool Auth(string _user,string _pass);        };bool protocol:...