작업 종료됨
![](https://c.mql5.com/i/avatar/avatar_na2.png)
명시
I need some help with the code logic above, the EA uses the ASK and BID prices to determine if to take a trade compared with the EMA High fro Long trades and EMA Low for Short trades. The EA sometimes initiates Long trades from a Bearish candle and sometimes initiates Short trades from a Bullish Candle.
What I need is to add a filter such that
If the ASK > than the EMAHigh and the Current price is greater than the CLOSE of the Previous Candle && (((canTradeImmediately) && (buyGap >= dAsk)) || (New_Bar() == true))) then the rest of the logic ..... for Long trades
if the BID < than the EMALow and the current Price is Lower than the Close of the Previous Candle && (((canTradeImmediately) && (sellGap <= dBid)) || (New_Bar() == true))) the the rest of the logic .....for Short trades
}