MQL4 and MetaTrader 4 - page 191

To post a new topic, please log in or register
Hi, I'm a newcomer to programming and MQL4, and I was wondering if some could help me with a piece of code? I've looked everywhere and the book/articles/google don't help me. I may have stumbled across the answer but because the code is so complex, and not relating to comparing arrays, I'm having...
Hi in my EA MT5 there are differents indicators and everyone can to be false or true. There are two CCI. Every CCI have setup for line buy and setup for line sell. If CCI line cross linebuy... buy If CCI line cross linesell... sell Is correct this ? :  if(cci(InpCCIPeriod2)>CCI2LineValueBuy &&...
I'd appreciate if someone could help me. Instead of using market orders with the stop loss and take profit internally coded in my EA, I want to try with pending orders with the stop loss and take profit embedded in them. The thing is that the OrderSend() function draws an arrow when the order is...
  PLEASE HELP! (5)
I hope this will be easy question for some of you as I'm only a newbie with Forex.  I don't know why this occurred.  It may be because I attempted to debug a script file.  A few weeks ago I was debugging with MetaEditor (Build 1526), ... 1 - I "Compiled" the code.  Generated...
  HELP (1)
Ciao vorrei sapere se parli italiano e se puoi consigliarmi. Ho un pc portatile acquistato 2 anni fa con win.10 - ho una mt4 swissquote con vari indicatori e vari template salvati. Quando apro l'applicazione va tutto lentissimo, il pc si rallenta. Prima che io inserissi i vari indicatori e prima che...
Hi friends, I'd like to know how can I get the total number of indicator buffers I've used in my indicator. thanking in advance,
Is it possible to hide all the trade's related lines in 1 chart only? the show trade levels options impacts all charts. thanks.
I'm reading from a text file, inputting the data into a string array, and outputting one of the lines from the string array into a message box. I believe it's not due to using a string array because I created one separately, tried it out, and the new line character was read perfectly. Therefore, I...
How do I set up a live MT4 account to run alongside my demo MT4 account on one Windows 10 computer for my IG account?
Hi, i am totally new to forex and metatrader. I started to read a material about trading today and got stuck at one point with mt5. Obiviously i created a demo account using AMPGlobalClearing-Demo-CQG server. All went good, account created. I just want to check out the trade process (buy/sell) but i...
So, we start it. Because some people follow the trading signals and read articles. But I know that some people like to produce the signals and provide with recommendations and some people want to listen it and follow sometimes. As to me personnaly so I followed the trading signals during the 3 weeks...
Hello, I have a little problem with superimposed color rectangles. Only when these objects are overlapped area becomes black, how can I solve? // 1° RectangleObjectCreate("Zon1",OBJ_RECTANGLE,0,Time[0],price1,iTime(0,TF,index1),iHigh(0,TF,index1));ObjectSet   ("Zon1",OBJPROP_COLOR,Brown); // 2°...
Hi Below is my attempt at a trailing stop. Need help making it smarter and more reliable. I would like it to break even after 5 pips profit and thereafter trail by 5 pips. Please help. //+------------------------------------------------------------------+//| Expert trail stop order...
Hello Every one , I am not good MQL4 , Please help me .I want to open this order   : double Maxlot         = 100;  // double Lot              =  AccountBalance/10,000 ;    /// CASE 1 : example my balance = 900,000 USD , then Lot = 900,000/10,000 = 90 If (  Lot < Maxlot  )  ===> Sendorder () with...
I'm using NormalizeDouble() to round a number to the 5th decimal place but the problem is that it keeps all the zeroes at the end. For example: 1.2345600000. How can I trim the number to 5 decimal places, getting rid of the zeroes?
Im getting the following errors : 2017.04.06 14:48:37.843 TestGenerator: unmatched data error (volume limit 5704 at 2017.03.31 16:00 exceeded) 2017.04.06 14:48:37.843 TestGenerator: unmatched data error (low value 1.06736 at 2017.03.31 15:00 is not reached from the least timeframe, low price 1.06782...
  installing MT4 problem (32   1 2 3 4)
I am installing the Alpari MT4, and the program is installed, but when I try to run the program (click to MT4), the screen becomes transparent, and get a message saying that "MetaTrader stopped working". I tried disabling antivirus and firewall (NOD32), installing it in and out of program files,...
MT4 works at reconnecting when connection fails, only if its utilizing *the same device* to reconnect. Sometimes fails to reconnect automatically even if its the same device. We still have to manually reconnect, which is not viable for me. I live in a place where the connection  is really unstable....
Hi, I am trying to vreate an EA. 1 of the things the EA ust do, Is to close an order when the 3 over 5 EMA conditions are met on the open of a new candle. When I try this in the strategy tester, i looks fine, but on a live account it doesn't work.  Maybe it is a slippage issue? Or is the code wrong?...
I have a weird problem... Testing a EA, runs fine produces a backtest.  But the second time I run a backtest with the EA (or any EA for that matter), MT4 immediately hangs and I have to kill it.  It doesn't matter if I try to run with different parameters, a different EA, or if just hit "Start"...
Hi Peoples - please can anyone help - I had MT4 (32 bit) running OK on my machine - I had to install the x64 version - I deleted the x32, purged and restarted the device and then installed the x64 direct from the MT website the install procures all charts with "Waiting for Updates" -I have tried...
hello at all, it is possible to replace the ilow () function or iCLose () with a string? I tried so but does not work: extern string CloseHigh ="iLow"; // Switch iLow or iCloseCloseHigh(0,0,1)); //iLow(0,0,1)); or iClose(0,0,1));
Good day Guys, can any one help me fix this problem? I'm trying to build a Grid Line Indicator and its saying Array is out of Range. Here is the source Code : #property strict#property indicator_chart_window#property indicator_buffers 1#property indicator_color1 clrWhiteextern double   RSMAX=2...
  datetime to Epoch?? (11   1 2)
hi everyone   do you know some way to convert a date '09.09.2014 18:32:47'  or the current time and date to Epoch???   thanks for help   yhoyo     
Hi there everyone I am a total newbie to trading and coding, I tried coding a simple EA to test a strategy I had in mind but the code is not being compiled. The first error(s) which I think are the main problem   is as follows:"  ' iMA ' - constant expected " which repeats for the three instances I...
  eas doesnt work (11   1 2)
Hii friends, Why many eas doesnt work on my pc? a lot warnings or error looks. Thanks
Hi, I have been trading for some years now and would like to learn coding my own Expert Advisors using my trading strategies. I have completed a MQL4 course for beginners which was good, but I want to / need to learn more before I can code by myself. I don't have any previous experience in C or C++...
Hi! I copied a list. When the trader open a postion with size 0.02 my metratrader copy the position with size 0.01. Why my MT4 dont copy the original size?? I'm using a VPS with the MT4. I attach my configuration. Thanks
Dear All, I had my metatrader system and default profile crash unsavedwhen my laptop crashed after over heating. I've reopened metatrader and my defaultprofile is loaded but the alarms have all been lost. Any new alarms that I sethave the conditions and counters and limits are all grayed out except...
Hi at all! MT4, I was doing a good backtesting optimization of a EA. I found a good combination of input values, it was giving good results, but he was not finished and I left my computer to work. I do not know if it finished the backtesting, but I found my computer restarts. Please, does anyone...