Download MetaTrader 5

MQL4 and MetaTrader 4 - page 74

To post a new topic, please log in or register
Is it possible to run 2 indicators in one program?? For example 1 for Main Chart and other one for Subwindow. I want this 2 indicator to share data at the same time. I don't have an idea to do this because of #property indicator_chart_window Can you please give me sample code. 
I was getting messages sent from my MT4 desktop version to my iPhone MT4 app via the push notifications.  Now I can't even see the Messages listed on my Mobile MT4 apps Settings page. They were working just fine for half of the day today, but then they just stopped. Can't find my Metaquotes ID...
Hi all, I'm just starting to code using mql4 and encountered an error stating " object of 'Order' cannot be returned, copy constructor 'Order::Order(const Order &)"  on POrder class. What should I do to fix it? Best,  class Order { private: int ticket; bool isOpened; public:...
Hi, please, could you explain why I am getting different values for SMA on two different MT4 platforms, Windows and Android? Thanks
  Did you see such a picture? (415   1 2 3 4 5 ... 41 42)
We often visit different forums. Several times a day, to be more exact. Sometimes, we see very interesting screenshots of the terminal. Those can be indicators, EAs, objects, etc. It would be a pity if all that treasure were lost, traders should see it! So we propose to upload to this thread...
Hi!   Is it possible to change MT4 settings, such as "Allow DLL" through an MQL4 script, or other script? Which file stores these settings?   Thanks Richard 
  Code help (2)
//+---------------------------------------------------------------------------------------------------+//|                                                                            HLHB Trend-Catcher.mq4 |//|                                                                            Copyright 2016,...
Hello all! I currently have charts on two different profiles on my MT4. I wonder if i will still be able to see my charts when i log in to my similar account on MT4 on another pc/laptop? If not how do i transfer all i have right now over to the other PC and once i have done that, will amendments...
My indicator plots lines in the M1 timeframe, which works fine. However, I like to color all lines starting from today's M1 candles with a different color. Is there a standard function or an easy way to check whether a candle I'm looping over is from today? I'm new to the MQL4 language and trying to...
void CloseAllOrders(int slippage, int magicNumber) {int x;  double trades[][4];  int total=OrdersTotal();  if(total>0)  {  ArrayResize(trades,total);  int count=0;  for(x=total-1;x>=0;x--)     {     if(OrderSelect(x,SELECT_BY_POS,MODE_TRADES))     if(magicNumber ==...
.. this does not work as the ArraySize is zero: //within OnInit() of an indicator:         int i=0;         SetIndexBuffer(i,Buff_A);         SetIndexStyle( i,DRAW_LINE,STYLE_SOLID,1);         SetIndexLabel( i,"EmaFast");         i++;         SetIndexBuffer(i,Buff_Ta1);         SetIndexStyle( i...
How come no record for an event as important as REASON_PROFILE in this table, or is there a way to configure it manually or maybe it exists and I do not know? I have made good use of some of the ones listed. However I still need a Constant for REASON_PROFILE for profile change. Any one with a good...
How to remove/hide the "currency pair name" in the top-left main chart.  I want to only display my indicator in main chart. How can I do that in MQL4? Please don't suggest to change the color of foreground because I want to use other indicator in Sub-window. 
I have a problem with if condition and && operator. This simple code alway give "true" as result, when must give "false". Any idea about the problem? I'm getting crazy.... Thanks in advace double a=3;   double b=5;   bool c=true;   bool d=false;      if ((a<b)&&(c=true)&&(d=true))...
Hello friend, I am not able to modify this EA I would add the risk percentage based on (balance) you can help me? post the code ea : #include <stdlib.mqh> #include <stderror.mqh> #define  NL    "\n" // Regular variables bool    LotIncrease                   = true; bool...
Hi, do I miss something? Hi I enabled in the chart properties "Show Ask-Line" and set the colour of Ask-Line to "White" but it is not shown?
Hi everybody! I really hope you can help me. For more than 2 weeks already my metatrader 4 stand still at September the 21.
Hi everyone, First of all let me tell you that I am pretty new to coding and I read a lot of stuff and spent a lot of time before asking this question... This forum really helps a lot, thanks to all contributors. I have written an EA that is more like a scalper. I say "like" because it's not exactly...
I'm running an EA and MT4 Tester is calculating profit wrong. My account is in MXN pesos. I have a SL of 3,000 ticks and a TP of 10,000 ticks (USD/MXN), tick value is $1 MXN peso. In tester i'm using a spread of 2 (not real, just to vaidate profit results). See examples here and file attached....
Hi Community, I would like to backtest a few eas automaticaly and export the results to a CSV everytime including a few furter fields like EA name, timeframe and so on. Further I would like to add a screenshot of the backtest result. Is this somehow possible? Thanks! -J.
hi guys ..i have some troubles with this block of codes .. int init() {////////////////////////////////////////////////////////////////////////////if(MarketInfo(Symbol(), MODE_DIGITS)==3||MarketInfo(Symbol(), MODE_DIGITS)==5)mypoint=10;else mypoint=1; pte=Point*mypoint;   return...
Hi to all.  First,this is a temporary threads Title name,i needs your valued suggestions for a proper name regarding thread.    As you all knows well,every field of life there are Heroes,national and international,from holy prophets to kings,queens,war heroes,politicians,freedom fighters,scholars of...
I've been toying with a bunch of EAs I've written, and the optimization takes forever.  Is there any option to make the optimizer work on a multi-thread setup, or a third party option?   Thanks! 
  code 100.0 pips (11   1 2)
Hello,   How can I get code for 100.0 pips?   Best, Max 
Hello,   MT4 does not working on Windows 10 build 9926. How can I fix it?   Best, Max 
New article Portfolio trading in MetaTrader 4 has been published: The article reveals the portfolio trading principles and their application to Forex market. A few simple mathematical portfolio arrangement models are considered. The article contains examples of practical implementation of the...
Hey Guys, I have currently two problems. 1. How can I display a name of a horizontal line on the chart? - I tried to create a label and set it with TimePrice to XY to the right position. But there is the problem that it will always be on the same XY... So if I press + or -, the label is somewhere.....
Hi all,    I am trying to find a command/or a systematic way to read into my code the exchange rate of the DEPOSIT CURRENCY to QUOTE CURRENCY (or QUOTE CURRENCY to DEPOSIT CURRENCY whichever is available). I can't find a build in command for this; the closest I could find is 'tick value'  via the...
Hello, I'm newbie, but I'm trying to develop an EA. I would like to open long or short positions on the basis of my signal at determinate price.  in particular: OrderSend with OP_BUY or OP_SELL at price of open current bar. OrderClose at price of close current bar. Thank's  a lot... 
Is there any function to show Positive & Negative Sign for numbers? For example if the result is 5.0 it should display the +5.0 and for negative number -5.0. I tried to use "+ sign" to concatenate but if I use #property strict it gives me warning: implicit conversion from 'number' to 'string'...
1...676869707172737475767778798081...1244