Download MetaTrader 5

MQL4 and MetaTrader 4 - page 8

To post a new topic, please log in or register
//Here is the error code int BytesWriten = FileWriteStruct(filehandle,H4Info); Error Info: possible loss of data due to type conversion I really can't get it, the 2nd parameter of FileWriteStruct() H4Info is a struct below: struct H4_SignalInfo{   int BuyOrSell;   datetime H8_AfterSignal;}; Where is...
Hi, I am having trouble with my code and am wondering if the fault is always with the programmer or sometimes it could be the stability of mql4? The problems usually occur after a long list of "if statements". I've included a typical example of the complexity of the code below. There would be about...
The MT4 tester is good for finding most everything about an EA. However, I would like to find the average days for wining and loosing trades.  The MT4 tester doesnt seem to do that.  Anyone know of how I could find out the avg # of days along with some standard deviation stats? Suggestions?
I downloaded and installed SAAD Scalper EA to my MT4,  but it doesn't trade. The AutoTrading button is on.  "Allow automated trading" = yes "Allow DLL inports" = yes Here is a pic of my screen. Please help me set this up correctly. Thanks. 
I can draw diagonal lines using indicator_buffers but it require many buffers. The prices change day by day starting from the beginning of pair's history by an external library. *note: please ignore the vertical lines How to draw this lines by using OBJECT_CREATE? I tried with below code: void...
Hello, How to initialize a double to the max value ? double VarMax = ???; Thanks, Pierre8r
  price overlay (3)
I want to share a tips which displays price overlay of two instruments. ----------------------------------------------------------------------------------------- Let's say we want to study USDCAD & WTI correlations. Here is double_chart.mq4 indicator which displays WTI...
Hi the EA needs to identify if a trade is currently running or not, im using CheckOpenOrders routine for this but when it is called in code its ignored. can anyone tell me what im doing wrong? so the idea is that when each bar opens it checks if trade is open or not then it opens one if there is...
Hello Everyone, When I drop the built-in Bollingers Bands on to an indicator and set the Apply to the First Indicator's Data I get the correct results. (see first two images) Now when I try to program the BB and the underlying 'price' in one indicator to mimic the results of dropping the BB on the...
Hello Everybody.   this message istranslated from french to english via the google translation service. I'm sorry ifyou find some errors.   I am a beginnerin programming, I just studied the language mql4. I'm training on designing some basic functions. I want toprogram a very easy code:  I want...
I want to request an ea. It should trade based on martingale, for ex: if it wins on buy order to place next trade also buy, if he losses on buy to place next trade sell. All trades should be with trailing stop. Lot multiply on loss by 1.5. Minimum lot 0.01. Stop loss 5 pips. It would be great if all...
Hi Guys,  I cant start this thread saying I'm a noob programmer even though I really want to because this is a silly question :) and it makes me feel like a noob lol. Coming from the C# world this is simple.  I have the need to have a string array (string MyString[]) and at a certain point I want to...
Hello There I have a problem  I have a Counter Variable in my EA. If a special Event Happend i want that in the same Moment the EA should output my Counter Variable like Comment but on top of the candle where the Event was happening. So actually when the Counter has 45 in it there should stand on...
I draw a horizontal line at 1.3000 price level. I would like to have a sample code which send a market order at this price level when price cross that horizontal line. OrderType and LotSize will be specified in description of the line. Thank you very much! 
how to get 90 % modulate quality ? and how to get 5 years history data ? i have tried some toold but still failed to get 5 years data for back test with 90 % modulating quality  can some one share step by step working guide ?
I need some help guys.. now I have an opened Position "Opened Manually"  I have that expert which count the number of open position and execute orders .. I want the expert count his own position only but didn't work .. here is the code void OnTick()  {//---  int total=OrdersTotal();     double...
Hi everyone, I'm quite new to mql4 but I hope my thinking still makes sense.  In the start function I create a trendline that I then want to check the price for for every coming bar. So far i've created a function outside of the start function that checks the price of it, but I am not sure how to...
  Elite indicators links thread (54   1 2 3 4 5 6)
It is the thread to download good elite section indicators mainly developed for elite section and for public sections as well.
Hello, in the programming of my indicator i need the output data of two indicators, one of them is called X-ZZ.ex4 Use the iCustom function to call it, as follows: double valor=iCustom(NULL,0,"..\\Indicators\\X-ZZ.ex4",0,0,1); However i get an error in this line, saying not to recognize the file...
  GUI (6)
Hello everyone, I'm not making any progress with this code atm. If I attempt to modify the code "Forum_Test" = "Indenifier not declared ". My question. CForum_Test can see variables, but Forum_Test.Run() will fail. I'm still trying to understand classes....
Hi, how can i solve that i get Ordersend error 134. When i use strategy tester and acccount balance is 10dollar so i get ordersend error 134. But here the ea have to check money before ordersend. So i have checked that with that function bool CheckMoneyForTrade(string symb, double lots,int...
Hi, Hello, I'm trying to introduce an equity control within code of ea to improve it.  For example imagine I have an ea called EA1 ; this one will trade in min Lots with its own MagicNumber EA2 will trade with regular Lots, different MagicNumber, same conditions as EA1 plus one: only allow trade if...
I made a custom moving average alert system in MQL4 that is suppose to alert me each time my two moving averages cross each other. I am quite new to coding so for whatever reason I get an alert but it is exactly one candle late. Any help would be greatly appreciated. Here is the code for my Custom...
string sy=Symbol();      double bid=MarketInfo(Symbol(),MODE_BID);      double lot=MarketInfo(Symbol(),MODE_LOTSIZE);      double point=MarketInfo(Symbol(),MODE_POINT);      double tickSize=MarketInfo(Symbol(),MODE_TICKSIZE);            double oneLotDatum = lot * bid;      double...
Hi Folks.  i was looking for a similar topic and couldn't.. I have MT4 on my laptop and there is no problem with, I also tried to install at my work computer, I think it is might related to a permission, I'm not an admin but I have some of those privileges, as can install, uninstall, etc. after...
hello double tickValue = MarketInfo(NULL, MODE_TICKVALUE);  EA strategy tester gives tickValue = 1 , instead of tickvalue in the deposit currecy So this instruction wont work while in strategy tester ? Thnaks
Hello guys! I noticed today that if I put the mouse over the SL or TP of an order it shows the amount of loss or profit that would be made if achieved on a box, is there any function to return that value on MQL4? Image of the box is below: Thanks a lot:)
I have 100 index buffers. I only want to draw 8 lines. The rest are there for calculation. How to I only draw 8. I have the ones I want to draw set to the first 8 indexes (0-7) I dont know how to stop the rest from drawing other than opening up the indicator settings window and setting the color to...
  new expert (3)
I have a system based on The RSI, two ma's (8 & 4) and the McGinley Dynamic Indicator. I have changed some of the parameters of these from the defaults. I would like to have the system able to automatically open both short and long positions and then close them based on these...