| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Trend Trading EA with Automated Loss Recovery https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3719 |
Page 6 of 14 |
| Author: | Dewey McG [ Mon Jul 14, 2014 2:12 am ] |
| Post subject: | Trend Trading EA with Automated Loss Recovery |
Good points-I will try to look at this tomorrow to see |
|
| Author: | SpiderX [ Mon Jul 14, 2014 2:29 am ] |
| Post subject: | Trend Trading EA with Automated Loss Recovery |
Hi Dewey, Attached is a slightly updated v2.2 of ALR Calculator with lot step. As a result, the calculations should match exactly the same of that which is calculated in the EA, with the same settings. Have yet to verify this....maybe you can check this out first. For future bug issues...first step will be to counter check with the excel sheet and make sure the lot sizes are correct. Cheers |
|
| Author: | SpiderX [ Mon Jul 14, 2014 8:57 am ] |
| Post subject: | Trend Trading EA with Automated Loss Recovery |
After some thoughts, the next version will keep track of the number of ALR orders, and close all the orders once there is a discrepancy between the number of orders and the number previously counted. (i.e one of the orders was closed for some unknown reason) Guess this would be a solution to the issues we are seeing. Watch out for this space. Coming soon. Cheers |
|
| Author: | Gordon [ Mon Jul 14, 2014 3:02 pm ] |
| Post subject: | Trend Trading EA with Automated Loss Recovery |
This is exciting stuff. There's so many different ideas to try. I may be wrong, but what I think I'm seeing is that when you're in a series of ALR trades and the bPriceCrossMAUp or bPriceCrossMADown exits the last order with profit, or if a trailing stop is used and exits with a profit >0, then what happens next is that the ALR sequence begins again with the firstorderlotsize, even though the series of trades ended in a net loss. So I'm thinking what would be better is if the EA insisted on a minimum profit of breakeven or zero profit for the series of trades and not end the ALR progression until the profit is reached. What would this look like in trading? Say your on the 3rd trade of the ALR sequence and you are short and your trailing stop gets hit for a small take profit. The net profit for the series is still <0 , so when that trailing stop is hit, the EA immediately places a buy order of the next lot size and a pending sellstop order at the ALRzone distance below it and so on until the net profit for the series is >= 0. Only then would it begin a new series with the firstorderlotsize. In summary we need to not only follow the number of trades but count the total profit before begining the new sequence. |
|
| Author: | SpiderX [ Mon Jul 14, 2014 4:22 pm ] |
| Post subject: | Trend Trading EA with Automated Loss Recovery |
Hi, v1.03b is in post 1, but still not confident about this version as it was coded in a jiffy. v1.03b -Add tracking of number of positions in code -If there is a discrepancy in positions, EA will close all positions for safety. Dewey, This version should fix some of the issues with the rogue positions. However, we should find out what causes the rogue positions in the first place. As mentioned in my previous post, it does not make sense that a sl and tp at the same price does not close together unless it is due to spread. Hope you are able to find out the mystery behind the 3 errors in v1.03a before trying the new one. cheers |
|
| Author: | Dewey McG [ Tue Jul 15, 2014 10:35 am ] |
| Post subject: | Trend Trading EA with Automated Loss Recovery |
I have to run, but here is one of the errors. Trades are going straight to stop loss and ALR trades firing afterwards then also hitting SL. This happened on a Wednesday, so not caused by gaps. |
|
| Author: | SpiderX [ Tue Jul 15, 2014 11:31 am ] |
| Post subject: | Trend Trading EA with Automated Loss Recovery |
Hi Dewey, This looked like explaination no 1. Spread issue. Quite certain that tester takes spreads into account. We happened to have a super lucky break whereby sl and tp cannot execute at the same price due to the spread. i.e Sl hit the ask price, but tp could not hit the bid as it was a few pips behind. The new version should fix this. However, to my understanding, the forced closure would mean possible baskets in loss because the tp and sl cannot be the same price. You would have to look out for this in the backtest of the new version. Cheers |
|
| Author: | Dewey McG [ Wed Jul 16, 2014 1:47 am ] |
| Post subject: | Trend Trading EA with Automated Loss Recovery |
Ok the new version looks much better. It still shows a small loss on some of the series, as much as 100--but nothing major and no rogue trades. I attached a PIC to show how it handled a weekend gap hitting SL. is this what you wanted? |
|
| Author: | SpiderX [ Wed Jul 16, 2014 2:21 am ] |
| Post subject: | Trend Trading EA with Automated Loss Recovery |
Hi Dewey, As long as the whole series closes with the closing of one trade, it should be fine. For the small losses, could you pick one set and check if all the trades were filled at the correct price ? ..i.e all buy entry, sell entry correct, tp,sl correct Cheers |
|
| Author: | Dewey McG [ Thu Jul 17, 2014 10:14 pm ] |
| Post subject: | Trend Trading EA with Automated Loss Recovery |
Sorry to take so long--schedule has been crazy. The trade logic seems fine--it's the lot sizes. The calculations are a tad off, so the additional ALR trades are slightly smaller than they should be Edit--the chart should say .25, .35, .23 |
|
| All times are UTC | Page 6 of 14 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|