Expert Advisors and Automated Trading - page 315

For MT5, if possible, send me, please. Thanks.
 How many OnTick() call after 1 minute ? 1 Min .eq. ? Tick? [Average]
[Deleted]
Hello, How could I return the average value of x periods from volume indicator ? I tried to use the code below, but it is not working properly also. input ENUM_TIMEFRAMES VOL_TF= PERIOD_M30 ; input ENUM_APPLIED_VOLUME VOL_TYPE= VOLUME_REAL ; double vol_filter() { double volumes = iVolumes (
  Indicator  (3)
I'm returning INIT_FAILED in a indicator OnInit function, but it's created anyway. If a EA tries to load it it get a valid handle and can't identify that's not working properly. I also tried to force an error, but it get loaded anyway. // Option 1int OnInit()  {    return INIT_FAILED;  }// Option...
[Deleted]
Hi all, before, I had a MT4 ea and a friend gave me this easy code if(AccountNumber()!=123456){return(0);} to lock the ea to my account, but now I have a MT5 ea, I tried the code but didn't work, I found this https://www.mql5.com/en/articles/359 but also didn't work. I hope if someone has an easy...
Hello Folks, I would like to ask you some tips for a MQL5 variable (for EA), which must return the amount of seconds elapsed from the beginning of the minute of the specified time. It is essentially what TimeSeconds() is in mql4... could you please help me to define somethign equivalent in MQL5?...
Hello, is there a possibility to scale a chart programmatically? Often the values of my indicator are outside of the visible area of the chart (above or below). It would help a lot if i could set the upper/lower price of the chart area. Thank you in advance.
What is the option for optimized compile in mq4? for example -O2  what is the best way to fast run expert?
How to access account number and broker server address in EA? for example : account number : 15632547 broker address  FXCM-ECN1
Hi, I have an EA which is using a file from dir: MetaQuotes\Terminal\FE0E65DDB0B7B40DE125080872C34D61\MQL5\Files During debuging it is working perfectly, but when it comes to testing, the file had to be placed in: MetaQuotes\Tester\FE0E65DDB0B7B40DE125080872C34D61\Agent-127.0.0.1-3000\MQL5\Files As...
I make a EA to learn how pending operations works. This EA create a buyLimit and a buyStop simultaneous.  When I run the code, both operations are triggered (by log) but the operations tab is pending and the log price values are wrong (the Market price was upper 3150, but the log shows prices around...
Hello Can someone show me how to write 1 line if /else statements? For example I have this  statement with A and B being two variables.   if (A==0) B=0;else B=A+10; How can you make it into 1 line? Thank you
Hi, I wan't to code a custom alert. Alerting me when the prises rise or drops X pips within Y minutes. Then send me an alert on sms or mail or sound in Meta trader. I need some guiding to acomplish this. Any one that has some ideas or input? Br Morten
Hello guys, Could somebody to create an EA in order to delete pending orders at specificied price range by volume ? For example i have 200 sell stops on EURUSD from 1,1800 to 1,17885, 100 of them with 0,01, 50 with 0,02 and 50 with 0,06 volume, so i need for instance to delete 25 pendings with 0,01...
I often get Error 4753 although it does not seem to impact on trade operation or testing. After some research on this forum and wider, I haven't really found any answers that applied to my problem, so I did some experimenting. It seems to me that if PositionSelect(symbol) returns false, it ALSO...
Hello at first i back tested my ea with spread of 3 as it the average of my broker for usdjpy without any errorbut if i tried 0 or 6 or 7 almost half of the trade won't be triggered because of error 138, is there any solution to that, will that affect live or demo trading?
Hello Everybody, I am new here, I decided I would like to create an Expert Advisor. I am busy getting familiar with MQL5 and it is going great! I thought I would start of by creating a simple MA crossover EA, and so far so good. BUT  The problem comes in when I need to open a trade.  I want my EA to...
[Deleted]
Hello, could someone give me a script with hotkey,  for buy,for sell and for close one time? with stop loss in points,slippage in points or in pips. five digit broker. 
Hi guys and girls, I am looking for an EA that does the following: Wait for newsAfter news has come out, assess market direction (buy or sell)Wait for the direction to change (looking at support and resistance)And at the point it detects a change in direction, place a tradeDoes an EA like this...
I have trouble to stating  the initial AccountEquity before any trade opened. Below code is not working because once a trade was opened the initEquity return 0.0 again. double notradeEquity(){   double initEquity    = 0.0;   double nowBalance    = AccountBalance();   double nowEquity     =...
Hi all I can't program to save my life so would like to know if this Ea/indicator is possible before I ask someone to program it me through the Freelance service. A Multi RSI Indicator but taking RSI period 2 taken from the Heikin ashi candle and not the normal candle So it will look something like...
Hi to all. I wanted to know about autotrading robots with minumum lots like 0.10 and i need your help. As i am new here i dont know which robots are best for scalping and with minimum loss thanks I appriciate your advise
Hi, I can't find Correlation(Profit,MFE) , Correlation(Profit,MAE) value in TesterStatistics. How can I calculate the MAE-MFE Correlation? or introduce ready class library for it?
  Tick modelles  (1)
Hi, What is the meanning of tick modelles, Can I take decision using 60% tick modelles ?
hi guys, here is classical code, but OrderGetTicket() always return 0 even if i have a lot of orders OrdersTotal()is ok why ?   uint     total=OrdersTotal();    //--- go through orders in a loop     for(uint i=0;i<total;i++)       {        //--- return order ticket by its position in the list...
hello, now I need operate different period in my EA,  requirement: 1, loop in MT5 periods, like h1,h2,h3...to mn1. 2, print period in loop which working, like PERIOD_H1, PERIOD_H2.... processes like below for (iPeriod=h1, iPeriod <=mn1, iPeriod++)   { analyze iCCI on iPeriod;   //some operations...
Hello ! I'm currently setting off an EA and when i download historical data from metaquote server i figured out that i have to modify the start trading hour from my set files which are set for gmt+2. My question is: When i'm backtesting my EA, on which GMT time the metaquote data are set?? Thank you...
  Free Margin  (1)
Hello. I have a question regarding the AccountFreeMargin() function. Genrally you can open new positions unless the Margin level is >100%, i.e. free margin >0. But many brokers still have a delay between time when the order was sent and time when the order was opened. While the AccountFreeMargin()...
Hey, I'm kinda of new in MQL5. I have a EA that buys one stock first (let's say PETR4) and then buys another one (let's say ABEV3). The  only problem is that I can only order the second one when the first one is executed (not only placed). I used the MqlTradeResult.retcode to get the return number...
Hello everyone: I have a question, How pass arguments of any type to a fuction, for example: string StringConcatenate_MQL5(void arg1, void arg2, void arg3, void arg4){ string result=""; StringConcatenate(result,arg0,arg1,arg2,arg3,arg4); return result; } Call to function: string Vars...