Is it possible to default the "All History" setting in the "Account history" tab of the terminal?

 

Hi,

I use the OrderHistoryTotal() function in my scripts to output my trade data into a CSV file, but it appears that only recent trade data is processed unless I click the "All History" button in the "Account History" tab. I need the cumulative trade data in my CSV file, and I don't like having this to click this button each time. Is it possibly to programmatically override this, or just default MT4 to "All History." I would prefer a solution that doesn't involve me having to click "All History" before running my script. Thanks! Needless to say, it's obvious why the OrderHistoryTotal() function only loops over recent trades, but there should be a way to override this setting, and loop through all cumulative trade data without having to use the GUI.

 

WINAPI PostMessageA(hWnd, WM_COMMAND, 33058, 0);

 

and to get that command to work you will probably need to put as your fist line

#include <WinUser32.mqh>

 
Ickyrus:

and to get that command to work you will probably need to put as your fist line

#include <WinUser32.mqh>


more than that

#import "user32.dll"
int GetAncestor(int hWnd, int gaFlags);

#import

Reason: