Download MetaTrader 5

Tester: Testing Visualization: Account State Charts

To add comments, please log in or register
We have launched Spanish and Portuguese versions of the website. Try them!
MetaQuotes Software Corp.
Moderator
181422
MetaQuotes Software Corp. 2007.07.27 12:22 

New article Testing Visualization: Account State Charts has been published:

Enjoy the process of testing with charts, displaying the balance - now all the necessary information is always in view!

I think, it is not only my wish to view the information about the account state during testing in the visualization mode in a more informative form.
What was the amount of free margin before opening the last position? Where is the balance curve directed to? How large was the drawdown on equity for the last day?

Some of these questions were discussed in the articles Testing Visualization: Functionality Enhancement and Testing Visualization: Trade History. But they do not contain any tool for quick and easy viewing the information on the account. In this article we will discuss programs for drawing charts of the account state during testing in the visualization mode. As an example we will examine Balance and Equity charts. The article also contains instructions on building charts of other account attributes.

Author: Andrey Khatimlianskii

MQL4 Comments
16319
MQL4 Comments 2007.09.15 16:51  
I think your idea of indicator of equity and balance is very usefull.

But I have 2 problems.

One is I cannot write the indicator with both lines in one window (as you presented at the ned of your article).
Could you paste the code of the indicator of both balance and equity in one window?

The second problem is that the indicators work only when the testing is run in normal mode.
When Itry to run the indicator in the fast mode (using "skip to" function) the indicators are not drawn.
I guess it is possible to solve this problem by implementing the indicator into the expert advisor body.
But I have no idea how to do it.

Maybe you have any idea?


Thank you in advance for your help.
Andrey Khatimlianskii
136
Andrey Khatimlianskii 2007.09.16 23:04  
paszo:
One is I cannot write the indicator with both lines in one window (as you presented at the ned of your article).
Could you paste the code of the indicator of both balance and equity in one window?
Use this code:
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
 
double balance[], equity[];
 
int init()
{
    IndicatorShortName( "vGrafBalance&Equity" );
    IndicatorDigits( 2 );
 
    SetIndexStyle( 0, DRAW_LINE );
    SetIndexBuffer( 0, balance );
    SetIndexLabel( 0, "Balance" );
 
    SetIndexStyle( 1, DRAW_LINE );
    SetIndexBuffer( 1, equity );
    SetIndexLabel( 1, "Equity" );
}
int start()
{
    balance[0] = GlobalVariableGet( "vGrafBalance" );
    equity [0] = GlobalVariableGet( "vGrafEquity"  );
    return(0);
}

paszo:
The second problem is that the indicators work only when the testing is run in normal mode.
When Itry to run the indicator in the fast mode (using "skip to" function) the indicators are not drawn.
I guess it is possible to solve this problem by implementing the indicator into the expert advisor body.
But I have no idea how to do it.

Maybe you have any idea?
Unfortunately, it is impossible to solve this problem.
To add comments, please log in or register