MQL4 and MetaTrader 4 - page 164

To post a new topic, please log in or register
Hello, I want my EA to be executed on every tick and, if there is no new tick for several seconds, to be executed every xxx ms (for example 500ms). What is the best way to code this in MQL? Thanks in advance!
  Set an alert (1)
Hello, I have a problem and  really hope someone can help me there. I have an indicator but I just have the ex4 file. Actually I ask the guy who did the indicator but he send me the mq4 of the second version of the indicator and I prefer the first one (he erase the first mq4). So, this indicator...
Hello everyone, I have an EA that has 1 button on it (for convenience instead of changing EA settings). That button shows whether EA is ready to send a trade at some conditions, or will ignore those conditions, and I can press it so changing this status. so ea operated partially manually. Everything...
Hi all, I have a quite reliable indicator (not the souce code) that is displaying alerts for buy/sell and buy close / sell close. I would like to write an EA that can use those alerts generated by this indicator to apply buy or sell based on the alert. Can somebody help me ???? Thanks in advance...
I wrote the following script... I expect that when i drop this script in the chart a input window will open to allow me to enter the value at run time - This is not happening. Please assist extern double ovalue1=1.5;//+------------------------------------------------------------------+//| Script...
  Something really weird 2 (15   1 2)
Hi gurus, I have an indicator that uses Symbol() for determining the instrument (there isn't hard coded instrument, just Symbol()). I load the indicator say on EURUSD chart and save it as a template. After I load this template say on USDCHF chart. And here is the surprise: the indicator works based...
Hello, I want mql4 code to set and password to protect my EA from stopping,if someone want to stop the running of EA, i want a windows which want user password. if the password match then it stop work otherwise not. Please help me to give such code
Hi Is it possible to change MT4 user password by coding in an EA? Basically I wanted to force close MT4 if certain percentage of loss for the day occurred. thanks Richo
Hi all, I wanted to create a singleton (OO design pattern) class and wrote the following code. However, I'm getting an unresolved static variable pool error while compiling. Any suggestions how to fix it? class Pool {   private:      static Pool* pool;      Pool (void) {      }      public:...
Hi Guys, i have a Problem with my MT4, i want to show shapes in my toolbar, but i cant take it in the "customize toolbar" window. Can someone help me?    This is not helpfulll for me: http://www.metatrader5.com/en/metaeditor/help/interface/toolbar/toolbar_customize  Thank you  
great scalping expert advisor did+1000% in less then 3 days , this ea is good in normal market conditions but need to be stopped in violent price movements like high impact news    <Deleted>
Hi to everybody, I have created a template in my mt4. This template loads my treading system into the mt4. I want to set a license password or a anti hack container for this template. My purpose is to sell it under license. Can you please help me ? I haven't found a good programmer that would help...
  Bar Index Help (25   1 2 3)
Hello Members,  Need little bit help on coding logic. Here is the details: if Bar creates higher higher, higher low 1st Bar from where it created higher higher, I want to store it index number. Then finally when market no more creates higher higher, I use iLowest() with that index & current index to...
  Gator error (2)
Can someone please tell me why this: void OnStart()  {   double LipsCurrent=iGator(Symbol(),0,13,8,8,5,5,3,MODE_SMMA,PRICE_MEDIAN,MODE_GATORLIPS,4);   double TeethCurrent=iGator(Symbol(),0,13,8,8,5,5,3,MODE_SMMA,PRICE_MEDIAN,MODE_GATORTEETH,4);   double JawsCurrent=iGator(Symbol(),0,13,8,8,5,5,3...
As if the effort to enable auto trading is not enough I am not so comfortable to enable live trading all the time. How can I  make my EA to enable live trading as soon as I enable auto trading? Thank you in advance. I can see something like IsTradeAllowed, but not something like IsTradeEnabled. I...
Hi to you all in the forum, I am now experimenting and studying mql5 for several monthsand despite a lot of research I could not find an example for my problem. The trading idea is that a buy signal occurs if one of twomoving average signals are positive and the RSI has first fallen below 30,...
You might wonder why only pending orders and not open orders. You see, it is easy to add tp and sl to open orders by simply executing alt + drag on the price line, but not on pending orders. Once executed on pending order, it will instead change the open price of the pending orders (what a user...
Please is there a chart event for clicking on a pending order, such as CHARTEVENT_ORDER_CLICK? Thank you.
I run my EA om gmt time settings. but when i do backtest, eatakes local/server time? what could be the issue? Is forward tests will work on GMT time? datetime GMTDay = TimeGMT();    int hour0 = TimeHour(GMTDay);    int minute0 = TimeMinute(GMTDay);    if (DayOfWeek() != Today && hour0 == 1 &&...
Hi, (preliminary comment: absolutely no line of code was changed during the following procedures!!) I wrote in OOP a simple ema based on M1 for which I can define its TF and its paints it ema lines on the chart. Here you see TF of the ema and the chart = 60 (h1): As you can see quite the same :) Red...
by the way i mada this image with photoshop :D :D 
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. 
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:...