Download MetaTrader 5

MQL4 and MetaTrader 4 - page 87

To post a new topic, please log in or register
Hi, I try below code for Week Open Price on Indicator. I have not any error code but below code does not shows me correct time. if(TimeDayOfWeek(Time[i]) != TimeDayOfWeek(Time[i+1])) Any help would be better. Best, Max 
Is there a way of knowing when a specific marketplace subscription expires?  I cannot seem to find a way of knowing the date.
My EA execute two ordersend. If I run EA in Debug mod step to step all is Ok. If I trie to run may EA in normal mode this stop on the second ordersend. If I run it in Debug mode via F5 my EA stop on that second order send. Someone can hel me? tanks. Fabio Crippa
this is my ea my own strategy backtesting 99% modelling quality ,100$ to 140 million $ in 6 years      as you can see the ea did catch that last jump even on demo account and made a lot out of it     GBP/USD 2016/10/07
Hi, The signals are looking good. However, I was wondering if there's a way that I can program an EA to add additional protection to my account. For instance, if the signal provider decides to open up like 20 trades at once, I would like my EA to prevent that from happening. Basically, this will be...
Can you please give me sample code of OBJ_BUTTON because MQL documentation SUCKS. MQL documentation show long example of bloated code. There's example code that show many user defined function that not related to OBJ_BUTTON. I want documentation to be clean and short as much as possible to...
Hi, I'm studying how to implement EA with MQL4 to trade Forex with Meta Tader 4. My broker is ActivTrades. I could not understand very well how to use the OrderSend function. EA will need to send market orders with Stop Loss and Take Profit. Stop Loss, Take Profit and Volume will be in the double...
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!