| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| ProfitPlot https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3894 |
Page 1 of 2 |
| Author: | renexxxx [ Fri Oct 24, 2014 3:59 am ] |
| Post subject: | ProfitPlot |
In addition to the TradeReport, I have created a little indicator that plots the current profit/loss of an open basket over time. For instance: You just give it a MagicNumber and it will plot the profit levels. (It stores a data point for each reading in a binary file, so that when the indicator is restarted, it still has all the data). As this is just an indicator, we can apply other indicators (such as Moving Average) to the profit plot, and this might give us some ideas as to when to close a basket of trades. Hopefully, people much smarter than me, can use this to come up with a basket exit strategy. Initially this is best viewed on the M1-chart. When you accumulate enough data points, you can switch M5 and higher. There might still be some bugs in, as I haven't spend a lot of time testing it. If so, please shout! When it is first started, it prints out a message that it can't file the data file ... duh, there is no data file yet. That will be created when it stores the first data point Just ignore. Code attached. Have fun, Edit: 24.03.2015: Fixed a few bugs ... |
|
| Author: | fxozgirl [ Fri Oct 24, 2014 7:14 am ] |
| Post subject: | ProfitPlot |
Awesome Rene... thanks for sharing both indicators, this profit plot indi will be particularly helpful |
|
| Author: | dudest [ Fri Oct 24, 2014 7:41 am ] |
| Post subject: | ProfitPlot |
You're on a roll! Merci beaucoup :) |
|
| Author: | bazze [ Fri Oct 24, 2014 2:50 pm ] |
| Post subject: | ProfitPlot |
Thanks for this,but got this alert when trying to attach it? Nothing shows up on the chart? |
|
| Author: | dudest [ Fri Oct 24, 2014 6:00 pm ] |
| Post subject: | ProfitPlot |
Hi bazze, Is your MT installed under Program Files by any chance? . |
|
| Author: | bazze [ Fri Oct 24, 2014 6:49 pm ] |
| Post subject: | ProfitPlot |
No,in C:drive... |
|
| Author: | renexxxx [ Fri Oct 24, 2014 7:47 pm ] |
| Post subject: | ProfitPlot |
This was mentioned in the first post ... 1. Initially you get an error message that the data file does not exist. The reason is, that the file has not been created yet, but it is the first thing the indicator will do. 2. The reason, that initially your screen looks empty, is also, because there are no data points yet. I noticed that you have opened a H1 chart. It will take a while before you get any significant movement on the H1-chart. That's why I suggested to start with a M1-chart. May be you should read the first post ... For your convenience, I have put the link to the first post here |
|
| Author: | renexxxx [ Fri Oct 24, 2014 10:40 pm ] |
| Post subject: | ProfitPlot |
If you're like me and leave your terminal running during market close with trades open, you might want to download the update to this indi in post 1, as the original version kept adding data points to the log file, even when no new ticks were received. This has now been resolved. Also, from a housekeeping perspective, it might be worth to go from time-to-time through your \Files folder and remove the PP_*.bin files you don't need any more. By default, these files grow by 12 bytes every minute, and although that is not that much, it does add up over time. |
|
| Author: | renexxxx [ Wed Nov 05, 2014 12:17 am ] |
| Post subject: | ProfitPlot |
In order to see multiple "ProfitPlot"s in the same window, I have created the ProfitMonitor indicator. It looks like this: So, what does it do and how does it work? It works in conjunction with ProfitPlot. ProfitPlot is installed on a chart and provided with a MagicNumber that it needs to watch. ProfitPlot works out the UPL for the given magic number and writes this periodically to a file in the common area (somewhere like: C:\Documents and Settings\<username>\Application Data\MetaQuotes\Terminal\Common\Files). This data file has a name like: PP_<accountNumber>_<magicNumber>.bin (eg. PP_207331_45589.bin). All terminals can write to the common area, but by using this naming convention, the file name should be unique. ProfitMonitor picks up these files and plots them in one (separate) chart. It can handle up to 8 files (as Empty4-indi's can have only 8 buffers...) What's the point of all this? The market moves in waves. Some strategies are better suited for certain market conditions than others. The idea is to have several strategies (possibly basket) strategies running on several terminals and each of them produce a ProfitPlot-file at real time. By watching ProfitMonitor, you can 'see' when a certain strategy is gaining (is in an upward-trend). That would be the time to start that particular strategy on a live account. Obviously, you'd hope that the upward-trend would continue for a while. If this proves to be the case in the majority of cases, the next step could/would be to create a little EA, that reads these ProfitPlot-files and shoots of trades when the time is ripe. We are then moving into the field of 'profit-curve trading'. Oh, and before someone shouts out: "It doesn't work!", "I see nothing on my screen", "I get an error message", the following:
Edit: 24.03.2015: Added the legends for the profit curves. |
|
| Author: | arts [ Wed Nov 05, 2014 9:32 am ] |
| Post subject: | ProfitPlot |
Many thanks for these indis Rene - very useful. With regard to the EquityMonitor - in fact you are no longer restricted to 8 buffers in Empty4. You can now have up to 512, for what its worth! This is definitely a big improvement, especially for indis like currency strength meters where there is a lot of data to display, and it could be of use here.. |
|
| All times are UTC | Page 1 of 2 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|