Forum

How to stop the EA?

Hello, I need your help. What I want from the EA is that as the Margins arrive to a specific bottom it will stop adding new trades and stop executing. How to do it, Please

Awaking the EA

Hello freinds, I have an EA that sometimes id going to "sleep". I mean that although the conditions are fit to open a trade, it doesn't open it. What I do is to reinstalle the EA and then it opens the trades. Any idea how to overcome this sleeping? Thanks

Ordersend error

Hello freinds, Here is a part of my code: OrderSendResult = OrderSend(SymbolArray[i],OP_BUY,UseLots,MarketInfo(SymbolA,MODE_ASK),Slippage,0,0,"Adding to a long pos",MagicNumber,Blue); if (OrderSendResult <= 0) Print("OrderSend ",SymbolArray[i]," failed with error #",GetLastError());

Brokers MARGINS

Hello friends, Something interesting: Normally, if you open a trade like BUY 1.0 GBPUSD your free margin decrease with 1000, and then if you open a new trade like 1.0 BUY EURUSD your free margin decrease with more 1100 (f.e.) . Some brokers (like Alpari) if you open a new LONG trade like BUY 1.0

the RETURN operator

Hello friends, I want to share with you my thoughts: I can see different way of using the RETURN operator: I understand bool/double/int/string functions that returns a value. BUT why void function uses RETURN or RETURN(0)? What it the diffidence? Thanks

dealing with ODD or double numbers

Hello freinds, I need your help. I want the EA to check an operation every two minutes. The simple way is to do: if ( TimeMinute(TimeCurrent()) != 2 && TimeMinute(TimeCurrent()) != 4 && TimeMinute(TimeCurrent()) != 6 && TimeMinute(TimeCurrent()) != 8 && TimeMinute(TimeCurrent()) != 10 &&

Strange Problem with OrderCommission() function

Hello freinds, I set ProfitB = rderProfit()+OrderCommission(); The value of the parameter "ProfitB" is seen on the screen. The problem is sometimes that the value of "ProfitB" is seen (and computed) without the Commission value. Any idea, please? Thanks

An error call: Cannot call 'stdlib.ex4::ErrorDescription', library is not allowed

Hello freinds, I do not know but I as the EA try to close simultanisly 2 trades, it close the first, but the second I get the following error: Cannot call 'stdlib.ex4::ErrorDescription', library is not allowed. BTW, I do not know what is going on. I downloaded MQL4 and I get MQL5. As I can't know

a BOOL veriable

Hello freinds, We say that: Boolean constants may have the value of true or false, numeric representation of them is 1 or 0, respectively. True or TRUE, False or FALSE can be used, as well. Examples: bool a = true; bool b = false; bool c = 1; Its internal representation is a long 4-byte integer

Backtest with MT4

Hello friends, I want to share with you a problem that I have with MT4: As I do a BACKTEST to an EA, It goes very very slowly. I want to add that this EA has 3,700 code lines... I do the backtest without a visual view. Is somebody can tell me how I can make it faster. Thank you all, Y