Forum

OrderModify not working

I have this code below which I am using to test trailing stop function. It works on some currency pairs and doesn't work in others. It's returning error code 0 (zero). I will be grateful if somebody can help me out. //+------------------------------------------------------------------+ //|

Variations in EA and manual entry points

I recently deployed my EA. The EA placed a buy order and I immediately manually clicked buy. I noticed that the entry point of the EA is higher than that of the manual entry. What could be the reason

Trade Operations not allowed by setting

I recently hosted my EA on mql5.com and i opened my terminal this morning and no open trade was running. I clicked on the Experts tab of the terminal and saw messages there " Trade Operations not allowed by setting as shown in the image Is there anything i cab do to correct this? Thanks

Mismatch Error and Trailing Loss

I am a beginner in EA programming and i recently developed an EA <Deleted> but my worry is the mismatched errors it's reporting in some currency pairs , sometines it can be as high as 5,000. Please how do i correct this Secondly, when i run the backtest on different mt4 platforms from different

I want to continously execute a function as long as buy or sell remain true

I am writing an EA that continually execute a function as long as a buy or sell remain true. For example if buy is true, the function will execute and quite. It will check again if buy is still true, if true it will execute again. It will continue the cycle until buy is false. I tried implementing

OrderModify not working

I am using this code to test my order modify function but is not working and it is returning false. Please what could be the problem. I am still learning. Thanks for your kind help. //+------------------------------------------------------------------+ //|

How to Track Trades closed by Stop Loss or Take Profit

Hi everyone, I am a beginner in Mql4 programming. I am creating an EA that can track trades closed by Stop loss or Take profit and use that information to further process the EA for the current trade session. I am thinking of doing this by tracking changes in account balance using AccountBalance()

Track Trades Closed by Take Profit or Stop Loss

Hi everyone, I am a beginner in Mql4 programming. I am creating an EA that can track closed trades based on Stop loss or Take profit and use that information to further process the EA for the current trade session. I am thinking of doing this noting the AccountBalance() at the beginning of the

OrderModify Only Modifies Buy Trades

for ( int i= 0 ; i< OrdersTotal (); i++) { OrderSelect (i,SELECT_BY_TICKET,MODE_TRADES); //Alert("Order Ticket = ", OrderTicket(), " Order Open Price= ", OrderOpenPrice()); ticket=OrderTicket(); pricelevel=OrderOpenPrice(); OrderModify(ticket,pricelevel, NormalizeDouble (Bid- Point * 500 , Digits )

How to calculate the total profit of a particular symbol in EA

Please how do i calculate the total profit or loss of a particular symbol in EA, that is in a situation i have so many sell and buy in the symbol and i want to know if both sell and buy if calculated together in the symbol are in profit or loss