//+------------------------------------------------------------------+//| Script program start function |//+------------------------------------------------------------------+voidOnStart()
{
datetime end = TimeCurrent();
datetime start = end - 60*PeriodSeconds(PERIOD_D1);
if( HistorySelect(0,end))
//--- create objects
{
int total=HistoryDealsTotal();
Comment("deals total=",total,"please");
}
elseComment ("Not working");
}
//+------------------------------------------------------------------+
I use this Script after testing my strategy and it always return 0, no matter how many deals executed.
what did I do wrong?I Please help me. Actually , I did try to write code to export history deals to csv file for many months. So I tried step by step and I've found out that HistoryDealsTotal() is not working.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I use this Script after testing my strategy and it always return 0, no matter how many deals executed.
what did I do wrong?I Please help me. Actually , I did try to write code to export history deals to csv file for many months. So I tried step by step and I've found out that HistoryDealsTotal() is not working.
Thank you so much for anyone who help me