Forum

trade.OpenOrder is not working

Hi all, This code is supposed to open an order when the 200 EMA crosses the 800 EMA, but it isn't working. Any thoughts? It's the first time I've used trade.OpenOrder so it could easily be a dumb mistake. if (IsNewBar) { if (valEMA_200_15M[ 2 ] > valEMA_800_15M[ 2 ]) {

EA - Array out of range

Hi all, The below code compiles fine, but comes up with " Array out of range " when implemented in the strategy tester. I've had a look through but I can't figure out why this is happeneing. #include <Trade\Trade.mqh> CTrade trade; //--Input Parameters input int EA_Magic = 123 ; //--Bollinger Band

Bollinger bands based on EMA - custom indicator

Hi all, Can't seem to get this custom indicator to work. When I try to load it on MT5 nothing comes up at all. I've built some EAs but never made a custom indicator, honestly it could be something really basic that's wrong with my code. If anybody has any tips, I'd really appreciate it. Thanks

EA won't place trades - "failed market sell" "invalid request"

My EA won't place any trades when I backtest it, just comes up with "failed market sell 0.03 GBPUSDme sl:1.40524 tp:1.40024 [invalid request]. Not sure why, it should open a buy trade when the 1H 50 EMA is above the 1H 200 EMA, the 15M 50 EMA is above the 15M 200 EMA, when there is a bullish

error: not all control paths return a value - not sure what to do

Hi all, I've attached the EA that I'm coding. It keeps coming up with "not all control paths return a value" - I''m not sure how to resolve the issue. Any help would be appreciated. Thanks

New EA won't place trades

Hi all, I'm completely new to developing EAs so hopefully theres a simple solution to this problem that I just can't see due to my inexperience. The EA should open a position if there is a new candle on the 5 mins timeframe, if the trend on both the 15 mins and 1 hour timeframes (based on a