MQL4 and MetaTrader 4 - page 344

These 2 EA's execution speeds are very different, I take it due to the fact that in first one there is the declaration at top and in the second one there is only the declaration inside the OnTick() function. Is this all there's to it
I just found out about op_buy_limit and op_buy_stop. In my current understanding op_buy_limit and op_buy_stop fall under pending order, but it is listed as position that I have when I iterated OrdersTotal(). So this make me confuse about mechanic behind it. If I want to find out, just opened
Hi I'm a complete beginner on MQL4 but using what ive learnt so far, i've built an EA which puts a strategy ive developed into practice. However, after figuring out how to only trade once per bar, I realised that the trade only opens at the beginning of the candle eg. at 10:00 rather than when my
Hello all First I am sharing a code I wrote to format currency amounts with commas. Secondly I could not find this anywhere in the documentation but I'd like to simplify it. string sCurrency(string sIn){ bool bNegative=((double)sIn<0?true:false); if(bNegative){sIn=DoubleToString(MathAbs((double)sIn)...
Hi everyone, I'm not able to change separator when I create csv files, COMMA is always used as separator; I used the following: int Handle = FileOpen("fileName", FILE_CSV|FILE_WRITE, ); // CSV created with COMMA separatorint Handle = FileOpen("fileName"
I think it's just posible to make it by using OrderComment or so, but no idea about how to do it. This code close orders partially till exhausted: if(Bid>OrderOpenPrice()+(OrderTakeProfit()-Breakeven)*(PartialClose2/100)){
I'm looking to place an order once the stochastic %K is below 20, the slow ma is over the fast ma, then check for an additional condition for the stochastic. If this occurs I want the for loop to look back "i." number of barsback to see if an additional condition occurs within that range. Can
[Deleted]
Hi, I m using MetaTrader4 Administrator to send reports to my clients. However, i couldn't send reports to "Gmail" accounts. It gives an errror message. Is there any way to send reports to "Gmail" account. How should fill in the "smtpservername" for "Gmail" account. Thanks in advance, Balaji G
Hi, I am learning to code. Wrote this EA to call an indicator. It works fine. But, in 'Print' on a down trend, iCustom_1 returns an EMPTY_VALUE and on an up trend, iCustom_2 returns an EMPTY_VALUE. Could someone tell me what I've done wrong. Thank you for the advice in advance. Harvey_Trading
do you guys have the adx indicator to show on the chart as the value of the adx ? just as a number i mean ,on the chart ..without having the adx open below the chart
Hi, I'M not very skilled in MQL4, and havig problems with the lot size in my EA, where souldn't be to orders open with the same Lot Size at the same time. I made a For loop that finds if there's an open order with the same Lot Size as the intended one, and if its true, adds 0.01 to the lot size, but
This seems like a small problem and maybe it is but I've been struggling with it for a while and have finally given it. My ea opens 2 orders on buy and sell signals. First OrderBuy1 with sl and tp, the OrderBuy2 with only sl. OrderBuy 1 can close with tp and sl but OrderBuy 2 is supposed to be
Please help. Thanks! double BandU[]; double BandL[]; for (int i=1;i<5;i++) { BandU[i] = iBands(NULL,0,20,2,0,PRICE_CLOSE,MODE_UPPER,i); BandL[i] = iBands(NULL,0,20,2,0,PRICE_CLOSE,MODE_LOWER,i); } I want to caculate
Hello, I am a forex trader now. I've read in some forums currently that forex trading is completely illegal for Indian residents as per RBI guidelines and it may cause to jail. I want to know that how to overcome this problem. Can anybody provide any legal solution on it? Thank you.
//+------------------------------------------------------------------+ //| Change.mq4 | //| Copyright 2019, MetaQuotes Software Corp. | //| https://www.mql5.com |
//+------------------------------------------------------------------+ //| Let Profits Run EA (Buy Only) v3.20 //+------------------------------------------------------------------+ #property copyright "Aladdin Abdulkareem" #property link "" extern int MagicNumeber; extern double GridStep
I'm new to MQL. I'm trying to get the SMA of the ATR value. Is this supposed to work? int lookback = 1000; for(int i=lookback-1;i>=0;i--) atr[i] = iATR(NULL, 0, 10, i); for(int a=lookback-1;a>=0;a--) ma[a]=iMAOnArray(atr,lookback,20,0,MODE_SMA,a); Print("atr= "+DoubleToStr(atr[1], _Digits)+"
  Well working Trading System !  (756   1 2 3 4 5 ... 75 76)
Hello Guy´s, I,ve been trading now near 4 years and live good from this job, but ever search a better strategy, system, expert or signal provider... Now i have found one realy very good guy who sells his indicators and system. look at www.tradecurrency.ca The trading system means not that it
I am still using the old way of coding as below: int LimitOfCandle = 500; //The number of candle from the left to start the function of the indicator int Counted_bars=IndicatorCounted(); // Number of counted bars int
Hey guys, In this picture i have a 9 simple moving average in Red. I drew the blue line by hand. I want to to have something like the blue line.i mean how to change the algorithm of for example this moving average to gives me the blue line. I mean when market moves down, the line be below the price
Hi, I have recently started learning coding and can't seem to figure the right way to call the functionlisted below (the code below is not completed). Using this code, the function at the bottom lists no errors. However, when calling it in the OnTick block, many many errors start coming up. Ideally
Could someone fix the ALERTS on this indi please? It repeats itself and locks up my terminal. TKS
I can not remember where i found this,but it's a nice trend indicator to add to my current setup. _SECTION_BEGIN("Higher Highs and Lower Lows");//_________________________________________________________// if Blue makes lowest low at prices on top - enter short// if Red makes lowest low at price at
I see this time difference of 6.924 seconds between the trade tab and expert tab of a sell stop order (don't mind the hour change because that is difference in server time) My question: Is the time in the trade tab ->The time when the request from my EA was "sent" or maybe i shall say "processed" by...
  Experiments ...  (850   1 2 3 4 5 ... 84 85)
Thus thread will be used to post some experiments
Hello all, I was puzzled why the indicator below did not update on the M1 time frame - the error message was 'zero divide'. However the print statement showed the variable 'volume' to have a positive value. I then watched the M5 time frame which updated perfectly as did all the other time frames
I'm testing a EA on a DEMO Account and on REAL Account at the same time (2 sessions of MT4 running over different accounts, same machine, same EA) and results are quite differents... Can anybody tell me why? Regards,
Hi, Someone who understands the programming and structure of the MT4 platform itself may be able to answer the following: I am considering renting a cloud supercomputer with the idea of running various Optimization BackTests in MT4 much faster than on a local PC. My concern is that even with the
TheRumpledOne is now coding FREE indicators for MT4 I am having a blast!!
Hi This mql4 code read the txt file string but as lower case not as upper case as it is saved in the file. Any idea where is the problem and how to get it to read the text as is? Thanks // string file contents// USD s wint filehandle=FileOpen(filename, FILE_READ | FILE_ANSI | FILE_COMMON, 0);