As requested by gringoh, I have created a new little utility that plots in real time your AccountBalance() and AccountEquity(). See:
Unfortunately, Empty4 does not record your AccountBalance and AccountEquity for a given historical date/time (as it does for eg. the Close, or Open price), therefore EquityBalancePlot can only plot information it has previously stored itself. So, when you start EquityBalancePlot, it starts recording the AccountBalance and AccountEquity every RefreshSeconds (default 60 seconds). Going forward, it is then able to plot these figures in on a sub-chart. The file where it stores these figures can be found in the MQL4\Files area, under the name EquityBalance_<accntnr>.bin, where <accntnr> is your Empty4 account number. This is a binary file -- which stores these numbers most efficiently. Despite that, the file will grow over time and therefore there is an option to purge this file, only keeping the last DaysToKeep number of days (default: 14 days).
Sometimes you need to wait a minute before you see anything happening on the screen. This is eg. the case if you don't have any trades open and the AccountBalance() equals the AccountEquity().
Have fun!
Update: 16.04.2015: EquityBalancePlot now produces two files, both in the Common File area. The first one is the same as before (containing the Equity and Balance figures, recorded every RefreshSeconds). The second one stores the trades (ticketno, symbol name, lotsize and order type) that are currently open on the account. This information is used in the BasketMirrorEA. For those who had the previous version of EquityBalancePlot running for a while and want to reuse their EquityBalance_xxxxxx.bin file, you can just copy that file from the MQL4\Files area to the Common File area (something like: \Users\<youruser>\Application Data\MetaQuotes\Terminal\Common\Files).
EquityBalancePlot
- renexxxx
- Trader
- Posts: 860
- Joined: Sat Dec 31, 2011 3:48 am
EquityBalancePlot
You do not have the required permissions to view the files attached to this post.
-
Over60
- Trader
- Posts: 153
- Joined: Thu Sep 13, 2012 12:58 pm
EquityBalancePlot
Hi renexx,
Your coding skills are very impressive.
I use a similar indicator (please find attached), which draws EqBa backwards by definition.
Maybe you can have a glance for further improvements, e.g. to get more information (scaling etc.).
Cheers
Over60
Your coding skills are very impressive.
I use a similar indicator (please find attached), which draws EqBa backwards by definition.
Maybe you can have a glance for further improvements, e.g. to get more information (scaling etc.).
Cheers
Over60
You do not have the required permissions to view the files attached to this post.
- renexxxx
- Trader
- Posts: 860
- Joined: Sat Dec 31, 2011 3:48 am
EquityBalancePlot
Cheers for that!Over60 » Mon Mar 16, 2015 9:07 pm wrote:Hi renexx,
Your coding skills are very impressive.
I use a similar indicator (please find attached), which draws EqBa backwards by definition.
Maybe you can have a glance for further improvements, e.g. to get more information (scaling etc.).
Cheers
Over60
Your indi serves a different purpose: It reconstructs the Equity and Balance curves for a given set of Instruments and Directions (BUY/SELL) for the most recent 100 (or MaxBars) bars, using the Open and Close time series, assuming that these Instruments would have been open in the given Directions. This is not to say that one is better than the other, but they fill a different need. But thanks for the heads-up!
-
art
- Trader
- Posts: 588
- Joined: Fri Mar 02, 2012 3:51 pm
EquityBalancePlot
Hi renee, your equity balance indie, I just have two straight lines running from left to right on my chart, the blue equity line and the orange balance line, any thoughts, cheers
- renexxxx
- Trader
- Posts: 860
- Joined: Sat Dec 31, 2011 3:48 am
EquityBalancePlot
Hi art,art » Tue Apr 14, 2015 7:14 am wrote:Hi renee, your equity balance indie, I just have two straight lines running from left to right on my chart, the blue equity line and the orange balance line, any thoughts, cheers
Tommaso was so kind to move your post from the HGB thread to the correct thread.
As explained in post 1 of this thread, EquityBalancePlot starts recording the AccountEquity and the AccountBalance in a file, as and when you start it up. It is meant to be kept running on the account. When you first start up EquityBalancePlot, there is no historical data available and the best the indi can do is assume that the Equity and Balance were always at the level they are currently at -- that's why you have two straight horizontal lines. However, if you have open trades on the account, the Equity will start to move up and down going forward and once trades are closed, the Balance will also be altered. The Equity and Balance line on the indi will then accurately reflect the real AccountEquity and AccountBalance of the account, as of the date and time you have started EquityBalancePlot.
I hope this is clear as I don't know any other way to explain this.
-
art
- Trader
- Posts: 588
- Joined: Fri Mar 02, 2012 3:51 pm
EquityBalancePlot
that's ine rene, thanks for getting back,cheers
-
mics05
- Posts: 2
- Joined: Fri Oct 08, 2021 1:35 pm
EquityBalancePlot
Fantastic indicator!
Is it possible to open the .BIN file that exports the indicator with EXCEL?
or to convert the .BIN file to CSV or TXT?
Is it possible to open the .BIN file that exports the indicator with EXCEL?
or to convert the .BIN file to CSV or TXT?
- renexxxx
- Trader
- Posts: 860
- Joined: Sat Dec 31, 2011 3:48 am
EquityBalancePlot
No that is not possible. If you want the export file to be consumed by other programs, you need to alter the indicator such that it creates a .CSV file.mics05 » Wed Oct 13, 2021 7:44 am wrote:Is it possible to open the .BIN file that exports the indicator with EXCEL?
or to convert the .BIN file to CSV or TXT?
-
mics05
- Posts: 2
- Joined: Fri Oct 08, 2021 1:35 pm
EquityBalancePlot
Thanks so much for the reply.renexxxx » Wed Oct 13, 2021 1:18 am wrote:No that is not possible. If you want the export file to be consumed by other programs, you need to alter the indicator such that it creates a .CSV file.mics05 » Wed Oct 13, 2021 7:44 am wrote:Is it possible to open the .BIN file that exports the indicator with EXCEL?
or to convert the .BIN file to CSV or TXT?
I understand the situation, I would like to do it but I do not have the necessary skills.
Is this a complicated thing for you to do?
If I kindly asked you to change the output to something usable with excel, could you possibly do it?
I have been looking for a long time for an indicator that writes the balance and equity (and if possible also the number of open positions) to a .csv file and I have never found anything like it.
Using the indicators that read the history there is always a great inaccuracy due to the fact that only the close of the candle is considered.