How to see the last balance change

 

Hello guys

I want to check the last balance value when it was deposited or withdrawed. How can I get this data from History

 
Narek Kamalyan :

Hello guys

I want to check the last balance value when it was deposited or withdrawed. How can I get this data from History

You have to query the trade history and find the most recent 'DEAL_TYPE_BALANCE' operation.

 
Thanks Vladimir
As I can see DEAL_TYPE_BALANCE' shows the last deposit/withdrawal amount, but not the final balance after. So in the reverse loop once it founds any balance, I will add it to the next iteration balance (means previous balance in the history list, not only balance type), so I will get the final balance after deposit or withdraw. 
I am right?
 
Narek Kamalyan :
Thanks Vladimir
As I can see  DEAL_TYPE_BALANCE ' shows the last deposit/withdrawal amount, but not the final balance after. So in the reverse loop once it founds any balance, I will add it to the next iteration balance (means previous balance in the history list, not only balance type), so I will get the final balance after deposit or withdraw. 
I am right?

You are wrong. You always depend on the initial deposit - as a rule, it is not always possible to find out the initial deposit (only indirectly).

 
Vladimir Karputov:

You are wrong.

What I want, is to calculate the drawdown of the account. If I calculate it based on initial deposit it is good until you don’t deposit. 
You might have large loss with calculated drawdown let’s say -50%, but once you deposit again your drawdown will become 0% or even positive while you lost. 
This is why I want to calculate drawdown from last balance change. Once deposited or withdrawn it will be reseted  and drawdown will show gain/loss since then. 
What you think. 
 
Narek Kamalyan :
What I want, is to calculate the drawdown of the account. If I calculate it based on initial deposit it is good until you don’t deposit. 
You might have large loss with calculated drawdown let’s say -50%, but once you deposit again your drawdown will become 0% or even positive while you lost. 
This is why I want to calculate drawdown from last balance change. Once deposited or withdrawn it will be reseted  and drawdown will show gain/loss since then. 
What you think. 

I have already indicated above - you can try to determine the balance by indirect methods. But you will always take risks and there is no guarantee that your calculations will be correct.

 
Vladimir Karputov:

I have already indicated above

I understand what you mean.
What risks do you mean? I mean what can prevent to have correct calculations?
 
Narek Kamalyan :
I understand what you mean.
What risks do you mean? I mean what can prevent to have correct calculations?

For example, not all of the story.

 
Vladimir Karputov:

For example, not all of the story.

You mean the full history may not be available in the terminal?
 
Narek Kamalyan:
You mean the full history may not be available in the terminal?

Yes

 
Vladimir Karputov:

Yes

Is there any workaround or just hope for the best )))
Reason: