MQL4 and MetaTrader 4 - page 1191

In the meta editor help description of ArrayResize() it says this: Note: Array declared at a local level in a function and resized will remain unchanged after the function has completed its operation. After the function has been recalled, such array will have a size differing from the declared one....
[Deleted]
I have been having trouble sending orders and email test messages, even though I've got a connection and get data all the time. I thought my order sending trouble was because I messed up the code but I started one of the examples, MACD, and made sure "Allow Live Trades" was checked, and it still...
[Deleted]
Hello everybody! Can a robot combine two entry strategies? Example: First entry strategy is scanning the H1 interval for TRENDturn around on both LONG and SHORT side. If the result is negative than we don’thave a NEW TREND but still can be IN a TREND. Second entry strategy is scanning the M5...
[Deleted]
  maximal drawdown  (6)
i have an ea but i want to stop the maximal drwdon in % so i need a stoppoutpct! I copyied it from another ea but it doesn't work for my ea so i use the script - can anybody told me how i can use it
int A=3; int B=4; int C=Gipo(A,B); int Gipo(int a,int b) { int c = (A+B) ; return(c); } what is wrong with this function ? I can not work it out, I copied it exactly from a function written on the internet ? ? ?
Hi there, I am running the strategy tester on EURUSD H1 and it works fine. When I change to a different pair it loads my customer indicator every time it refers to it in the program. That slows things down. If I switch back to EURUSD it again works fine. Clues?
I am relatively new to MT. I am compiling my algorithms for my EA's. How many currencies and cross rates can be used to compute an indicator? Is is possible to create an EA utilizing input from multiple currencies at one time? Thanks in advance.
  Function call  (1)
//If I change c, why do Keep on getting a 0? int Crossed(double LineTop,double LineBottom,double Trigger) { static int LastDir = 0; static int CurrDir = 0; if (Trigger>=LineTop) { CurrDir=1; } else { if (Trigger<=LineBottom) { CurrDir=2; } else {...
[Deleted]
Hi All, I'm fairly new to metatrader and to programming EA's. I have a lot of experience with VB/VBA so the programming side isn't the problem, at least I don't think it is. I've written a basic EA to test my skills while learning and it doesn't seem to take the trades when I expect while running a...
How to calculate the cost in dollars of entering with 1 lot at given price ( EntryPrice ) with given StopLoss price ( SLprice ) ? double RiskPoints = MathAbs(SLprice - EntryPrice) + MathAbs((Ask - Bid));//The number of points we risk to loosedouble RiskDollars = RiskPoints * MarketInfo(Symbol()...
[Deleted]
Hello, i need a little help: What kind of variable should i use if i need it to be shared in all the symbols on which is EA attached to? (So for example i need if i set variable) bool dontTrade = true; So it will be shared for all the EA instances and no symbol will trade A little example of...
My Win Vista laptop has die for a few months now. I am thinking of getting a Mac now, either Macbook Air or Pro What are the methods to run MT4 on Mac Anyone mac user here? What are the pros and cons? 1) Bootcamp 2) rEFIt 3) VMware Fusion 4) Parallels Desktop 5) MS Virtual PC .... etc (let me know...
I found no way to automate trade or run script from outside metatrader is there anybody thinking about creating a webservice api like what marketiva has done ? http://www.marketiva.com/index.ncre?page=api&id=1. I am really thinking switching to Marketiva just because of that difficulty. I don't...
how do I get a value to 5 decimal places (double) from iSAR(NULL,0,0.02,0.2,0) ? . If I use double SARba = iSAR(NULL,0,0.02,0.2,0); I only get it to 4 decimal places
[Deleted]
Hi I have an EA and I have this code: double Pivot(string up_dn){int time = StrToTime("22:00"),shift;   if(TimeCurrent()<=time){      shift = iBarShift(Symbol(),Period(),iTime(Symbol(),1440,1)+22*3600,false);   }else{      shift = iBarShift(Symbol(),Period(),iTime(Symbol(),1440,0)+22*3600,false);...
[Deleted]
Hi Hope all is well. I opened a demo account here. http://www.metaquotes.net/files/fech/bd4setup.exe I am not sure how to create REAL money account here. Which broker is this. I am in US. Any help will be great. Thanks in advance. Sara.
  Time Function  (1)
Hi, i'm struggling with time function. What i need to do is quite basic: need to check if current time is between 5.55 am and 6.10 am had a look at all the functions, but still bit puzzled. thanks
Help - I keep getting automatically logged off from mql5 forum every few seconds It's really annoying, can anyone help? No proxy and CTR F5 doesn't help Thx, TheDC
[Deleted]
is it possible to run an EA with different Magic Number value on different symbol charts at the same time ?
[Deleted]
Hello! The optimized backtests I was doing went all the time fine till today. Now I get always the message "There were X passes done during optimization, X results have been discarded as insignificant". When I run the backtests without optimization (I put the different values in the first cloumn) I...
[Deleted]
  help for zigzag  (1)
I can to know the four last value of zigzag indicator if I modify the indicator ?; how. Thenk you
  Basic question  (3)
Hi, suppose i create and compile a new expert advisor. Now in the strategy tester i see i can test it. i also see you need to specify a symbol. when the test is done how do i put it in real action ? also how do i apply it to all symbols ? thanks,
I want to check if a variable has a positive or negative number, how can I do this
Dear Friends, I need an indicator which represent the value of "Average Trade Price / Closing Average" on 30 minutes each and every candle in chart. Please help in this regard. Thanks, Pawan
Hi, I am currently developing a calculator.But that i will need mt4 data in excel. Well i know that basics of excel data fatching with DDE server and formulas like. Can you tell me,the codes for fetching particular time frame data like 5M,15M etc. anybody knows,any tricks or way,where i can fetch...
To all the programmers out there I'm looking to buy an EA that allows me to copy trades. Here's the following requirements. 1. Trades can be copied over to another MT4 from different broker, irregardless of decimal or spreads or naming of instruments. 2. I should have the option to FOLLOW or to...
[Deleted]
Hi everybody, I wrote an ea that will scan every currency but it's actually impossible to backtest it with MT4. Does a workaround exist like adding a manual backtest function to my mq4 code ? Thanks a lot, Manu
The function of the Forex is to allow foreign countries to trade as well as to assist international investment by allowing countries to convert one currency into another. So for example, a company in America that was buying stock from Britain can buy that product and pay in British pounds. It also...
[Deleted]
Getting around to doing cleanup on EA's YEA! and have a persistent error 1 problem when changing the price of a pending order. This situation has risen thanks to the D... A.. I..... at the CFTC and NFA for compromising our 1st Amendment rights in the US to trade as we see fit. It is one thing for...
int handle; handle=FileOpen(SAR1.txt,FILE_WRITE,';'); if(handle<1) { Print("File was not found: ", GetLastError()); return(false); } . this returns error 'SAR1.txt' - variable not defined How do I define this text file name as a variable and why do I have to...