Errors, bugs, questions - page 1755

 

Forum on trading, automated trading systems and trading strategy testing

Bugs, bugs, questions

fxsaber, 2016.08.03 22:16

HistoryOrderGetInteger(OrderTicket, ORDER_TIME_DONE_MSC ) - returns zero in tester!

Please correct it.
 

Orders are placed faster than the ping.

 
I have encountered situations where
HistorySelect(0, TimeCurrent())

Creates an incomplete history table. I only encountered this on the first call after accessing the account. Subsequent ones, the entire history is given.

I can't reproduce it. Now it works, now it doesn't. Check, please.

 
fxsaber:

Orders are placed faster than the ping.

Pings are rarely recalculated.
 
fxsaber:
Faced with situations where
HistorySelect(0, TimeCurrent())

Creates an incomplete history table. I only encountered this on the first call after accessing the account. Subsequent ones, the entire history is given.

I can't reproduce it. Now it works, now it doesn't. Check, please.

Never make TimeCurrent() as an end date, make it TimeCurrent() +86400 to ensure that you capture all of the final trades.

TimeCurrent is not the exact last time, but the "last known server time during updates", which is not 100% accurate. Especially at the start.

 
Renat Fatkhullin:

Never make TimeCurrent() as an end date, make TimeCurrent()+86400 to ensure all end transactions are captured.

TimeCurrent is not the exact last time, but the "last known server time during updates", which is not 100% accurate. Especially at the start.

Thanks, that's what I'll do. But it's definitely not about the bug.

Logged in to accounts where trades were made a very long time ago. So long ago, that the History tab is empty (I have to make a request for the full history with my mouse).

And here with them HistorySelect sometimes returned zero, sometimes the value is less by one than the next runs. All in all, there's definitely a problem there.

 
Renat Fatkhullin:

Never make TimeCurrent() as an end date, make TimeCurrent()+86400 to ensure all end transactions are captured.

TimeCurrent is not the exact last time, but the "last known server time during updates", which is not 100% accurate. Especially at the start.

is +60 not enough?
 

Looked at SB and there is NO HistorySelect and HistoryOrderGetTicket! Not at all!

How will it work?

//+------------------------------------------------------------------+
//| Select a deal on the index                                       |
//+------------------------------------------------------------------+
bool CDealInfo::SelectByIndex(const int index)
  {
   ulong ticket=HistoryDealGetTicket(index);
   if(ticket==0)
      return(false);
   Ticket(ticket);
//---
   return(true);
  }
//+------------------------------------------------------------------+

I'm becoming more and more convinced that SB is fraught with limitations (there's no partial implementation either).

Why wasn't it possible to use great MQL4-order language system for SB from the beginning?

 
fxsaber:

Looked at SB and there is NO HistorySelect and HistoryOrderGetTicket! Not at all!

How will it work?

//+------------------------------------------------------------------+
//| Select a deal on the index                                       |
//+------------------------------------------------------------------+
bool CDealInfo::SelectByIndex(const int index)
  {
   ulong ticket=HistoryDealGetTicket(index);
   if(ticket==0)
      return(false);
   Ticket(ticket);
//---
   return(true);
  }
//+------------------------------------------------------------------+

I'm getting more and more convinced that it's fraught with limitations (there's no partial implementation either).

Why not use the wonderful MQL4-order language system for SB from the very beginning?

Ignorance does not absolve you from responsibility.

The CDealInfo class is designed to facilitate access to the properties of deals. But to access trades, everyone always first requests a trace of history via HistorySelect.

You'd better look through more examples and read articles before writing outright nerdy questions and drawing conclusions.

 
Vladimir Karputov:

Ignorance does not absolve you of responsibility.

The CDealInfo class is for easy access to deal properties. But to access trades, everyone always first requests a history snapshot via HistorySelect.

You'd be better off looking at more examples and reading more articles before you write blatantly nubile questions and draw conclusions.

I would answer you in your own style, but voicing your thoughts about a moderator can easily get you banned.

If there are restrictions in SB, you can and should talk about it.