Equity ProfitLoss Control-an expert in controlling equity from the initial balance. The Expert Advisor closes all positions when the specified equity value is reached, either as a percentage or in the deposit currency.
Equity is calculated as the difference between the current equity and the initial balance at the time of the absence of positions or balance at the very first launch of the Expert Advisor.
There are notification functions (Alert, Mail, Sound, Mobile), display of information (current data of the expert advisor). The exit settings in percent and deposit currency are made for loss and profit (if 0 , they are not used).
If you need to reset the data on the initial balance and start the calculation cycle again, you must set remove_balance_value=true before starting the Expert Advisor .
- remove_balance_value=true-resets the initial balance value;
- SlippageClose – slip of the closing price;
- CommentClose – comment on positions;
- PercentLoss-closing positions with a loss as a percentage of the initial balance;
- MoneyLoss-closing positions with a loss in the deposit currency to the original balance;
- PercentProfit-closing positions with a profit as a percentage of the initial balance;
- MoneyProfit-closing positions with a profit in the deposit currency to the initial balance;
- _ShowInfo-displays on the chart information about the initial balance, profit loss as a percentage of the initial balance, profit loss in the deposit currency to the initial balance, equity;
- _Color_text – the color of the text on the chart;
- _Alert-message about the beginning of closing positions;
- _Sound-sound notification about the beginning of closing positions;
- name_sound_loss – type of sound when closing at a loss;
- name_sound_profit – type of sound when closing in profit;
- _Mail-sending an email message when all positions are successfully closed;
- _mobile-sending a message to mobile terminals whose MetaQuotes IDs are specified in the settings window on the “Notifications” tab.