Expert Advisors and Automated Trading - page 259

My backtest had a single losing trade of 207.86, but it says the average loss trade was 11,132.32 and the gross loss was the same (11,132.32).  How can the average by greater than the maximum? MT5 Build 1940
[Deleted]
Hello All, I have been struggling to create a MQL5 function to return the equity change for a position based on it's SL set. I have something that seems to almost work but the exchange rate conversion to account currency does not work, and in another instance I am two decimal places too much to the...
I converted my code from MT4 to MT5. I just discovered that something was not working like it was supposed to do... I put a lot of stuff in my magic number, when I parse the order, I validate if the magic is fitting with my current executioner. This code was working on MT4, on MT5 it return false
Running through strategy tester I have the following snippet of code which returns 0 into ticket. The journal shows: 2014.05.06 19:16:48.519 2014.01.22 01:42:00 failed market sell 0.01 EURUSD sl: 1.35770 tp: 1.35570 [Unsupported filling mode] 2014.05.06 19:16:48.519 2014.01.22...
Can anybody help me with this? I have an EA that tested well in Strategy tester and when I take it to the Demo Trading the Graph results look like several trades should have hit there Profit target before hitting the stop loss. The stop loss is 2 pips on a 1 minute chart. I look at the charts of the...
  OnTimer problem  (6)
Hi guys. I wanted to test the timer (OnTimer) and I did a very simple script. int tempo;int OnInit(){   EventSetMillisecondTimer(1);   Print("0: GetTickCount: " + GetTickCount() + " GetMicrosecondCount: " + GetMicrosecondCount());      return(INIT_SUCCEEDED);}void OnDeinit(const int reason){...
Which approaches do you use to handle data synchronization problems of a symbol in the terminal with the data on the trading server? 1. Exclude EA from the graph (radical)? 2. Do activate the Sleep function for a certain time? 3. Do you use another approach? Thanks a lot!
How is possible to read messages from alert window (last message)? Not from log file because the log file is not updated immediately .... I see only logs from hours ago....
Hi, I am trying to subscribe to a signal but I can not connect to mql5 community, I enter my user and password but nothing happens, and the "signals" tab is not in the terminal window as it is in the video turorials? I am using an Apple MacBook Pro. Can somebody help me? Thank you.
I use playonmac on imac to run MT4 but when i try to downloud any indicator from MQL5 THE browser cant connect to MT4!!! please help
Hi everybody, I've read the MQL5 documentation about FileOpen function and in the examples it's always specified a relative path (starting from c:\Program Files\MetaTrader 5 Terminal\Tester\Agent-127.0.0.1-3000\MQL5\Files\ folder). Do you know if it is possible to specify an absolute file path and...
Hi  i m newbie on EA development  ok ; fo pending orders my broker allow  expiration duration    after 250 min in minimum; On my EA i want to set the pending order if wasn't executed in next 20min it will be removed ;    how can i do that  thank you
Hi everyone, Please, I need someone to show me how to configure this indicator so that I can receive alerts on my mobile. Anyone willing to help should check the attached file
I don't know why but when I use file function of MT4 and MT5 with FILE_COMMON|FILE_TXT, the string conversion is broken like 㜳㔵〹㐵唺䑓偊㩙⸰㄰〰〰〰〺㍀.(the original string is 37559054:USDJPY:0.01000000:0@) When I use FILE_WRITE on MT5 and use FILE_READ on MT4, there was no problem. However, When I...
Hello all, I'm facing a strange error. The optimization is usually some passes successfully and then it starts returning only zero trade results, as follows: Scrolling down, all of the bellow tests return also 0. After the successful passes, I could see on the Journal that the errors are happening...
Hi all, Thank you for looking at this thread. I've got an EA which trades a variety of strategies simultaneously on the same chart. My question is this, is there a way that I could distinguish between live trades from different strategies from a single EA? The problem I'm having is say strategy 1...
Hi. Guys I am a newbie on MT5. I bought one indicator. I have a question.  I want to trade automatically through indicator i bought. How do i have to for making a trading bot(EA)? Thanks. 
I have an trading strategy which when a set up is seen produces an alarm in form of beep from an alarm ea and on experts tab shows on which TF and which pair and whether to go long or short? Can an EA be made based on the alarm read on the experts tab of mt4 platform? regards Balaji
double H_LastOrderOpenPrice(int Type)  {   double price=0; ulong ticket =0;   HistorySelect(0,TimeCurrent()+1);   int orders=HistoryDealsTotal()-1;   for(int i=orders;i>=0;i--)     {      ticket = HistoryDealGetTicket(i);      if(ticket>0 && HistoryDealGetInteger(ticket,DEAL_TYPE)==Type &&...
Hi everyone, I am currently working on automating MetaTrader 4 via Docker. I'm quite satisfied, almost with what I've achieved so far. Starting instance, automatically logging in and running it with multiple Expert Advisors already works smoothly. It is also able to start a backtest for a single...
Hello developer's. I really want someone who able to developed my Renko EA. That EA have some awesome logic to place trade also have good exit logic there. Not a single indicator use under this EA. If anyone have awesome knowledge in Renko then most welcome for my upcoming project . Also you not
Metatrader 5 succeeds at loading tick data but not bar data. Source is FXCM historical data. I can't load more then ~7000 bars into the 'Import Bars' menu without it failing, no error message either, then when i click 'OK' it fails to keep any of the data. :( Same with tick data, i can load it into...
Hello all, I didn't see a SEARCH function on this particular forum, so please forgive me as this is probably something very trivial to the rest of you. I am literally hours old into coding for EA's and have thus far pieced together a SMA EA that gives me the ability to tell me to "BUY" or "SELL" in...
I can not get my strategy tester terminal to test a new EA strategy ever since the previous one went to zero dollars but somehow it got stuck and now all the Journal says is ( The robot is still working, waiting for some funds to appear...) Does anybody have any suggestions one what I should do. I...
Today when I withdrew some balance to another account I notices all the open trades were partially closed (via signal provider ). These were trades with a 0.21 lotsize and then they were closed with a 0.08 lotsize and what remained was 0.13 lots of that trade. Is this normal behaviour for a hedging
Please help with the following: I installed the last Windows 10 update yesterday and my MT4 from IG Spain, stopped working. This is a real account platform. Other platforms with demo accounts from IC Markets and Oanda, also stopped working after the update. When I try to reinstall mt4 from IG...
hello everybody, I want to use signal indicator in my EA, this indicator uses arrow in top or bottom of price for trend recognition, Please help me in using iCustom function in MQL4 for usisng this indicator. the indicator is attached.
I use Standard Library Generic Data Collection CSortedMap. To getthe values out of the object I like to use CopyTo with an array ofCKeyValuePair. //+------------------------------------------------------------------+//| Script                                             tryCopyTo.mq5...
Hi, I am looking for a answer regarding free signal. Say I published a free signal. is there any benefit like increase profile rating point? Thanks
I want to get the info for a symbol using: what is wrong with my code? it prints: 7.0 but it must print : price of the last deal which is: 3588 ENUM_SYMBOL_INFO_DOUBLE symbInfoDouble;SymbolInfoDouble(Symbol(),symbInfoDouble);double last=(symbInfoDouble.SYMBOL_LAST);Print (last);