Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information
Thanks for that info. I did not look close enough at the code to see that. What I did do was add a trend change filter. I've seen that the code will exit positions upon a profit target. What I did was add the "peak of ADX" filter which signals a possible trend change. So, by using the next higher time frame use the ADX to allow the code to then check for profit target and exit positions as nesessary. The results have been encouraging. I am still testing, but find that the delay to the end of trends (or consolidations), squeezes out more profit from some of those positions. So in essence, the profit target becomes minimum profit target.
Thanks for sharing this EA. I am infinetly interested in these type of EA's.
1. Changed Boost to an extern bool and made it true. This allows multiple trades per candle and not just on the opening of the candle.
2. TrendSpacing - This is a separate spacing increment for when the price is higher than the highest buy or lower than the lowest sell. It allows the profit to accumulate quicker when in a trend.
3. CounterTrendMultiplier - This multiplies the lot size to help the retracements accumulate profit quicker. Set to 1 if you want the lot size to stay the same.
4. In the CheckForBuy() and CheckForSell() routines, I broke up the entries into two separate subroutines. This allows for the TrendSpacing and CounterTrendMultiplier.
5. I also added a MidPoint line for a visual aid. It has no real purpose.
6. Simplified the right side label to incorporate the margin and low margin and balance into one label.
Still having problems with the losing orders closing improperly. Still working on it. Can still use some help on it!
Don
EDIT - I didn't get the LWMA added to this version. Maybe in the next one.
Okay.... found a few things that needed attention and tidied up the source a little in the process.
Main things were:
1) removed a couple of redundant variables
2) added RefreshRates() at appropriate points
In CheckForBuy() & CheckForSell():
1) added a check for zero lot sizes
2) commented out the "for loops" around the calls to OrderSend() as I couldn't see what they achieved
In Start():
1) added checks for HighestBuyTicket, LowestBuyTicket, HighestSellTicket & LowestSellTicket being zero before trying to select/close the distant order
I've run a quick test from Sept 06 to June 07 and no errors are now being reported either for opening or closing orders. In the test, as a batch of SELLs was closed at a profit, the most losing BUY was also closed and vice-versa.
Obviously, some more checking would be good, just in case I've missed something but the updated source is here.....
Okay.... found a few things that needed attention and tidied up the source a little in the process.
Main things were:
1) removed a couple of redundant variables
2) added RefreshRates() at appropriate points
In CheckForBuy() & CheckForSell():
1) added a check for zero lot sizes
2) commented out the "for loops" around the calls to OrderSend() as I couldn't see what they achieved
In Start():
1) added checks for HighestBuyTicket, LowestBuyTicket, HighestSellTicket & LowestSellTicket being zero before trying to select/close the distant order
I've run a quick test from Sept 06 to June 07 and no errors are now being reported either for opening or closing orders. In the test, as a batch of SELLs was closed at a profit, the most losing BUY was also closed and vice-versa.
Obviously, some more checking would be good, just in case I've missed something but the updated source is here.....