I found a bug in my previous script in the lotsize and price calculations when one or more of the pairs only had 2-digits after the decimal in the price.
I corrected that and it is attached here. The version in this ZIP file also has the logic for setting the orderid that we talked about, as well as my “order management” EA that watches for orders to be triggered and cancels the opposite. Brian, this should give you what you need in your “complete” EA.
I don’t intend to modify either of the included files any further, as I am now trading this system via an EA that does everything - so no need for a separate script to enter the orders and EA to “watch” them. I’m posting this simply as a “fix” for anyone that may have downloaded the previous script and discovered the same error I did (and also to share my code with Brian for the EA he is working on).
** EDIT - Doh! Found another bug - removed attachment for now. Need to leave for work, will re-upload fix later…
I set my MT4 at 4:30am GMT today using the scripts that bkr1969 posted on his weblink.
Minutes after setting it, a USD/JPY order was hit and I was able to cancel its “other half” immediately.
I was planning to remote access my home pc today, using a free trial from logmein.com, but it seems the IT at my employer have blocked this website, so I unfortunately cannot see if any other orders have been hit.
4xLong - your script with the “other half” knock outs will really be something I am looking forward to testing too, due to above reasons.
The long awaited Straddle System EA. The only thing I haven’t done with it yet is make it set an expiration for trades placed on Fridays and set it to not trade at all on Sundays. Otherwise, you can start it on your chart (I suggest just shortly after the new daily candle opens) and then forget it. It will place trades, cancel opposite pendings, calculate lots size to trade based on prior day win/loss. The only thing it won’t do is take your money to the bank.
On that note, I will tell you that I ran it through the strategy tester for the past 1 year and only the USD/JPY made a profit. All other pairs completely blew the account. The USD/JPY showed +$4016.72 on a $2500 initial mini account starting with 1 lot. The odd thing is, on a standard account starting at $2500 and trading 0.1 lots, it only showed a couple hundred.
Anyway…there are obviously good times and bad times to trade this system and we’re in the middle of a great run right now. I’m up 1460 pips today with only the EUR/USD left open, and that’s in profit for now. I think that trading this system now and getting a “feel” for how the different pairs move can be beneficial to the long term in helping decide when to trade or not. As is the mantra here (and I assume with all traders), “Don’t let a machine trade for you.” I strongly believe that experience reading the charts and even intuition to a degree are irreplaceable and invaluable. I can’t code an EA with those qualities.
Here’s a link to the EA and I’m also putting it on my site (with updated spreadsheets…there were a couple of glitches in the originals. Let me know your thoughts, experiences and ideas.
I have another daily system that trades 14 pairs either all long or all short if you are interested in coding this. I have made +1500 pips since last night using IBFX demo acct. It uses a R/R ratio of 1:3 minimum.
Here is a quick win/loss summary for my day using bkr1969 original script.
I entered 10 pairs and lucky did not have any double entries.
audusd + 90
euraud + 140
eurchf -60
eurgbp -40
eurjpy + 130
eurusd -100
gbpjpy 160
gbpusd -100
usdjpy 80
total closed pips [B]+290[/B]
Still cooking
usdchf
I used lots of 1 on a 2500 demo account. bkr1969 where was the bulk of your pips coming from (you could of course have pairs I don’t have) , or did you get similar results ?
Here’s a shot of my trades for Sunday night/Monday. I had higher profit because I was trading as many as 3 lots on some pairs. I closed EUR/USD a little early because it couldn’t seem to get over the final hump to TP (and still hasn’t as of yet). Besides, I was already up 1400 pips, so why be greedy.
BKR, Thanks for the EA and XL files. Am disappointed that the back test only showed USD/JPY to be good. I’m looking at a very similar breakout system that has performed exceptionally well in live trading according to the site (free). It basically puts a buy order 100 pips away from the open on Monday, and a sell 100 pips away from the open with a 60 pip stop, and lets the TP open for the entire week. When aither the buy or sell is opened, the opposing order is to be canceled. Is there an EA that would cancel a buy order when the sell is hit, and vice versa?
If you have programming experince, you can canibalize my EA for the order canceling portion. It would need to be modified somewhat but should be do-able. If you’re not experienced I could work on something for you.
I think that the method will perform a little better than the back testing shows if you use it for awhile and put some chart knowledge and intuition into it. I’ll keep trying to improve on it.
Here is my day 2 update using bkr1969’s updated script, all orders were at 0.1 lots, as created by the script on the first day:
audusd - 90
euraud - 140
eurchf -60 & -60 (somehow the buy and sell were both hit)
eurgbp -40
eurjpy + 130
eurusd -100
gbpjpy 160
gbpusd -100
usdchf -7 (closed this when I got in,)
usdjpy 80
total closed pips -288
For the week +71 pips
Interesting is that the Tuesday numbers are nearly all the inverse to the Monday numbers, having not changed the lots, and the ADR rounded magic being identical in most cases.
Ok just realised I started the script a few ticks too early last night, seems I need to get to bed now, then awake @ 2am :eek:to hit the start of the first GMT candle.
Does anyone have a timer for starting a the script
With lots of 0.1, I have come in with -460 pips today, with two deals still going eur/usd and gbp usd, these being at + 39 pips at the moment.
audusd, euraud, eurgbp, finished in + the rest in -.
Yes…I had similar problems, but only if changing timeframes on the chart or closing and restarting MT witht he EA still on the chart. I’m nearly done with a new version that includes a fix for this and may put entries for all pairs in at once (haven’t decided what will work best yet). Either way, it will allow you close and restart MT without problems (i.e. I had switched between accounts the other night and it failed to cancel an opposite pending order) by checking all the active open and pending orders each time it’s initialized. It should (and does according to the back tests I’ve run) work perfectly if you don’t change accounts, timeframes, or close MT4.
By the way…up over 1000 pips last night…finally. :rolleyes:
Hi bkr1969, I see by reading your last posts I made some errors using your script. Perhaps this was also the reason why some things were not working. Example, I had to close MT4 a couple of times and restart, on one occasion an order did not close when the other side was opened. You say you may have a new script with some fixes. I am ready to give it another bash this week. Another question, by reading your revisions to the new version, does it mean, one could set it at the first candle Monday GMT, then leave the MT4 and computer running without interference to the end of the week, or would each day the script need to be started ?