And you can't use HistoryDealSelect() for new deals after run the script.
version:5.00 build 298
Is there anyone could answer?
- www.mql5.com
So, is there any function like "All history" in Mql5?
Use
HistorySelect(0,TimeCurrent());
THere is still a bug in HistorySelect:
If you cycle programmatically over all History orders in OnTrade, you mostly get a new history order once a position has been open
but not every time and this is a bug or not ? I mean open a position should be reflected by a history order..=
The code:
OnTrade
{
HistorySelect( last_select_offset ,TimeCurrent());
for(uint i=0;i< HistoryOrdersTotal() ;i++)
{
// ...do record history order
}
// new offset time
last_select_offset= last_select_offset
}
So the code above should detect ALL history orders since script has been attached but sometimes new history orders missing.
Please MQL5 time, have a look on it. Thank you.
- www.mql5.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Run the script:
then you do some deals, and "History" tab can't refresh automatically after run the script.