Download MetaTrader 5

MQL4 and MetaTrader 4 - page 169

To post a new topic, please log in or register
Hi everyone. I'm interested in using chat software to send trade instructions to an EA in MT4. Slack has an Outgoing WebHooks integration that will allow me to send an http request but I haven't been able to find any way for MT4 to receive these requests so they can be acted on. I can send http...
This is following on from a recent post I built this little indicator with some valued help to measure in my eyes, a pairs "strength". Use it much like an RSI or Stochs. But that's another topic....
I am trying to select a price level on a 1hour bar that is part of a daily bar with a certain characteristic. Something along the following line, as an example: If ((daily bar  == certain characteristic) -> zoom into 1hour bars and do 'whatever'...)     To make the transfer from Daily to 1H, I...
I try to create a two-tone Bollinger following phases. It is no doubt very simple but I can not find why when changing colors there are holes ...   //+------------------------------------------------------------------+//| Bollinger Phases Bi-Color.mq4...
I am writing a script in MQL4 language for Metatrader 4 which is using C# DLL library for further data processing.   What I'm trying to do is to pass an array of following MQL structures: struct marketUpdate{        double openPrice;    double closePrice;    double highPrice;    double...
Hi all I trying to code the condition of finding DT. I want to check previous 40 bars starting from 6th bar to find the one(H1) with max equals to previous d1 bar. Then I want to check if neck of double bottom is over 20% of average daily range if conditions are met return True. Plz help bool DT (){...
New article Graphical Interfaces VII: the Tables Controls (Chapter 1) has been published: The seventh part of the series on MetaTrader graphical interfaces deals with three table types: text label, edit box and rendered one. Another important and frequently used controls are tabs allowing you to...
  ZigZag broken (1)
Hello everyone! I would take 3 points of the Zig Zag and breakage have a signal. This is my code but unfortunately it does not work .... a little help, please? //--- indicator settings#property indicator_chart_window#property indicator_buffers 2#property indicator_type1 DRAW_ARROW#property...
 Hi all, may i know is it possible to key in the input as array style?  In my ea, i wrote like orange highlighted as below:  extern double array[];  but i get the error message:  'array' - objects and arrays are not allowed as inputs.   Need advice. thanks in advance.
  iCustom Question (12   1 2)
I have an indicator which compares several values. I which to bring those values into my EA. So far, what I've found, of the use of iCustom function is; calling the name of the indicator and comparing two different time periods of the same MA. How would I use iCustom to compare two different...
Hello, I'm looking for simple breakout indicator that will look for the current day highest, lowest points and the breakdown/signal occurs when closed candle is above/below previously highest, lowest values from the same day. Thank you in advance for help. Regards 
Hello, I am running an EA on the daily chart and I need to find out whether or not the current price is above or below the last H1 high or low (depending on whether the entry will be long or short) in order to make the decision whether or not to enter.  However using iHigh(NULL,PERIOD_H1,1) or...
i  gut  i try  to develop a script  for  do a trade  , this  script  create  some  button  for open   a trade  with one  click can open also 10  trade  short or long and  close  it  when arrive  at  profit 0.01 ,  i have created  also another  button for disable  taget profit , the name of  button...
Hello,  I'm trying to loop over a 2 dimentional array but I get "invalid array access" when trying to access the second array? Am I doing it wrong?   This is my code. The highlighted code gives the error.   Any idea?   Thanks!    void ComputePPRZ(CProjection* &clusters[][], CProjection* &prz[])...
I have written an indicator to calculate your lot size and maximum lot size based of percent of account you are risking and stoploss distance.    It works most of the time on most pairs. But, every so often I get an insufficient funds error even though I am using the calculated lot size based on...
I am on OSX 10.11.5, can anyone please confirm if this is a MQL4 bug? on OSX? it always return 130error. On OSX the MQL4 compiler did not used native objective-C, it might be using Wine? is that the reason i always keep getting 130 error while using OrderSend method? void OnTick() {  string symbol...
How to open 3-4 strategies(EA) in 1 currency pair and 1 trade account? Does anyone have  an idea on opening  4 strategies(EA)  for 1 currency pair simultaneously ? Here's is my code for opening peding order     if(OrdersTotal() == 0)                {                //Open buy Order...
bool NuovaCandela()  {   static datetime TempoUltimaCandela;   datetime TempoCandelaAttuale=Time[0];   if(TempoCandelaAttuale!=TempoUltimaCandela)     {      TempoUltimaCandela = TempoCandelaAttuale;      return (true);        }else{      return (false);     }  }int trendMediemmobili()  {    double...
Hi I have following code int init(){   //---- indicators   SetIndexBuffer(0,M1);   SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1,clrBlue);   return(0);}//--------------------------------------------------------inside the start function--------------//int counter = 0;while(FileIsEnding(Handle)==false)  //...
New article Tips for an Effective Product Presentation on the Market has been published at mql5.com: Selling programs to traders effectively does not only require writing an efficient and useful product and then publishing it on the Market. It is vital to provide a comprehensive, detailed...
Hello everyone, I have modified the Fractal channel indicator by entering the ZigZag indicator, however, I would like to create a obliguo channel but the result is not as expected, you could give me some help? Thank you #property indicator_chart_window#property indicator_buffers 2#property...
hellow, i want to county losses trades untli one of them will not Get TakeProfit. if order gets takeprofit order count must set to 0. i tried but my code dosn't work.   //+------------------------------------------------------------------+ int TotalOrderCount(int MagicNumber) {    int count = 0;...
Hello!  I would like to know how to get every last Bid price of EURUSD, GBPUSD and EURGBP on EURUSD chart. For now I have:  double EU1 = MarketInfo("EURUSD",MODE_BID);double GU1 = MarketInfo("GBPUSD",MODE_BID);double EG1 = MarketInfo("EURGBP",MODE_BID);   but I think this is faster: double EU1 =...
Hi there... So, I developed a very good EA (IMHO), comprised of 5 algos, back tested it for 14 years (using tickstory, even though my algos are not day-trading), run it on a live account for the last year... I like the results. Anyway, I'm finding some investors and will need to open a joint account...
//+------------------------------------------------------------------+ //|                                                        trade.mq4 | //|                      Copyright © 2004, MetaQuotes Software Corp. | //|                                       http://www.metaquotes.net/ |...
New article LifeHack for Traders: Indicators of Balance, Drawdown, Load and Ticks during Testing has been published: How to make the testing process more visual? The answer is simple: you need to use one or more indicators in the Strategy Tester, including a tick indicator, an indicator of balance...
New article Universal Expert Advisor: Integration with Standard MetaTrader Modules of Signals (Part 7) has been published: This part of the article describes the possibilities of the CStrategy engine integration with the signal modules included into the standard library in MetaTrader. The article...
I understand absolute drawdown.  But Maximum and Relative are not clear? If they are the same does that mean there was only one drawdown?
Hi I have got a problem in my code, so I cut and change part of it for my question; I need to get the last index of open buy or sell orders that already numbered in its comment. but when the same orders become more than 1, it doesn't return (return -1) its index, it seems break doesn't work and...
Hi All,   I amlooking for someone who can tutor me MQL4 either via online or in person. I amvery keen to pay  an hourly rate for yourtime.   About me: I have some very basic understanding of MQL4 from reading a book on it and doing an online course I have built a couple of basic systems...