Equity and balance graph - page 5

 
alexx_v писал (а) >>

Yes, it would be very good to have a look, and not only that, they are very useful indicators at work

especially since I don't really use any other ones right now.

Supported by

 

I see I've really been lost around here. I just arrived from the south today. I had a rest - woah, sour cream - woah...)

Well, get to the point. Greetings all.

alexx_v

In testing mode I use the following technique. It is described in detail in the article. In brief, data on the current balance and equity are transferred from the EA to the indicator through global variables. This requires a simple indicator and a couple of lines in your EA's code. I attached an example of an indicator. In the EA, in the start function, the following is written:

if (IsVisualMode())
{
 GlobalVariableSet("Balance",AccountBalance());
 GlobalVariableSet("Equity",AccountEquity());
 GlobalVariableSet("Margin",AccountMargin());
 GlobalVariableSet("Free",AccountFreeMargin());
}

This way you can output any information: % of profitable trades, Mathematical expectation of winning, Average lot or Profit of position in pips.

Files:
 

Thank you, I will try it :)

Igor, what about my request, namely number 2 and especially number 3?


Что хотелось бы получить от индикатора:

1. accurate calculation and display of the total balance and equity on the account; (in principle, the first one can and can do it well)

2. Accurate calculation and display of the balance graph and equity of the current pair (neither 2nd nor 3rd indicator can do it (the 1st one could not do it) - walk for the wood, someone walk for the wood ...)

3. accurate calculation and display of the balance graph and equity ofANY specified pair (no indicator can do this)

4. In fact, item. 2, but to work correctly in the visual testing mode, i.e. to work properly in the tester


I also would like to know, is it possible to overlay indicators on each other, for the scale to coincide? then you would get just an ideal indicator, well, just unreplaceable in the economy :)

 
alexx_v писал (а) >>

What I would like to get from the indicator:

1. Accurate calculation and display on the chart of the total balance and equity of the account; (in principle, the first one can and can do it well)

2. to calculate accurately and display the balance and equity of the current pair on the chart; (neither 2nd nor 3rd Inductor can do it (the first one could not) - walk for logs, burn for wood ...)

3. the precise calculation and displaying of the balance and equity of ANY given pair on the chart (no indicator can do it).

4. essentially point. 2, but to work correctly in the EA visual testing mode, i.e. to work properly in the tester


The ideal: an indicator that performs all items, adjustable for any task :)


Super-ideal: a limit of 8 lines... there will be no super-ideal... :( but...

if you can overlay perfect indicators, we do not care about this limitation :)

As long as they overlap correctly, taking into account the scale...

Can someone do/re-do/correct this for us?

Here you go. All points except the 4th. You can overlap, but you have to specify the same maximum and minimum for scale unity.

The only thing is that in single symbol mode the starting balance and deposit/withdrawal are not taken into account. But that's probably even a good thing.

Files:
equity_v6.mq4  10 kb
 

Thanks, I've got it, I'll be sure to report back :)

Единственное, что в режиме одного символа не учитывается начальный баланс и ввод/вывод средств. Но это, наверно даже хорошо.

Will the indicator display the data correctly in this case...?

 
alexx_v писал (а) >>

Will the indicator then display the data correctly?

In this case, the data is displayed correctly, just the emphasis is on the trades of only one instrument.

Oh, and also, if you overlay several copies in one window, the lines will be signed with the corresponding symbol of the instrument.

 

I don't get it...

in p.1 mode works as version 5 - fine

in mode 2 - graph doesn't update

in mode 3 - similarly, it is not updated

p.2-3 - now there is a calculation of actual values, without depo, etc., a little unusual, but on the other hand...

 
alexx_v писал (а) >>

I don't get it...

in p.1 mode works as version 5 - fine

in mode 2 - graph doesn't update

in mode 3 - similarly, it is not updated

p.2-3 - now there is a calculation of actual values, without the depo, etc., a little unusual, but on the other hand...

It's just that in mode 1 the update goes on the current values of the account status. This I have intentionally disabled, otherwise in 2-3 mode the actual values will spoil the whole picture. Although it will be possible to fix that, I think.

 
Igor, is it possible to make the indicator update in p.2-3 mode? Without updating it is kind of sad
 
alexx_v писал (а) >>
Igor, is it possible to make the indicator update in p.2-3 mode?

Will do. It's just that originally the indicator was only intended to analyse the history of trades. I wonder how you use it in real time? Portfolio trading?