MQL4 and MetaTrader 4 - page 511

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 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...
  Release MT4 1562  (7)
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?
  Gone is the Bookkeeper  (102   1 2 3 4 5 ... 10 11)
Message from Helen Friends. I refuse to believe this. I regret to inform you that our mutual acquaintance and my good friend Yusefovich Andrey Georgievich has passed away yesterday at 7:00 am after a long and serious illness. Message received today, from his acquaintance. Andrei! I will miss you
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, 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
Hi, For various reasons instead of writing many stand alone EA's and running each in its own terminal, I have instead opted to run those same strategies  in a single EA that cycles through them as a series of function calls. I may have got carried away.  I now have 36 such functions, each of which...
I would like to trade the INR :(
Hello friends, Is it possible to write a code to  limit a number of accounts to using EAs / Indicator ? Or may we set limit for specific account id to use ? Regards, Cuong 
Hi Is there anyway to modify the "terminal" desktop MT4 version to make the winning trades show in blue and the loser ones show in red like it appears in the mobile version. as in the attached image they only show in (-/+) I will be very grateful for any help Thanks