Expert Advisors and Automated Trading - page 122

To post a new topic, please log in or register
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
The SYMBOL_BID and SYMBOL_ASK are always returning zero. Did I something wrong? #include <Trade\Trade.mqh>#include <Trade\SymbolInfo.mqh>#include <Trade\AccountInfo.mqh>CTrade trade;CSymbolInfo symbolInfo;CAccountInfo accInfo;int OnInit(){   if(!symbolInfo...
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 guys in MT4 I used to have a very helpful script where it would detach my charts so I could use them on my multiple screens. is there anything like that for MT5? thank you
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...
Im debating doing it. What it would take to maintain a version in both codes. If it would be time better spent to remain strictly on just one version. Opinions?
Hi everyone Can anyone post a piece of code for adding multiple positions (ie one sell and one buy) without closing the previous one(s) Thanks in advance Dada
Hi, guys, first ever post. I've been coding with the mql4 language for a few years now :) but my latest EA is worrying me. So far it is showing profit in a demo, but It starts over 200 trades per week! Clearly slight changes in the spread value will have a massive inpact on the outcome of profit....
Hi I would like to know whether it is possible to suspend/ cancel a signal programmatically. This is a very important function that should be included as the signal keeps opening trades even after you close its current positions. the only way is to suspend or to cancel the subscription before you...