Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
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.....
I have never used the RefreshRates() before. The for loops was doing that. at least attempting to do that...
I ran backtests from '04 and in July of '04 the errors still occurred. I will look closer at the code and see if I can find anything.
Version 2 seems to work the best of all the versions thus far. It lacks the Trend that will make the Margin safer, but the execution is best. I have added tidbits to update the code to include some of the updates that Neo has posted...
Neo -
I would like to implement a Trend to this version. I have been using a LWMA to achieve this. However, the close routines go all to hell with the introduction of the MA... Maybe you might have some ideas to incorporate it into the EA successfully.
What I have noticed with the PM2a is that the opposites work only when the price is at the very extremes. Higher than the HighestBuy or lower than the LowestSell... when the positive sell are above the MidPoint, the losing sell is NOT closing. same for the low buys not closing out the high buy... who would of thought simply adding a iMA would screw it up so badly...
Version 2 seems to work the best of all the versions thus far. It lacks the Trend that will make the Margin safer, but the execution is best. I have added tidbits to update the code to include some of the updates that Neo has posted...
Neo -
I would like to implement a Trend to this version. I have been using a LWMA to achieve this. However, the close routines go all to hell with the introduction of the MA... Maybe you might have some ideas to incorporate it into the EA successfully.
Don
Good morning Don,
Firstly, sorry for my bad english, i don't speak good english.
Secondly, thanks to share your work with us.
So i'm very interest about your EA, so i want to test it in live on a demo account (3000$ Lot: 0.1), just want to run it while 3 at 5 months to see the results, so i want to know what is your best timeframe to run it.
Ok...found part of the problem, at least! The MinWait computation in the "Close in profit" functions is not fully supported in Strategy Test mode so replace the functions with these:
Firstly, sorry for my bad english, i don't speak good english.
Secondly, thanks to share your work with us.
So i'm very interest about your EA, so i want to test it in live on a demo account (3000$ Lot: 0.1), just want to run it while 3 at 5 months to see the results, so i want to know what is your best timeframe to run it.
Thanks
I use 1M time frame as there isn't any indicators involved.
I am trying to incorporate a LWMA and still will use a 1M tf.
I use 1M time frame as there isn't any indicators involved.
I am trying to incorporate a LWMA and still will use a 1M tf.
Don
Hi Don !!
I an shure that is a very good idea. I am backtesting in 30 min TF and getting interesting results (profit factor 3+ but a little high drawdown). I will forward test in that TF and post my results latter.