Hi Guys, as the topic states, HistoryDealGetInteger, doesnt give me a proper time when using the DEAL_TIME enum
I get a value like 1578062560.
Could anyone advise what im doing wrong?
Im without Internet so I cant copy paste my code in the right format using android, apologies for that
Regards
datetime from = TimeToString(0,TIME_DATE);
HistorySelect (from, TimeCurrent());
int Deals=HistoryDealsTotal();
int LastDealTime=HistoryDealGetInteger(Deals,DEAL_TIME);
- Getting Started - MetaTrader 5 for Android
- How to copy deals of successful traders in MetaTrader 5
- Trading Principles - Trade - MetaTrader 5 for Android
Arno van Niekerk:
Hi Guys, as the topic states, HistoryDealGetInteger, doesnt give me a proper time when using the DEAL_TIME enum
Hi Guys, as the topic states, HistoryDealGetInteger, doesnt give me a proper time when using the DEAL_TIME enum
I get a value like 1578062560.
Could anyone advise what im doing wrong?
Im without Internet so I cant copy paste my code in the right format using android, apologies for that
Regards
datetime from = TimeToString(0,TIME_DATE);
HistorySelect
(from, TimeCurrent());
int Deals=HistoryDealsTotal();
int LastDealTime=HistoryDealGetInteger(Deals,DEAL_TIME);
Please use the code button.
That time is an integer of the number of (seconds?) that have passed since 1970.
Use a datetime typecast to get the value as a date.
Like so:
datetime from = TimeToString(0,TIME_DATE); HistorySelect (from, TimeCurrent()); int Deals=HistoryDealsTotal(); //*** int LastDealTime=(datetime)HistoryDealGetInteger(Deals,DEAL_TIME);
Nelson Wanyama:
Thank you for the reply, but adding the datetime typecast doesnt do anything, is there another way?
Please use the code button.
That time is an integer of the number of (seconds?) that have passed since 1970.
Use a datetime typecast to get the value as a date.
Like so:
datetime LastDealTime=HistoryDealGetInteger(Deals,DEAL_TIME)This did the trick tho! thanks for the help mate.
Arno van Niekerk:
This did the trick tho! thanks for the help mate.
This did the trick tho! thanks for the help mate.
You are welcome.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register