You must be registered for see images[/CENTER]
Night Hawk is a breakout strategy that looks at the highest high and lowest low between 22:00 GMT and 05:30 GMT (7.5 Hours).
It then sets pending Buystop and Sellstop orders at X pips away from the high and low (Order_Gap variable), ready to catch a breakout. If neither order is triggered by 21:00 GMT then both orders are deleted.
This expert differs from Azure Dragon because AD uses one hour to calculate the breakout range where as NightHawk uses seven hours.
It is very similar to many of the breakout systems that are on the market today such as Forex Morning Trade, Forex Signal Base and Forex Fisher Bot but this one is different because it?s:
? FREE! .
? More configurable.
? Supported here on ForexIsBiz by me and the community.
? Open to suggestions for improvements and upgrades.
? Has a built in indicator that uses the EA?s settings to display the range, the order gaps and the profit target for as many days as you like (e.g. past 100 days) making it very easy to visually back test.
NightHawk includes all of the features I now consider standard such as:
? AutoGMT Offset
? Trailing Stops
? Manual Summer / Winter GMT variables.
? Break Even
? Auto / Manual SL
? Money Management
? Auto ECN / STP detection.
Here is a description of NightHawks important variables:
Close_Opposite_Order: If TRUE, once one pending order is opened, the opposite pending order is deleted.
Order_Gap: The gap, in pips, you want the pending order to be placed above the high and below the low.
SmallRange (when StopLoss_Mode = 0 (Auto)): I found that small ranges often caused triggered orders to be stopped out before the breakout occurred because the stop loss was too close. If the range is equal to or less than this pip value, the Stop Loss will be set to the opposite orders open price (i.e. the range high/low + Order_Gap). If the range is greater than this pip value the Stop Loss will be set to the range high/low only. This just gives more breathing space to orders on small ranges.
BreakEvenStartPips: The amount of pips in profit that NightHawk should move the SL to break even.
BreakEvenProfitPips: The amount of pips in profit that NightHawk should consider as the break even point.
StopLoss_Mode: Auto is explained in SmallRange variable description above. Manual allows you to set your own fixed SL using the User_Stop_Loss variable.
ShowIndicator: Shows you the range, order gap and profit target on the chart.
NumberOfDays: Draws the indicator on this number of days.
Pairs: Tested on EURUSD. Optimization continues on GBPUSD.
I have included a set file and template for EURUSD. Enjoy!
EURUSD.set M15 - 2010 Back Test:
You must be registered for see images
Update 04/01/2011 (v1.1): I have changed NightHawk so that if it is placed on the chart anytime between 5:30GMT - 21:00GMT, and the price has not moved outside of the breakout range since 5:30GMT, and the orders have not already been created today, then the pending orders will be created.
I have corrected a bug picked up by BluePanther where the CloseOppositeOrder function was trying to close orders created by other experts with different magic numbers.
I have also made the Take_Profit variable applicable to the Trailing Stop function. Previously, when Trailing Stop was used a fixed TP of 300 was set. Now the TP will be set to the value of the Take_Profit variable.
I have made the range hours an external variable. Remember, these values are GMT! They will be adjusted by the offset variables. And most importantly, I have fixed the issue where users have GMT offsets less than +2 and have a range across midnight.
Update 07/01/2011 (v1.2): I have corrected the last remaining issues (hopefully) related to ranges crossing midnight and GMT offsets. The most recent issue was orders being placed at the incorrect price. This should now be resolved.
I have also added some magic number info to the display and the order comments so you can easily tell which pending orders belong to which instance of NightHawk on the same currency pair.
I have also added a CloseOrdersOnDenit option which, when set to TRUE will close all pending orders opened by the expert on this chart if NightHawk deinitializes. Experts deinitialize when the following occurs:
- new properties or set
- expert is removed from chart
- chart is closed
- MT4 is closed
I found this particularly useful while I was testing different ranges to see if orders would open correctly. As I changed the settings, old orders would delete and new orders where placed. I left it in just in case its helpful . Default setting is FALSE.
v1.2 [url=http://www.multiupload.com/A72WNNPAW3]Multiupload.com - upload your files to multiple file hosting sites![/url] v1.1 [url=http://www.multiupload.com/W0L68Z3HF6]Multiupload.com - upload your files to multiple file hosting sites![/url] v1.0 [url=http://www.multiupload.com/AGT93U485H]Multiupload.com - upload your files to multiple file hosting sites![/url]