Download MetaTrader 5

MQL4 and MetaTrader 4 - page 784

To post a new topic, please log in or register
Hello, could anybody tell me how to download OHLC from a daily chart into ones own Excel file?
I am working on a script that reads back x bars. for bars 0-9 I get information, but from 10 to 15 and back all I get is 0.0 for closed, open, high, and low. I have also tried this with the iOpen, IClosed functions with the same results. Is there something I need to do to load candle history past...
Hi again :-) Maybe also some of yours can send me past values (last 1-2 years) from economic calendar for testing? Thx and best regards, EADeveloper
  Refresh Issue (7)
Not sure what version of MT4 this became an issue, but it is definitely there now. To ease cpu load, I use a flag so my indicators only run every new bar. Been working great for years, but I noticed now that when the refresh button is pressed, all my indicators disappear. From what I can gather, a...
Hello, I curriently use the standard MT4 ADX indicator in my charts and access the same values in my EA using the command iADX(NULL,0,ADX14,0,0,1). I'd like to replace this ADX with a Custom Indicator ADX_WildersDMI. How can I accessing the values of this Custom Indicator, replacing the old command...
Hi Experts in EA's! I got the following error in my EA and therefore I think it's not putting in SL and TP after I try to modify the order so that my EA works for an ECN broker. MT4 invalid double number as parameter 6 for ordersend THIS IS PART OF THE CODE if (UseStopLoss) StopLossLevel = Ask -...
Ok, tho I don't have a programming background. Is there such a thing as Coder's in the Zone, Programmer on Fire or Coding hot Streak. Man, I tell ya. Some days I'm amazed that I coded something I taught was complex in 4-lines. On other days like today, I can't even pull off the simple stuff I've...
Can someone please explain what AccountCredit() function does? Yes I have read the documentation and I have no idea what the credit value of the account means. Please explain.
I'm trying to write an indicator. It kind of works but in backtesting the values returned don't match what's shown in the chart. Where am I going wrong? Here's the code:...
I need a function that request to the broker all the positions I have on my broker account. For example, If I had a gold CFD, and 1000 shares of General Motors, and a Eur/us CFD.... Does it exist a function in mql4 that could get all these positions, with prices, number of position, from my account...
Hi, When I run the following code I get the output "OK = incompatible access to a file, bytes = -1". Can anyone see why? The file is being created ok, it just won't write any values (or read, if i put the values in manually). Thanks    int handle = FileOpen("file.csv", FILE_CSV | FILE_WRITE, ';');...
Hello everybody, I want to determine the highest price of each M1-bar every minute. My aim is make a calculation meaning adding each higheste price per M1-bar For example: at 09:00 am M1-Bar Highest price = 1 sum: 1 at 09:01 am M1-Bar Highest price = 2 sum: 3( sum of 09:00 and 09:01) at 09:02 am...
Hello, Im writting ea and I have this lines in my code: if( OrderStopLoss() > Bid+stop_loss*Point ) { FileWrite(fw, OrderStopLoss(), ">", Bid+stop_loss*Point); ... } This is output from FileWrite() function: 1.4186;>;1.4186 1.4186;>;1.4186 1.4186;>;1.4186 ... The numbers are the SAME,...
First, thank you for your help you gave me before but it seems any of them are wrong. I my first code part here: if (OrderType()==0 && Bid-OrderStopLoss() > 150*Point) { double SL_Buy = Bid-150*Point; bool Answer=OrderModify(OrderTicket(),OrderOpenPrice()...
Hello, I have an EA that sets the Lotsize depending on the Account balance. How can I find out, if a user uses the EA with an Micro, Mini or an Standard account? With a Micro account the lotsize should be higher, than for a Mini account and for a Mini account the lotsize should be higher than on an...
Just found a reference to this in MQL doc: "Global variables are available within four weeks since their last call from experts or manual modifying." I take this to mean that, if you create a global variable, whether in code from an EA, or manually, if there are no modications or access to it, the...
I am trying to FTP a txt file to a server. I have the password and User name but when I try running the test I get the FTP: STOR command failed. I have been able to FTP with FileZilla with no problem. Has anyone else had this problem?
I am busy writing my first EA and I have certain conditions that I check for false or true. The results are stored in an array. The array has 5 instances. If only one instance is false it must make the total result also false. To get a true result ALL five instances must be true. I am not familiar...
sir,any help me how to link my indicator to other ip
I have a purchased EA that is working fine.It is fairly advanced and has many inputs.I am trying to test some other settings of the inputs but the Strategy tester doesn't seem to be working properly.I DO have older computers with Windows XP. This is what is happening right now: The Strategy tester...
Hi All, Can someone please tell me if what I have done in this backtest is possible on a live account. At some points the balance goes negative whilst the equity is well above the initial deposit. I have searched the net to death and cant seem to find an answer, thought you guys could shed some...
  Can MetaTrader send SMS? (17   1 2)
Is there a way to set MT to send SMS to my cellphone through a connected cellphoneor GSM modem? I need this option (instead of sending email) because my connection is lostsometimes and MT cannot send emails then.
Hello I have an EA that performs well in backtest and I am trying to take it to the next level - performing on a demo account. But I am lost as to what is good practice to make it reliable, robust to recover from MT4 crash. E.g. - error handling. Apart from (obviously) logging the error, exactly how...
Hi All, I'm totally newbie in MT4 compiling, thus i'm seeking for some help. I'm trying to implemente a strategy whose logic is as follows (i've found the following article on a website, it's not my homeworking) ;-): 1. Open a position in any direction you like. Example: Buy 0.1 lots at 1.9830. A...
Hi, I want to run a cicle or something like that, to identify last Buy/Sell closed order by magicnumber, and then if it finds any remaining open Buy/Sell orders from a list of magic numbers, it must close all the Buy or Sell orders depending of the type of last closed. I already tryed the...
Dear All, I need some help on the following issue. I have a custom indicator, which display TREND in separate window. There are 3 color used to display TREND 1: Green => Which is show UP TREND 2: RED => Which is show DOWN TREND 3: Yellow => Which is happen between UP TREND and then DOWN TREND So in...
Hi every one, Can somebody please post me or show me where I can get the standard daily pivot point indicator. I have not used it before so dont know much about it. Does it come as standard indicator on MT4, if it does can u let me know where it is. Any help would be appreciated. Thanks for your...
I can't find anything in the forum where this has been asked already... When I add a new Horizontal Line by default it shows the price on the right side in the vertical axis. Is there a way to suppress this value from being displayed (or at least moved to the left)? While I'm asking, I'd also like...
Hello, I use MetatradeAPI dll, and i bult my program on Windows 7 ultimate... When i execute my program on Windows server 2008 R2, there are errors on dependency for MetatradeApi.Internal.Shared! Why do I have this problem? PS: My program works on Windows 7
Hi everybody.I have been playing around with EAs for quite a while. Had no great success with ones trading on standard charts. Then friend introduced me to Renko charts. I started to build EAs which were making terrific profits trading on Renko charts but only in the backtest. In live demos they...