Forum

How can I get my EA to recognize my manual actions?

Im logging trade times using OrderOpenTime() and OrderCloseTime(), which helps me keep track of my trades. However, at times, I need to manually close a trade that has been opened by my EA. But whenever I close a trade manually, the EA does not record the OrderCloseTime(). How can i get my EA to

Limit number of trades between 2 points

I know how to limit the number of trades in a candle. However, what I am trying to do is limit the number of trades between 2 points based on price levels. I define a price level as an input, which serves as my buy price.... If my buy price level for EURUSD is 1.1150, I enter a buy order once the

Stoploss wont move with each candle...help

Hopefully someone can help me out of this. In the following code opening a long position if the current price is higher than the previous candle's High. Then I set a profit target, and a stop loss. The profit target is static, so that works fine, but the stop loss is variable. I have set it to look

EA wont work at MA levels.

extern double LotSize = 1 ; extern double StopLoss = 0 ; extern double TakeProfit = 0 ; extern double MALength = 5 ; extern double TrailingLimit = 0 ; extern double TrailingStep = 0 ; extern int MagicNumber = 1 ; extern double Buffer = 3 ; //============= Global Variables int LongTicket; int

Counting Trade volume in MT4

Hi..Ive looked around in MQL documentaiton to see if there is something that could help me count my trade volume in each candle, but couldnt find anything. The only function i found was Volume[0], which calculates the total volume for the bar, which is not what I want. Is there any function, or any