MQL4 and MetaTrader 4 - page 796

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
I want to make a simple one button panel in mql4 4 Please help???
[Deleted]
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...
[Deleted]
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:...
I need to reset to Zero all orders balances in the metatrader 4 platform, but keeping all the open orders. A scrip to overwrite the lot size to Zero of all orders and again to the required unic lot size for all orders, so all the balances will start again from Zero. jjoosseepp (at) yahoo (dut) com
Due to my suspicion that the genetic optimization uses the wrong side of the list of the values which was returned by OnTester() I tried to change the sign of the results: void MyTester(){        maxBalance = MathMax(maxBalance,AccountBalance());        maxDD = MathMax(maxDD,maxBalance -...
  Organizing Class's  (11   1 2)
hey, my programs are starting to get awfully long, I'm trying to keep everything nice and simple by using big spacing between sections and lots of comments. but is there a way you can have different classes on different pages (and perhaps even have different groups of classes in their own folder)...
I did not find any relevant information in documentation on this site. The question is about difference between those chart windows: and about the property in those chart Properties: I noticed, that if I change this property manually, nothing happens until I restart the terminal. Another...
Raised with ServiceDesk - posted here for visibility (just in case someone is hunting down memory leaks). If there is error in my test case please let me know :) // Singleton Object reported leaked but is only allocated exactly once and deleted exactly once... #property strictclass Singleton {...
Hi, I have Expert advisor, that creates some label object in init(). I noticed that adding EA on chart causes MetaTrader4 to store chart profile on disk, but it happens before my object is created, so created object data is not stored in chart profile. I need to readd EA again, change profile or...
hi, Im new to the world of EA's and was wondering if someone will be able to steer me in the right direction or even write it for me? The rules are: On the 15min chart any pair -If there is a candle that closes higher then open but only buy 2 or more pips difference (bull), only if it appear after...