Expert Advisors and Automated Trading - page 157

To post a new topic, please log in or register
i am working on ea , but i dont know how to select second last order. actually my ea opened serval orders and i want to average down like if most recent last 2 Orders average profit == Min_Profit then Ordershould close. i am trying to code this from a week but no sucess .i will be thankful to you...
Hi all, I am trying to compile my EA, when I do I receive "Return value of OrderSelect and OrderModify should be checked" errors. Can an expert kindly help me on this, the code is given below: Thank you //+------------------------------------------------------------------+//|...
  What is wrong with my EA ? (21   1 2 3)
Hello All, I have a general template of an EA that I use to test systems. At the moment I am testing a indicator "better volume indicator" and I am trying to use it in my EA. From the Indicator MQL file. I get the buffers: SetIndexBuffer(0,red); SetIndexStyle(0,DRAW_HISTOGRAM,0...
  New Order at same Price (16   1 2)
Hello :) I need your help for a trick in my EA. How to place a BUY STOP at price when there is no BUY STOP at this price and while this level stay activ ? I send buy stop order at level, order was executed and reaches his TP, price fall under the level, how can I send a new buy stop order with...
Dear Team, After writing an .mq4 script, how do I compile the script before attaching it to my MT4 terminal? Please, guide me.
int handle = FileOpen(TickFile,FILE_READ|FILE_CSV,','); if(handle < 1) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp; string strErr = Error(GetLastError()); Print("Cannot open file " + TickFile + ": " + strErr); return(false); } I'm having a problem...
  EA error (2)
"EX4 file must be compiled using #property strict directive.File compiled as Debug"
I´m receiving the following message: "Authorization failed. Please check trading account data." Thank you Daniel
hi friends. many people use low money on fx place.what is your favorite expert? can you share?
Hello, im trying to create a function that locks the EA for different users to use only by their AccountNumber please help something is wrong here.. when im using only one user like here it is working fine and no problem what so ever: bool LockToAccount=true;int...
Hi! I'm using an 4x Quad-Core Xeon computer on my MT5 farm to increase the speed of the strategy tester. The problem is that Strategy Tester just make available 8 cores of the 16. Does anyone could help me making the 16 core available? I apreciate your time!! Ruy Bentes 
Hello, When I running my EA, server ping results becomes high. After I remove the EA, then results become very low (about 5 times, please look at attachments). Is it normal? Or do I implement or set something wrongly? And also in opening order, which latency values are correct? Thanks for your...
  EA Attachment (2)
Hello Team, Please advice me. I attempted adding an EA to Symbol (EURUSD) by dragging it to the Chat Window, and it refused attaching. I also tried other Symbols, and all failed to attach. I have another EA which I bought from MQL5 Market. I tried attaching that EA, but it failed too. I went...
Dear MQL5 users. I am currently experiencing some multiple order execution problem with my EA but only for a specific broker. My EA works perfectly in strategy tester. It also works with other brokers in live trading mode too. With a specific broker, my EA sometime often 10 orders of the same...
Hi, Please could someone confirm it is OK to run multiple charts of different currencies in a single MT4 instance with out risk of trades being rejected because they were executed at the same time. Has this been fixed now or do I need to run multiple instances of MT4? Thanks PS. Apologies for...
[Deleted]
  loop in Optimizer (15   1 2)
Hello does anyone know a way to do an infinite loop with optimizer of MT4/5? Inside the loop, at the end of each optimization, I must be able to set automatically the new parameters optimized into the EA that is running. In each loop I must be able to pass parameters that would always be the same...
Hi! I am new to automatic trading, and I'm not sure if I'm getting it right. I runned optimization for an EA, within two dates. The pass number 23 made 192 trades and got 1203.87€ profit. Then I set the input parameters of pass number 23, runned the test within the same dates, and got 448 trades...
Hello, I want my experts to trade on Hedging mode in the same way as in Netting mode. To do so, the expert must add, reduce, close or reverse a single position. I'm trying to set this by setting the currently open position Ticket to the MqlTradeRequest but it works only on reduction. How to...
Hi, in the MQL4 Reference under  MQL4 Reference/Trade Functions/OrderSelect I found the following two sentences: Consecutive selection of orders using the SELECT_BY_POS parameter returns information in the sequence in which it was received from the trading server. Sorting of the resulting list of...
Hi, i already recreate an EA to what i want but i'm having issues... all error been fix.. but the EA close all pairs orders.. I just want the EA to close on 1 pair which the EA been placed... Could tell me where is the error? extern double Price_Target=0.0; //The Price at which you want to...
[Deleted]
as we knw for MT5, close sell order is by open the new buy order, and close buy order is by open the sell order. but how's in hedging MT5 acc ? yesterday before markets close, for my oneclickpad expert MT5, when i m trying to close the buy order, but it is executing the new sell order.
In MT4, OrderSend() and OrderClose() send instructions to server, the server do the trade instructions and return a response. But, if the server do the trade instructions successfully but the response come back to client lost due to bad network, OrderSend() and OrderClose() should return false. This...
Hello, I wanna open an operation with 2 lots and i wanna sell one lot When the profit is got and after When the second profit is got, i close the position. This code works good with an account without hedge but with hedge i can't close with the opposite action. What do i need? it doesn't work...
hello can you help me i found a good indicatore but get error: 2016.06.24 23:11:29.999 #Momentum onChartSignals Indicator v1.0 EURUSD,H1: zero divide in '#Momentum onChartSignals Indicator v1.0.mq4' (129,46) for mt4 971 your help is much appreciated thank you
Hi, just a question, if i have an EA that i want to sell whats the best way to manage clients on a trial and subscription Thanks in advance
hi everyone i read this article: https://www.mql5.com/en/articles/586 i can test free experts on strategytester but when i want to test market experts on strategytester ,it doesnt work and takes no position and result is empty. what is the problem?
hello coders,i am using an indicator which gives me daily pivot,support & resistance levels I want to have weekly and monthly pivots also,may be in different file
extern double Price_Target=0.0; //The Price at which you want to CLOSE & DELETE all Orders.extern string Profit_Target= "ENTER ABOVE THE PRICE YOU TARGET";extern bool SELL =...
I'm receiving this error in the MT5 tester: ResetLastError(); MqlTick tick; SymbolInfoTick(_Symbol, tick); double orderLots&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = NormalizeEntrySize(lots); double stopLossPrice&nbsp;&nbsp; =...
Hi, I am an absolute beginner on Meta Trader 4 so please forgive me if this is an stupid question. I've subscribed to an signal wich is making trades and working fine. I only have one question about the "volume" indicator because it looks like as if it is trading with verry smal amounts unless...