| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| TRADE Run-up and Drawdown https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=104 |
Page 1 of 2 |
| Author: | gaheitman [ Wed Nov 30, 2011 9:17 am ] |
| Post subject: | Re: TRADE Run-up and Drawdown |
Khalid, I took a look at modifying a script I wrote years ago to do what you want. However, there are some problems with giving you good data. The best granularity we have is a minute, so while we know when within that minute you entered/exited a trade, we don't know where the price extremes fall within the minute. It could be that you exit in the last 20 seconds of a bar, but the bar could continue to move either for or against your trade. If this movement is at the extreme of the trade's movement, we'll overstate either the run up or draw down by including the High/Low of that end bar. Do you want to skip the entry and exit bars in the calculations? It won't be as pretty as your example, I'm simply creating a CSV file to be imported. George |
|
| Author: | DING [ Wed Nov 30, 2011 4:00 pm ] |
| Post subject: | Re: TRADE Run-up and Drawdown |
it is better that export CSV could include order pips, duration and comment, thanks a lot. |
|
| Author: | dusktrader [ Sat Dec 03, 2011 6:40 pm ] |
| Post subject: | Re: TRADE Run-up and Drawdown |
I've also been searching for something similar to what you are asking for, but so far have not found a tool. The purpose of the tool (at least in my case) would be to help optimize a trading strategy. For example, in my current strategy I use a takeprofit level of 20 pips. I only picked that as a starting point and really no other special reason. However, it sure would be nice to have a way to gather the following, for example: At a given hard TP and SL level:
I feel pretty sure that there must be a tool out there that does this, or something similar. It's probably not as critical for EA traders because they can simply run through the iterations in Strategy Tester I think. But for discretionary traders or those developing new strategies, it could really be helpful. |
|
| Author: | gaheitman [ Sat Dec 03, 2011 9:00 pm ] |
| Post subject: | Re: TRADE Run-up and Drawdown |
OK, here's what I have so far. I've run into the issue where there is not enough M1 history to display the trades. I'm trying to decide if I want to blank out that data via "N/A", or keep looking at higher time frames until I have enough data to calculate the run up/draw down. Any preferences? Also, would you prefer the sign of the draw down to be consistent with the state of the trade at the time (negative) or consistent with the name (positive). For me, saying "draw down was 20 pips" is more natural than saying "draw down was -20 pips" Finally, run up and draw down do not take into account spread. The problem is spread changes all the time, especially after hours and I don't want the calculations to be different every time you run the script. George |
|
| Author: | gaheitman [ Sun Dec 04, 2011 8:52 am ] |
| Post subject: | Re: TRADE Run-up and Drawdown |
OK, here's a test version for you to take a look at. In the top of the script is a define for the filename, it is currently "OrdersReport.csv". Remember it will be placed in your Experts\Files directory. Code: Select all Code: Select all From an ugly code standpoint, I wrote much of this in 2006 when I first started in Forex and Empty4, so be kind. If you'd like different column headings or order, let me know. EDIT: Updated code to include Comment and Magic Number. EDIT: Update to fix defect in offset logic for RunUp. George |
|
| Author: | gaheitman [ Sun Dec 04, 2011 12:16 pm ] |
| Post subject: | Re: TRADE Run-up and Drawdown |
I have updated the script in my previous post to include Comment and Magic Number. See: http://www.stevehopwoodforex.com/phpBB3 ... 1762#p1760 |
|
| Author: | markft [ Sun Dec 18, 2011 1:27 pm ] |
| Post subject: | Re: TRADE Run-up and Drawdown |
Hi George, I have been using the script and believe I found what I think were a couple of minor bugs causing incorrect run-up/dd calculations in some cases. I updated the script to resolve these; please see attached. I am an MQL newbie (but a coding veteran in others) so I might have been missing some MQL specific stuff. Thank you again for preparing the script. I have been juggling between mt4i and myfxbook for similar functionality but your script is much more useful than both. Kind Regards, Mark |
|
| Author: | gaheitman [ Sun Dec 18, 2011 2:03 pm ] |
| Post subject: | Re: TRADE Run-up and Drawdown |
I believe you are right! I can't believe I was confused about the direction of the indicator "number line". Thanks for finding the issue, fixing it and bringing it to my attention! I'm replacing the first post with your version. George |
|
| Author: | markft [ Sun Dec 18, 2011 9:28 pm ] |
| Post subject: | Re: TRADE Run-up and Drawdown |
No problems George. That's what is good about open source, it gives all a chance to benefit and contribute. |
|
| Author: | AnotherBrian [ Fri Dec 30, 2011 4:54 am ] |
| Post subject: | Re: TRADE Run-up and Drawdown |
This stuff is GOLD. Because I know I'll forget where I got this just after I lose the file, is it possible to post in the first post with some instruction (for new readers) by perhaps giving George the first post? Just a suggestion. Thanks for the script! Brian |
|
| All times are UTC | Page 1 of 2 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|