Discussion of article "Step-by-Step Guide to Writing an Expert Advisor in MQL5 for Beginners" - page 14

 

Hello Mr Olowoyo

 

 

 Thanks you very much for your extremelly interesting article about the way to build and EA.

It is simples for beginners and really helpful 

I am really new in the coding of EA but I realize it is extremelly necessary to test different strategies.

I have downloaded  you EA and try to compile it but I get immediately 50 errors ...

In the previous comments I did not see such problems reported by the users ...

Please find enclosed a extract of the error table.

I will appreciate very to receive some help 

 

Jean Philippe 

Files:
 

Good day to all.

Can you tell me how to adapt MT5 Expert Advisor for trading on the stock section of mmvb?

None of the Expert Advisors works...

 
Dadayance:

Good day to all.

Can you tell me how to adapt MT5 Expert Advisor for trading on the stock section of mmvb?

None of the Expert Advisors works...

Most likely, it's all in:

Forum on trading, automated trading systems and testing trading strategies

Incomplete information FOK application

Karputov Vladimir, 2015.10.06 09:10

If you have built an Expert Advisor with the help of wizard, try to add this code:

//+------------------------------------------------------------------+
//| Initialisation function of the expert |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- Initializing expert
   if(!ExtExpert.Init(Symbol(),Period(),Expert_EveryTick,Expert_MagicNumber))
     {
      //--- failed
      printf(__FUNCTION__+": error initializing expert");
      ExtExpert.Deinit();
      return(INIT_FAILED);
     }
//---
   CExpertTrade *MyTrade=new CExpertTrade;
      if(MyTrade==NULL)
     {
      //--- failed
      printf(__FUNCTION__+": error creating MyTrade");
     }
   MyTrade.SetTypeFilling(ORDER_FILLING_RETURN);
   ExtExpert.InitTrade(1,MyTrade);
//--- Creating signal
   CExpertSignal *signal=new CExpertSignal;
   if(signal==NULL)

 
Karputov Vladimir:

That's probably it:


Thanks Vladimir, I'll try it on Monday
 

Hi Samuel.

your guide was awesome and really cleared the air.

but I have some problems in calling other indicators in my EA.

can you tell me how add MACD and VIDyA signals in my EA? I need to calculate the Signal and Main amount of MACD for example but don't know how to call them in my EA. That would be a great help if you tell me how to do that :)

 you are awesome 

 

Good afternoon!

Again

My_First_EA (EURUSD,H1) 2016.03.01 07:00:00 Alert: Request to set Sell order failed - error code:4756.

ZeroMemory(mrequest) added before mrequest.action = TRADE_ACTION_DEAL;

In the code also

MqlRates mrate[]; // Will contain prices, volumes and spread for each bar

ZeroMemory(mrequest);

/*

Set indexing in arrays of quotes and indicators

as in time series

*/

// quotes array

ArraySetAsSeries(mrate,true);

Please, tell me how to fix it!

Upd.

mrequest.type_filling = ORDER_FILLING_IOC;

mrequest.type_time = ORDER_TIME_DAY;

Thanks, Karputov Vladimir2016.02.26 06:10!

https://www.mql5.com/ru/forum/15020#comment_1950544

Неполные сведения FOK заявки
Неполные сведения FOK заявки
  • www.mql5.com
Другие функции OrderOpen, PositionOpen с параметром тип ордера ORDER_TYPE_BUY_LIMIT тоже не получается. - - Категория: биржевой трейдинг
 
The trades shown on the above part of the price chart in my testing are the same, but the balance/funds chart is strikingly different. )) I just don't understand, why the hell would you put fake charts in such articles, depicting profitability? This is an example! No one will complain if the example gives a stable loss, but why mislead people?! I spent a lot of time trying to figure out what I'm doing wrong, why my balance chart is different. I apologise, of course, for being a bit naive in expecting a chart like the one in the picture. Maybe everyone here kind of knows that it's done for "beauty", but I didn't know.
 
AsketSD:

After some difficulties, the tester worked completely and produced results that coincide with the stated results in the article.

How can this be: the same code, the same input data, and the result is different? ))

I don't understand. I don't get anything similar to the given balance graph.

 

Hello everyone


I have worked my way through the EA codes and now wanted to test it in the strategy tester according to the instructions and it also starts. But it does not enter a trade. It states as an error that the order cannot be sent. Then I downloaded the original EA and the same in green. Already during the compilation there is a warning at the "ordersend" line.


What is the reason for this? Do you know the problem?


LG

Opticus

 
Which maintenance - which error messages in the Journal tab?