Download MetaTrader 5

MQL4 and MetaTrader 4 - page 45

To post a new topic, please log in or register
  Market condition and EAs (38   1 2 3 4)
Started this thread for general review about every EA I am testing (trending, breakout, MTF and so on) concerning recent market condition. And about possible improvements and so on. I already have few ideas and many be the members will join as well so we can keep this thread as 'the thread for all...
I cant see why the object "margin" is returning 0.0 and not 0.5 like it should? void OnTick(){   double margin = (5 / 10);   Print("margin = ",margin);}
I am looking for the default option which is available for an indicator in MT4 so when I change the inputs to my perferred settings on that indicator I can then save those inputs as a default so any other templates I load I can then add the indicator with my preferred settings.
Hello, I'm just learning MQL4 and working on a some exercises and had a few very basic questions.  In the following lines of code, what are the 0's referencing.   if(iOpen(NULL,0,1)<iClose(NULL,0,1)) int BarOneUp=1;  if(iOpen(NULL,0,2)>iClose(NULL,0,2)) int BarOneDown=1; What code would I use, to...
Hi at all! MT4, becktesting on EURUSD H1, period: 2016.11.01 - 2016.11.30 BUT, my question is: how can good test a EA with many (8/9) inputs consider that every input has many data input ???? Thanks so much at all for your help!
Dear Forex Buddies, I tried to make some MT4 indicators on my own but it is a failure. Hence, I would like to seek for your assistance. MACD xOver Short:=Input("MACD Short MA",1,100,12); Long:=Input("MACD Long MA",1,200,26); Signal:=Input("MACD Smoothing Period",1,50,9); Time:=Input("MACD Time...
Dear Coders. I have attached the mql4 file for reference. Please help me to insert some code in this file so that it will count the arrows and  while I attach to my mt4 It can display " Total up arrows = " and "Total down arrows =" Thanks
Hi, I am new to programming MQL4, and have been looking at the MQL4 book examples. I am able to OrderSelect successfully, but when I get to the while function the EA freezes. It also says uninitialized variable for Ticket, and Lot. Any ideas? bool res;res = OrderSelect(1, SELECT_BY_TICKET);if(res ==...
Hey guys, Could someone please help  How do i go about changing the time on the MT4 platform i'm new to the platform. My location is Brisbane but the platform is giving me GMT. Thanks 
Friends please help //+------------------------------------------------------------------+//| ExportFunctions.mq4 |//| Copyright ?2005, MetaQuotes Software Corp. |//| http://www.metaquotes.net/ |//+------------------------------------------------------------------+#property copyright "Copyright...
Hi, ive tested the my EA on my current broker Vipromarkets and it test okay with no errors. But, when I send it in for automatic validation I get ordersend error 131 and a zero divide error. After looking into the problem this type of error is associated with lot volume. The part of code from my EA...
Hi Guys Request to mod an indicator, its come from TSD forum I think maybe need a start time,I want the start time is  23:00 Best Regards.
Hi, Is there any Bollinger Bands alert tool which pops up on screen alert when either upper or lower band gets pierced AND at the same time candle's CLOSURE gets formed above (if green candle and breaking out upper BB) or below (if red candle and breaking out lower BB) the band? I saw this one: <<...
With the new MT4 build 1065 I can't save the template when I try to save it into a sub folder of the templates folder that I've previously created. The script worked perfectly until the new version. The code fragment is the following string tipoOp;    if (lineCheck == 5 && prezzoMedio < ordOpen &&...
Hi, I just realised a new feature I would have never expected: The EURGBP position is shown on the EURCHF chart. But now - after a couple of minutes - its gone and can only be seen on EURGBP. Could be an interesting idea: all position on one chart that way? BTW it is still b1031 the one that...
Hey. I have a problem. I configured anonymous IPVANISH SOCKS5 proxy (it tests OK and it works), but when I created a small expert advisor to test my ip     char result_char[]; string result_headers;   char data_char[];   int res2=WebRequest("GET","https://api.ipify.org/?format=json",NULL,NULL,5000...
Hello fellow traders, I am developing an ea that opens a lot of orders but only open buy order if their is a buy order opened already what i want is the next order to open it has to be  at price above the last opened price if that makes sense. and vice versa for sell that's a code i tried but it...
I've loaded this new version. The compiler does not generate objects ! It is a disaster
Hello, please, help me, how can I display profit of Each pair by Comment function. Thank you for your help... Comment(     "-------------------------\n"     "  CHART INFO\n"      "-------------------------\n"     "Symbol:       " + ChartSymbol()+ "\n"     "Timeframe:   " + DoubleToStr(ChartPeriod(),...
I use H1 chart.. My chart scroll left almost infinitely (back to several years) however, I want to show it smaller period (i.e. only 6 months)... how to do that?
i wrote this code and i would like to know if it will work or not. Thank you very much . //Dashboard Symbols   count=count+1;   if(count==1)     {      i="EURUSD";     }   if(count==2)     {      i="GBPUSD";     }   if(count==3)     {      i="USDJPY";     }   if(count==4)     {      i="USDCHF";...
If expert is using 2 different timeframes (like in indicator calls): Do I need 2 charts with those 2 different timeframes open? (So data gets pumped in history) Or just the 1 chart is enough (smallest timeframe) and MT figures the bigger period from the smaller one?
Hello, I'm developing EA with SimplePanel. I stuck with it's objective model which seems to be broken. There is CCheckBox class. I have created some checkboxes but figured out that i can't change label properties (font size), there is no public or even protected interface to access label object....
Hi... I am developing an Expert for Binary Options it is openig orders for BO normally... But when i try to do Backtests, stops when an order is created... see :      Below the code for creating an order with expiration in 5 minutes:  orderNumber = OrderSend(Symbol(), OP_SELL, 1.00, Bid, 0, 0, 0,...
Hi every one asyou know backtest  in MT4 (strategy tester ) do testing in each symbolssecretly and if i want to use the EA in real time in multiple symbols that may causesome problems in the available margin  usuallyI solve this problem by divide the lots in testing by number of symbols i amgoing to...
  EA stacksize (3)
So there is a preproccessor called stacksize, the documentation says: MQL4 programstacksize. The stack of sufficient size is necessary when executing function recursive calls. When launching a script or an Expert Advisor on the chart, the stack of at least 8 MB is allocated. In case of indicators,...
Hi, I'm trying to figure out how to make a loop count length of bars in pips over multiple bars, But I've never used loops and i don't know how. I tried it bunch of times and felt stupid so the code I have is not in a loop form. What I have is this:    double h=High[BarsBack];    double...
Hello Fellow Traders, It's have been a week since i started learning how to program MQL4  And i Have A problem , The EA I am working on opens a lot of orders and i want all these orders to be closed at the touch of the ma let's say i have opened 7 buy orders above 21 MA and i want to close them if...
Hello, I am looking for a Renko indicator what will send a push notification out when the bar color changes. IE after a retracement. I have been looking all over the net and found this one attached but it only sends emails. I am trying to learn how to convert the email notification to a push...
Hello, I have an array with struct members. The struct is also including strings. struct test{string a; int b;};test arr[5];//now I filled the complete array with data....arr[0].a = "active";arr[0].b = 555;arr[1].a = ...//...and so on.. In the end, is it possible now to remove arr[3]? Thank you