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...
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:
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:
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...
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...
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!!
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...
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.
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...
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?
PS. Apologies for...
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...
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.
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...
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...
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...
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
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?
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...