Forum

Read Alert messages from EA

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

Possible to retrieve value of a custom indicator (a specific value inside the indicator)

Hello, I have an indicator in ex4. I wish to programmatically retrieve last value of this variable (level) that is in the indicator: I wish to retrieve #4 and #5 price levels..... Thanks

EA Random and martingale. How to break the sequences of consecutive LOSSES

Hello, I created an EA that basically opens positions (in an alternate way (LONG & SHORT) with a Martingale behaviour. The problem is when, for all crosses in which the EA is applied there is a movement due to for example the increase of USD price). All EA open the last step of martingale and take

How to calculate current profit in pips

Hello to all, I've seen several posts but no one has helped me .... I made an EA that open several orders, I wish to calculate to the whole order with a specific magic number , the algebraic sum of profit or loss in pips . I set a cycle for scanning all orders, and for each one: If buy I calculated

How to check if an order has been closed for stop loss

I'm writing an EA, modifying my EA written for MT4. I open an order using OrderSend. Simply if I need to understand (perhasps from History), if the order sent (by the way.... I have to check Order, Deals or Position?), has been closed because it has reached StopLoss. I checked on forums, but I have

Problem with iMAOnArray function

with MT4, I'm trying to create a custom indicator that, once I placed RSI indicator, put on it also the MA indicator. Manually I add RSI chart indicator, then 1) I drag&drop MA indicator and select Apply to: First indicator's data and then I click OK. 2) Then I reopen in editing this MA and change

How to close an order

Hello, I need to close an open order (not a pending order , an order that is running). I have its Ticket number Thanks