Forum

Can EA get user input from chart?

I would like to ask can EA get the user input from chart? For example, when user draw a square on the chart, the EA will know the position of the square and knows the first bar time and the last bar time. Thanks

Why buy position always fail while testing

I am using MT5, demo account . I have a EA that will do PositionOpen for buy and sell and I found that all my buy position failed and get requote message. Here is my code for buy and sell position: #include <Trade\Trade.mqh> CTrade g_Trader; ResetLastError (); if (!g_Trader.PositionOpen(

How to place pending order in XAUUSD by EA

Here is the problem, I am making a EA and I wanted to place some pending buy limit order in XAUUSD, and from this window: I found that the price should be step up every 0.05. I would like to ask that how can I get this information in EA? I have tried to use SymbolInfoInteger(Symbol()

Pending stop order, Invalid price, error 4756, retcode=10015, TRADE_RETCODE_INVALID_PRICE

I have a EA which will place buy stop or sell stop . I find that there are some orders cannot be set due to error, TRADE_RETCODE_INVALID_PRICE. Here is the log, from the same EA, one trade is success and the other is not: GH 0 14 : 41 : 30.095 Core 1 2018.09 . 05 06 : 40 : 00