MQL4 and MetaTrader 4 - page 39

To post a new topic, please log in or register
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...
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...
Hi all, I have this extern variable in my EA that is called "index". Before the EA runs in the main window, I would need the user to select one out of three pre-determined values (for example, the three values could be 0,1,2 and the user selects 1). However, to choose one of the values, the user...
Would just like to ask why in the following code: void OnTick(){   double MyPoint;   if(Digits==3 || Digits==5) MyPoint=Point*10; , why the Point*10? It was generated by a certain code generator. Mainly used to multiply the MyPoint to the inputted Take Profit to convert it into pips. Thank you in...
Hi there, Following a similar pattern I've used in an EA, I have the following code at the top of an Indicator .mq4 file: ...//---#include <gwDeltaCache.mqh>//---CDeltaCache *DeltaCache;bool isInitialLoad=true;... However, when I do something like change the timeframe, OnDeinit() is called and...
hi everone i hope you have nice day i write code in mql4 that modify take profit with + 3pip for every 5 pip up for bay or down for sell the problem is that modify order work once  and give me 130 error -------""2018.04.24 23:57:30.751    2018.03.13 00:00:00  test v1.5 EURUSD,H1: OrderModify error...
Hello,  I have an indicator,it is very helpfull, but if creates alerts all the time. And this is spamming my mailbox. I want only alerts on the selected timeframes. So when I have the indicator on a 4 H chart then it should create an alerts every 4 hours etc..  Can anybody help me with this? I tried...
#property copyright "Ch Le"// External variablesextern double Lots = 0.01;extern double StopLoss  = 300;extern double TakeProfit = 600;extern int Slip = 3;extern int MagicNumber = 123;// Global variablesdouble M15Ema5, M15Ema20,H1Ema5,H1Ema20,H1Ema100;int CounterUp600520,CounterDown600520;int...
Hi, i have a question. I have to do this  If a check shows that there are insufficient funds to perform a trade operation, it is necessary to output an error message to the log instead of calling the OrderSend() function. So i use that code from here https://www.mql5...
I have problem with drawing line in custom indicator at the calculation event.  If i draw a line in only just bar[1] = 20, bar[2] = 10 and [bar[3] = 11, the result is line at bar[0] and other bar up to rates_total is set to 0.0. double bar[]; //it's indicator buffer at calculation event:  bar[1] =...
I have problem with drawing line in custom indicator at the calculation event.  If i draw a line in only just bar[1] = 20, bar[2] = 10 and [bar[3] = 11, the result is line at bar[0] and other bar up to rates_total is set to 0.0. double bar[]; //it's indicator buffer at calculation event:  bar[1] =...
Hi everybody, I'm wondering if there is a way to convert DT oscillator (attached) to a function, such as this: double calculateDT(int timeframe, int PeriodRSI, int PeriodStoch,int PeriodSK, int PeriodSD,int MAMode,int line,int shift) { // //here is the codes // } here is the main "start" section...
Hi all, I just recently activate my Email Alert in MT4. I set up the smtp using online service by GMX.com. Everything works great. Alert got sent to my email, etc. I am wondering whether this email alert thing works just like EA; that it will remain active as long as the Computer running the MT4 is...
soubra2003
Hi everybody, Please note that I have a great work coded in MT4. But I have this puzzle of the error 4108 as you can see below   This error I have searched everywhere in this forum and others' forums but I found no one have totally got the final answer and was happy! all people says to don't select...