Forum

Martingale code not working.

Hello all! My code works untill there is a loosing position then it does not work any more. Can please you help? #include <Trade/Trade.mqh> CTrade trade; bool isTradeAllowed = true ; double Lots = 0.2 ; double LotFactor = 1.5 ; int aMagic = 100 ; int OnInit () {

If last trade was BUY, next trade should be SELL

Hello! Am working on an EA and I wanted to alternate orders. I have failed to make it possible. I want to check if previous trade was BUY the next trade should be it's opposite and vise versa. Help will be much appreciated folks