MQL4 and MetaTrader 4 - page 1124

[Deleted]
Is there a way to check for this error before a trade is actually attempted
Hello coders, I am still relatively new to coding and I am writing an EA that does pretty much what i want it to. It opens trades when I want it to, it closes them when I want it to, etc. However, I have run into a wall. I want the EA to have a maximum of 2 open orders at any given time. If there...
  Adding Color to an indicator  (33   1 2 3 4)
I would like to print a red square (small) on the chart when the next higher time frame is going down. And a white square if it is going up. How do I do that? Once I get that figured out, I can then add other time frames and different bars. my code so far is: // 30 min current double open.30.0
[Deleted]
Hi I wonder if anyone can help? I've tried to download Meta Trader 4 demo a/c but when I get to filling in personal details I find that it will not allow me to fill in account type or currency boxes which are blank and of course I can get no further! I have un and reinstalled the programme and...
[Deleted]
Forex EA (Expert Adviser)Forex Robot Programmer Developer Hi,By Profession Im Software Engineer. But fromlast 7 years Im in Forex Trading. I 've developed many more Forex Robots EAExpert Advisers, and distributed to client as per given criteria. There are somany satisfied clients. If any one wants...
[Deleted]
  EA Fault  (20   1 2)
I am using an EA on alpari with 402 build that works ok,i have installed the same EA on fxpro same 402 build but it will not work,Where should i look to find this problem,i have no coding knowledge. Thank you
I have some code that are supposed to do two things as soon as the first Buy or Sell order closes at a profit: 1. Reset a list of variables back to zero 2. Delete any outstanding/exisiting buy or sell stop orders I just cannot get it to do these two functions and i need some help since i cannot...
[Deleted]
I'm new to MT4. I have 2 include files (file_1.mqh & file_2.mqh). They are both general purpose functions, but for organizational purposes I would like to keep them in 2 files. Each file uses a function in the other, so I always get an error saying "some_function() doesn't exist" when I try to...
[Deleted]
Hi, I would appreciate some help on the two issues described below. If a user drags and drops an EA to the chart, is there any way for this EA to find out the exact time/price where the user has dropped/released the EA on the chart? Another question: can an EA make some kind of call to the user...
Hello I create trading ideas in Excel and then write an EA based on these rules. I am stuck however with Average Deviation. This yields different results than Standard Deviation but I do not know how to write it. Here is an example of the Excel code and I would be very grateful if someone can...
[Deleted]
I know this is a weird question, but I'm trying to figures out what kind of things are possible in MT4, so I'm experimenting. If an include file has errors saying that a variable is not defined, but it is defined in the mq4 file that #includes it, will the script or indicator still operate properly?...
[Deleted]
I use the #include statement in an MQ4 file to #include an mqh file. When I compile it, there is no error. I then go the the mqh file and put in an obvious error, but don't compile it. I then go back to the MQ4 file and compile it again and there is no error. That tells me that the compiler...
[Deleted]
I am working on a strategy the places trades on multiple pairs. I use MarketInfo("GBPUSD", quantitative variable),MarketInfo("GBPJPY", quantitative variable),MarketInfo("EURJPY", quantitative variable) etc... to retrieve info for all pairs and I send all the required info with the respective...
Can I use price overlays on the charts?
[Deleted]
So i am just starting to learn MQL4 and i have read couple of tutorials. So can someone give me general directions how to code Parabolic SAR and set that MT opens position whenever SAR shows trend change. And second thing is that MT opens position 10 times my balance. Thank you
I need to run MT4 in Linux OS, I know this can be done through a software called WINE which allows to emulate windows' software. However, I also need to know if MT4 can be run in some sort of "batch mode", I mean, like a command line (e.g. terminal.exe -optimize) and execute optimizations from...
Hi all, recently I've developed a EA in MT5 and would like to transfer the transactions done in MT5 to MT4 through a set of programs offered in https://www.mql5.com/en/articles/189. It composes of 2 programs, one each in MT5 and MT4. The bug that I have found was in the program in MT4 so I would...
MetaTrader 4 Client Terminal build 402 Terminal: Fixed timezone correction when uploading history to History Center (F2 key). Terminal: Fixed display of graphs on scale 1-1 for characters with 5 digits. Fixed messages on the forum and the kreshlogs. The live update will be available through the
[Deleted]
When I compile my code I get an error that says "ErrorDescription": function is not defined. I used it in my code to place buy and sell orders and I forgot to put the preprocessor #include<stdlib.mqh> which is the library that has the defined ErrorDescription() function. But for some reason when I...
[Deleted]
Hello, I am currently developing an EA, but I have a little problem. I would select the last trade in the history (closed) Type Buy or Sell and recover its profit and its type. I made a small image to more clearly explain my goal. I could do some research, I try to make a loop with...
Pls help me write a string of code to calculate the MA of an indicator. This is what I have tried so far: for (int a=0; a< MA_Period; a++) double CCI = iCCI(NULL, 0, CCI_Period, PRICE_CLOSE, Current + a); double MA_of_CCI=iMAOnArray(array[CCI], 0, MA_Period, 0, Ma_Method, 0) ;...
I have these indicators but when I try to load them I get a message that my account is not authorized to run these indicators. These indicators are attached. Can anyone help me? Thanks.
[Deleted]
  help me
HELLO I am a beginner in the forex and I have good indicators to go on the market and, if possible, good tools to analyze themarche.j 'really would like you to help me have a real tool for this thank you to everyone and good trade
Hi Guys, I have this EA but the magic Number does not work. I did not program it all myself and I tried to fix the MN for days but I do not get it. Can anyone help me. Everyelse is good so far. extern int        MagicNumber = 123456;extern double     Lots=0.01;extern int        Timeframe=0;extern...
[Deleted]
I am printing the following statement: Print(Order_Symbol, ",", Order_Quantity, ",",(OrderType() == 1),",", (Order_Quantity == 0)); It returns (symbol, 0, 1, 0) How can Order_Quantity = 0 and Order_Quantity != 0 in the same statement? Order_Quantity is declared as a double variable.
This thread was created to systematise approaches to trading. I'll post my thoughts on it to start with so I don't forget :)
[Deleted]
Hi I am using ibarshift to identify the daily start time of a session for my EA:         double dHi = nd(iHigh(Symbol(),Period(),iHighest(Symbol(),Period(),MODE_HIGH,iBarShift(Symbol(),Period(),dst,false)))); The "dst" is defined in the EA already, so if dst is 00:00hours then it will look for the...
Thanks for your help Raptor. I'll keep reading and trying.
Hi, Could you help me, I want my system react only on prices at the end of given Timeframe i.e each 5min or 1 hour, but not by each tick? MA is calculating ok, but I want signals were given by the same timeframe. Appreciate, Pavel
[Deleted]
Is it possible to count them?