| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| EquityBalancePlot https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=4172 |
Page 1 of 1 |
| Author: | renexxxx [ Mon Mar 16, 2015 6:29 am ] |
| Post subject: | EquityBalancePlot |
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). |
|
| Author: | Over60 [ Mon Mar 16, 2015 11:07 am ] |
| Post subject: | 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 |
|
| Author: | renexxxx [ Mon Mar 16, 2015 11:18 am ] |
| Post subject: | EquityBalancePlot |
Cheers for that! 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! |
|
| Author: | art [ Mon Apr 13, 2015 9:14 pm ] |
| Post subject: | 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 |
|
| Author: | renexxxx [ Tue Apr 14, 2015 10:31 am ] |
| Post subject: | EquityBalancePlot |
Hi art, 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. |
|
| Author: | art [ Tue Apr 14, 2015 3:11 pm ] |
| Post subject: | EquityBalancePlot |
that's ine rene, thanks for getting back,cheers |
|
| Author: | mics05 [ Tue Oct 12, 2021 9:44 pm ] |
| Post subject: | 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? |
|
| Author: | renexxxx [ Wed Oct 13, 2021 1:18 am ] |
| Post subject: | 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. |
|
| Author: | mics05 [ Thu Oct 14, 2021 4:28 pm ] |
| Post subject: | EquityBalancePlot |
Thanks so much for the reply. 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. |
|
| All times are UTC | Page 1 of 1 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|