ROBOT WITH M1

 

Hello I have a robot in MT4 which works fine with all time frames, except M1, no outputs, no trades, why is that ??

 
thierryjean:

Hello I have a robot in MT4 which works fine with all time frames, except M1, no outputs, no trades, why is that ??

It really would depend on the algorithm you wrote for the robot. If any parameters are smaller than the time-frame of one minute this can happen. It really depends on the code used to execute the trades.

 

thank you

mainly I use this type of  fonction

double dima1=iMA(NULL,timex,ma1,0,MODE_SMA,PRICE_CLOSE,0);

 
thierryjean:

thank you

mainly I use this type of  fonction

double dima1=iMA(NULL,timex,ma1,0,MODE_SMA,PRICE_CLOSE,0);

Perhaps you have some calculations and checks where you use the parameter dima1. I suggest you to check them. Also make sure that parameter timex has a value 1 when you test the robot on M1 time-frame.
 
thierryjean: I have a robot in MT4 which works fine with all time frames, except M1, no outputs, no trades, why is that ??
  1. Why did you post your MT4 question in the Root / MT5 EA section instead of the MQL4 section, (bottom of the Root page?)
              General rules and best pratices of the Forum. - General - MQL5 programming forum
    Next time post in the correct place. The moderators will likely move this thread there soon.

  2. Do you really expect an answer? We can't see your broken code. There are no mind readers here and our crystal balls are cracked.

  3. Check your return codes for errors, report them and you would know why. Don't just silence the compiler, it is trying to help you.
              What are Function return values ? How do I use them ? - MQL4 and MetaTrader 4 - MQL4 programming forum
              Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles
    Only those functions that return a value (e.g. iClose, MarketInfo, etc.) must you call ResetLastError before in order to check after.

  4. Likely because you are violating limits You can't move stops (or pending prices) closer to the market than the minimum (MODE_STOPLEVEL * _Point.)
              Requirements and Limitations in Making Trades - Appendixes - MQL4&Tutorial