Forum

EMA+MACD

Hello guys... I want to put an EMA inside the MACD indicator . Can anyone help me

INVALID REQUEST

The order is positioned with takeprofit and stoploss. But when the price hits both take and stop, it's executed but the message appears in the image below in the diary. I'm testing on demo account. if (latest_price.last > maCerto && (highCerto - maCerto) == Pontos && LastBar != ThisBar &&

Price to return to moving average

I'm studying MQL. I developed this code below. I'm looking for the following condition: If a trader hits StopLoss, I want EA to expect the price to return in the moving average, but I do not know how to do this in the code. Anyone can help me

Loop for

What's wrong with this? EA crasches in this section. int WinCount; int LossCount; for ( int Count = OrdersHistoryTotal ()- 1 ; ; Count--) { OrderSelect (Count, SELECT_BY_POS , MODE_HISTORY ); if ( OrderSymbol () == Symbol () && OrderMagicNumber () == MagicNumber) { if ( OrderProfit () >

Only buy orders

I do not know why just opening the purchase orders. Can someone help me? //+------------------------------------------------------------------+ //| OneShot.mq4 | //| Tarcísio Allyson | //|