I have finally gotten the functionality I wanted.
First, credit where it is due...
I found the original EA that this is based off of here - http://www.strategybuilderfx.com/showthread.php?t=16015
I have changed it to do the following.
Delete both pending orders after "X" hours, if neither entry has been hit.
If one entry is hit, keep the opposite stop order in place until first entry hits TP.
If first order reverses on you, the opposite stop order will hit it's entry, and take its profit before the first order hits S/L (depends on your settings...).
If the first order is entered and hits TP without the opposite order entry being hit, the opposite pending order will be deleted.
I think that is the basics...
A quick explanation - most settings should be pretty self explanatory, but here are some of the less obvious ones.
The "EntryMinute" setting can be tricky. If you have, for example, "32" for the EntryMinute, you will ONLY be able to use 1 minute charts. If you use "30", you will be able to use 1m, 5m, 15m, or 30m. etc...
If you have a setting in the "EntryMinute", and no trades are being entered, it is likely a mismatch of the timeframe of the chart and the minute setting.
This is something I have not gotten around to fixing yet...
"Expire" - this is a lenght of time, not an actual "time". If "Expire" hours has passed, and neither stop order has hit it's entry, both stop orders will be deleted.
"ChannelWidthPips" - the number of pips between the sell stop and buy stop orders. Orders are place at bar open +/- (ChanelWidthPips / 2)
2005-01-01 to present backtest (90% modelling) on GBP/USD is attached. I have found this to be the best setting.
EntryHour = 8 (GMT - my test data was GMT+2, hence the 10:30 time)
EntryMinute = 30
Expire = 8
ChannelWidthPips = 80
ShortStopLossPips = 200
LongStopLossPips = 200
ShortProfitPips = 90
LongProfitPips = 90
DSTAutoAdjust = False
Just started forward testing on IBFX live mini account, and will see how it goes.
First, credit where it is due...
I found the original EA that this is based off of here - http://www.strategybuilderfx.com/showthread.php?t=16015
I have changed it to do the following.
Delete both pending orders after "X" hours, if neither entry has been hit.
If one entry is hit, keep the opposite stop order in place until first entry hits TP.
If first order reverses on you, the opposite stop order will hit it's entry, and take its profit before the first order hits S/L (depends on your settings...).
If the first order is entered and hits TP without the opposite order entry being hit, the opposite pending order will be deleted.
I think that is the basics...
A quick explanation - most settings should be pretty self explanatory, but here are some of the less obvious ones.
The "EntryMinute" setting can be tricky. If you have, for example, "32" for the EntryMinute, you will ONLY be able to use 1 minute charts. If you use "30", you will be able to use 1m, 5m, 15m, or 30m. etc...
If you have a setting in the "EntryMinute", and no trades are being entered, it is likely a mismatch of the timeframe of the chart and the minute setting.
This is something I have not gotten around to fixing yet...
"Expire" - this is a lenght of time, not an actual "time". If "Expire" hours has passed, and neither stop order has hit it's entry, both stop orders will be deleted.
"ChannelWidthPips" - the number of pips between the sell stop and buy stop orders. Orders are place at bar open +/- (ChanelWidthPips / 2)
2005-01-01 to present backtest (90% modelling) on GBP/USD is attached. I have found this to be the best setting.
EntryHour = 8 (GMT - my test data was GMT+2, hence the 10:30 time)
EntryMinute = 30
Expire = 8
ChannelWidthPips = 80
ShortStopLossPips = 200
LongStopLossPips = 200
ShortProfitPips = 90
LongProfitPips = 90
DSTAutoAdjust = False
Just started forward testing on IBFX live mini account, and will see how it goes.
Attached File(s)
StrategyTester.zip
21 KB
|
922 downloads
Timed-Breakout.mq4
5 KB
|
1,179 downloads
Chris