Forum

Cannot load expert

Hi there, I am trying to attach an expert that i used to run till couple of weeks ago however I receive in the Experts tab a message: "cannot load C/.....Roaming/MetaQuotes/Terminal/..../MQL4/Experts/Market/Robot.ex4. I have not changed a thing on my MT4 implementation, any idea of what is causing

How to place a sl/ tp at the upper bollinger band

Hi, I am trying to place my SL/TP at the UPPER BOLLINGER BAND. if (Highes_ >BOLLYUpper)TakeProfit =Highes_ if (UseTakeProfit) TakeProfitLevel = TakeProfit ; else TakeProfitLevel = 0.0 ; Ticket = OrderSend ( Symbol (), OP_BUY , Lots, Ask , Slippage, StopLossLevel, TakeProfitLevel, "Buy(#" +

How to wait 20 new bars for checking for a signal

Hi, I have an EA which is based on 3 steps. Once the first 2 steps satisfied i need to wait for the 3rd step to come along. Ideally i would wait 15/20 bars for the 3rd step to show up. The problem that i have is: how do i check for the last 15-20 bars if the 3rd signal has been satisfied? I am using

Chart Symbol different from EA symbol, what are the issues?

Hi, I was wondering what are the issues ,if any when we run an EA based on indicators with specific currencies, let s say "EURUSD" e.g iHigh("EURUSD",PERIOD_D1,1); on a chart that runs a different symbol than the EA's, let s say "GBPUSD" chart. What are the implications of this divergence? Thanks

EA profitable on Daily backtest but not in hourly

Hi, I created a basic EA that makes profit when I run on a Day timeframe but it makes losses on intraday trading. It s based on ATR and MA 20 candle period where both symbol and timeframe are set to NULL. What am I supposed to do to make my EA work on the Hourly trade? How do you make your EA work

ArraySetAsSeries meaning

Hi, What does ArraySetAsSeries? I read the documentation but i have not grasped full its potential. Sometimes buffers in indicators work only when transforming them e.g ArraySetAsSeries(myBuffer,false) What does it do

explanation of Stochastic

Hi, In the Stochastic Indicator that you can find in MT4, there is a recurring if statement pos=InpKPeriod- 1 ; if (pos+ 1 <prev_calculated) pos=prev_calculated- 2 ; which I do not understand. Why does it subtract -2 ? what the point of the code above? This is the onCalculate() function to

My own Stochastics in an EA

Hi, I am trying to recreate the Stochastic so that I can use the crossovers between the main and the Signal line . This should be the formula: %K = (Current Close - Lowest Low)/(Highest High - Lowest Low) * 100 %D = 3-day SMA of %K However the results of my code does not match the indicator

Recreating Stochastic

Hi, I am trying to recreate the Stochastic for fun. This should be the formula: %K = (Current Close - Lowest Low)/(Highest High - Lowest Low) * 100 %D = 3-day SMA of %K However the results of my code does not match the indicator provided by MQL4. can you help me understand where the error is? This