Equity and balance graph

 
I finalised Kim's indicator. Took into account swaps, point value and spread.
Files:
i-baleq2.mq4  7 kb
 
Good indicator, thanks to its creators.
1.You could add a graph of the margin used.
2.Equity is calculated from Close, I think to see the maximum drawdown should be calculated from High and Low.
If they do not know how to use futures, they do not know how to measure futures, but for each brokerage company they should have an indicator, because everything is different.
 

The indicator is not perfect, just working on it now.

1. Yes, it is possible - I will add a graph of collateral and free funds.

2. it will not be quite correct, because reaching high and low on different instruments does not happen simultaneously.

3. For futures I have not checked, but I have solved the problem with CFD by adding bar opening time (a trading session for stocks is several hours - the number of bars is less than in Forex, therefore it is incorrect to determine the price by bar number).

Implemented calculation of swaps, taking into account Wednesday (triple swaps time).

Changed the principle of calculation, I had a problem with the MarketInfo("GOLD",MODE_TICKVALUE) function which stubbornly returned 10. While the point value for 1 lot is $2.5.

I will post a new version soon.

 

New version of the indicator!

Easy to work - no need to specify an initial deposit. It works correctly on Forex and CFD (it does not account for futures). Deposit/withdrawal of funds is fixed and is displayed as a vertical line.

Requirements: deposit currency - dollar, history of traded instruments and history of performed deals, market overview should contain all instruments traded, period no longer than D1, connection to a trade server. The lower TF, the higher accuracy.

PS: Unfortunately, the graph of the margin used so far can not do it correctly:( Certainly there will be a big error, especially on large TF. To calculate the margin for crosses we need a basic quote at the moment of opening, but it cannot be determined accurately. Approximately, it is the open price of a bar (for each TF this figure will be different). Plus to all the "lots", we need to calculate the size of overlapped positions.

I cannot realize it now, and is it really necessary?

Files:
equity_v1.ex4  11 kb
 
Xupypr:

New version of the indicator!

Some strange thing, after putting it on M1 chart the indicator "stops" after some time, I have to periodically initialize it through properties or compilation.
In addition, for my machine is heavy, takes a long time to load, probably eats a lot of resources. Maybe some way to reduce recalculation?
It would be convenient to keep it on my work account all the time, it's informative enough.

P.S.
I've looked, cpu load is 100% only at load time of indicator, during operation, it seems nothing.
 

That's right, that's the way it's designed!

The indicator doesn't "stop" after a while, it just stops working :) Or rather its function is reduced to showing the account history on the chart in the form of equity and balance curves. That's it!

Subsequent ticks are ignored. The indicator simply stops performing any actions. As a script, it works only once.

It is loading for a long time only due to too large history of trades. I will try to optimize the algorithm.

If you want to keep it on your account all the time, this simple "monitoring" will suit you better.

Files:
 
Xupypr:

That's right, that's the way it's designed!


The indicator doesn't "stop" after a while, it just stops working :) Or rather its function is reduced to showing the account history on the chart in the form of equity and balance curves. That's it!


Subsequent ticks are ignored. The indicator simply stops performing any actions. As a script, it works only once.


It is loading for a long time only due to too large history of trades. I will try to optimize the algorithm.


If you want to keep it on your account all the time, this simple "monitoring" will suit you better.


Both the word "monitoring" and the "light" indicator are very appropriate ! Thank you Xupypr, great job.
 

Nice indicators.

What's the problem with futures?

 
OZ0:

What is the problem with futures?

When a futures contract expires, it disappears from the "market overview". If the history is still saved in the history folder, you can't get other necessary information (contract size, spread) using the MarketInfo function. I don't know any other ways to bypass this function. I don't have experience in trading futures, so I haven't tested the indicator in this direction. Maybe you can try it?

I am posting a new version!

Even if there is no required instrument in the "market overview", the indicator will still draw the curves for the entire history, with a warning about missing symbols, of course. Also, it can be left on the chart and it will work in "monitoring" mode on the principle of this indicator - Equity_simple.mq4

I was not able to speed up the indicator significantly:(

P.S. It is not recommended to run the indicator on a lower TF - it may take a long time to load, or simply there may not be all of the history for some instrument.

Files:
equity_v3.ex4  11 kb
 
equity_v3: - one terminal hangs, - the other terminal says "Transaction history is not fully loaded" and shows only current values, does not draw historical equity chart. All pairs are in Market Watch and all D1 charts are open. What may be wrong? (There were trades in futures in the Statements apart from forex, but I don't think the Indices failed to do its job because of that...)
 
And another question: Why do we need equity_simple? All this information seems to be in the standard info line of MT4...
Reason: