Forum

Modifying MACD to Adaptive MACD

(Mql 5) Hi I was modifying the MACD source code to make an adaptive MACD. The idea was to replace the conventional moving averages with Adaptive Moving Averages. All I did was the following: The Adaptive Moving Averages required 2 more parameters each, so I added two more input variables for

Adjusting the leverage

Hello If a person/EA is trading with a high leverage, a certain maximum amount of lots can be traded. If the person/EA wants to trade with a larger amount of lots, the leverage has to be reduced. Is there any function in Mql5 that I can use to change the current leverage

CTrade Stop Loss trigger

Hi, I have a question about the CTrade library. When I have opened a position with a stop loss , one of two things can happen. 1. A condition is met and the position will be closed with the OrderClose() function. 2. A Stop Loss will be triggered, and the position will be closed

CTrade Stop Loss trigger

Hi, I have a question about the CTrade library. When I have opened a position with a stop loss , one of two things can happen. 1. A condition is met and the position will be closed with the OrderClose() function. 2. A Stop Loss will be triggered, and the position will be closed

How can the maximum volume be calculated?

I have a problem. When I run my EA, it does a couple of trades, and increases the volume each time a new position is opened, until it reaches a point where the volume becomes invalid(Maybe too much). What have I done wrong? Here's the error message: 2010.06.11 15:00:20 failed instant sell 1.22877K

SELL gone through as a BUY order

I have a problem: When I run this "SELL" trade request in the strategy tester, the journal reports it as a BUY order, and because of that the stop loss and take profits are swapped, resulting an [Invalid Stops] error. MqlTick price; MqlTradeRequest sellrequest; MqlTradeResult sellresult;