Experts: Opening and Сlosing on time - page 3

 
Vladimir Karputov:
Change the trading server.
Login on MetaQuotes-Demo server.

You don't check/set the filling type in your code. That's why it's not working on FxPro-ECN.

And as you don't check trade operation returned value, it does trade silently. 

 
tigerclaw:

 

I hope you can find what i did wrong here, i really need this to work.

You can give me a login and investor password? I will check the work of the adviser on his PC.

And, Pleasse, Now run this version and show the tester log. Look at the error.

 
Alain Verleyen:

You don't check/set the filling type in your code. That's why it's not working on FxPro-ECN.

And as you don't check trade operation returned value, it does trade silently. 

Looks like you were right: in FxPro-ECN server

2017.01.25 20:52:52.321 Core 1  2017.01.24 13:00:00   Buy -> false. Result Retcode: 10030, description of result: invalid fill


This is some strange broker.

 

Version 1.1002:

   m_trade.SetExpertMagicNumber(m_magic);
//---
   if(IsFillingTypeAllowed(Symbol(),SYMBOL_FILLING_IOC))
      m_trade.SetTypeFilling(ORDER_FILLING_IOC);
//---
   return(INIT_SUCCEEDED);
  }
Now on FxPRO-ECN of the transaction open
 
Vladimir Karputov:

Looks like you were right: in FxPro-ECN server

2017.01.25 20:52:52.321 Core 1  2017.01.24 13:00:00   Buy -> false. Result Retcode: 10030, description of result: invalid fill


This is some strange broker.

Yes it gives me the same error with your new version now

 


 So whats the sulution?

Change brokers? 

 
Vladimir Karputov:

Version 1.1002:

   m_trade.SetExpertMagicNumber(m_magic);
//---
   if(IsFillingTypeAllowed(Symbol(),SYMBOL_FILLING_IOC))
      m_trade.SetTypeFilling(ORDER_FILLING_IOC);
//---
   return(INIT_SUCCEEDED);
  }
Now on FxPRO-ECN of the transaction open
Yes it works now with FxPro-ECN Thank you verry much Vladimir and Alain
 
tigerclaw:
Yes it works now with FxPro-ECN Thank you verry much Vladimir and Alain
Positions are closed correctly (version 1.102)?
 
This feature is the easiest. It's reasonably the best to use, but when it's time, it doesn't close the position. I'm just looking for one that closes the position when it's time.
 
Tried for almost a day with various EA's and couldn't find one that would close the position on a time basis.
 
xinyao shen :
This feature is the easiest. It's reasonably the best to use, but when it's time, it doesn't close the position. I'm just looking for one that closes the position when it's time.

Where is the detailed description and proof?