Most Forex traders lose all their money.
Using the robot posted here in trading Forex does not guarantee success.
Trading this robot could lead to serious financial loss.
Trading this robot without understanding its underlying trading strategies guarantees traders will lose their money.
This is not a set-and-forget ea; there is no such thing and anyone who tries to claim there is, is either stupid or lying. This ea requires frequent manual intervention.
At best, a trading robot is only 90% as good as the manual strategy it trades. At best. At worst, it can be much less effective. If the strategy is rubbish, so is the robot.
To trade this robot, you have to understand:
How to use EA's.
Bob's Holy Grail Indicator at http://www.stevehopwoodforex.com/phpBB3 ... 44#p105044
HGI used with Hurst Charts at http://www.stevehopwoodforex.com/phpBB3 ... =88&t=3993
This EA is an attempt to automate the methods mentioned in http://www.stevehopwoodforex.com/phpBB3 ... =88&t=3993
In an effort to keep things simple, there would be less options in my EA compared to Steve's.
At present, we keep trading to one trade per pair at any one time, and looking at how strict the Hurst filter is, we also should not expect to have multiple trades on the same pair going on at the same time too.
However, if there is demand for more trades and features in the future, these would be added accordingly to the EA.
Trade Entry Conditions:
Buy Trades:
Hurst (5)MA below Hurst (11)MA
HGI Buy Trend/RAD/Wave Signal (Selectable)
Sell Trades:
Hurst (5)MA above Hurst (11)MA
HGI Sell Trend/RAD/Wave Signal (Selectable)
Trade Exit Conditions:
Buy Trades:
Either one of the following
1. Hurst(5) MA above Hurst(11) MA AND Any HGI Signal
2. Wave signalling Trend Weakness
3. Any Bearish HGI Signal (Bearish Wave/Trend/RAD/Range)
*Condition 3 is added only as a safety precaution, usually either condition 1 or 2 will trigger the exit.
Sell Trades:
Either one of the following
1. Hurst(5) MA below Hurst(11) MA AND Any HGI Signal
2. Wave signalling Trend Weakness
3. Any Bullish HGI Signal (Bearish Wave/Trend/RAD/Range)
Others:
-Exit Half when the Hurst MA Cross (Optional)
Please let me know if any of the rules are missing
EA options:( Please adjust the following before running the EA)
Basic Trade Setup
Code: Select all
extern int TradingTimeFrame =PERIOD_H4;//Base Time frame for indicators
extern int MinTradeTimeMinutes =30; It does not really matter which timeframe of chart you set this on, as the EA follows the above input.
HGI Entry Options
Code: Select all
extern bool EntryOnTrend = true;
extern bool EntryOnRAD = true;
extern bool EntryOnWave = true;
extern bool EntryOnWaveAndTrend = false; Note that if EntryOnWaveAndTrend is selected, then the EA will automatically set EntryOnWave and EntryOnTrend to false.
HGI Exit Options
Code: Select all
extern bool ExitOnHurst = true;
extern bool ExitOnTrend = true;
extern bool ExitOnRAD = true;
extern bool ExitOnTrendWeakness = true;
extern bool ExitOnTrendStart = true;ExitOnTrend- Exit trade on an opposite Trend Signal, i.e Trend Sell for Buy Trade
ExitOnRAD - Exit trade on an opposite RAD Signal, i.e RAD Sell for Buy Trade
ExitOnTrendWeakness - Exit trade on a wave signal, which shows ranging has begun
ExitOnTrendStart - Exit trade on a wave signal, which shows that range has end, and new trend has potentially start.
Partial Exit
Code: Select all
extern bool PartialExitOnCross = false;
extern double CrossExitPercent = 50.0;Pending Orders
Code: Select all
extern bool SendPendingTrades = true;
extern int PendingExpiryMinutes = 60;
extern double PendingGapPips = 5;i.e: We allow the trade to move a little bit in favor of the direction before we enter to prevent getting caught in a bad trade from the start.
Disable if you prefer direct entry.
Other Notes:
I try to keep my EA as simple as possible, so this EA reads and processes every minute, instead of every tick, since it does not seem to be necessary.
This could be an issue if you try to use it one an M1 chart.
22 Dec 14: v1.01
-Corrected bug in CloseTheTrade. Mistake from copy/paste of code.
-Line 570 should be if(bBearishHGISignal) instead of if(bBullishHGISignal)
23 Dec 14:v1.02
-Added more options for TradeExits
Code: Select all
extern string gen1b="====Trade Exit Options====";
extern bool ExitOnHurst = true;
extern bool ExitOnTrend = true;
extern bool ExitOnRAD = true;
extern bool ExitOnTrendWeakness = true;
extern bool ExitOnTrendStart = true;
ExitOnTrend- Exit trade on an opposite Trend Signal, i.e Trend Sell for Buy Trade
ExitOnRAD - Exit trade on an opposite RAD Signal, i.e RAD Sell for Buy Trade
ExitOnTrendWeakness - Exit trade on a wave signal, which shows ranging has begun
ExitOnTrendStart - Exit trade on a wave signal, which shows that range has end, and new trend has potentially start.
Those who find that the ExitOnHurst option exits the trade too fast, may use the other options to hang on to the trade a little longer.
29 Dec 14:v1.03
-Added more control for Start/Stop on Monday/Friday:
Code: Select all
extern bool useMondayStartHour = false;
extern bool useFridayStopHour = false;Defaults to false.
In addition, the EA gives a warning and screen feedback if the start/stop hour is activated.
-Added variable
Code: Select all
extern int MinTimeBetweenTrades=60;Use in conjunction with variable MaxAllowedTrades for multi trades, though that would be rare at this point in time.
-Added option for Range Trade
Code: Select all
extern bool EntryOnRange = true;-Added variables for MA shift
Code: Select all
extern int FastMA_Shift = 0;
extern int SlowMA_Shift = 0;-Fixed bug in LookForTrading
30 Dec 14:v1.03c
-Further bug fixes in LookForTrading
-CloseTheTrade only prints the CloseTrade status when the closing criteria is met. Previously it prints before that and could result in multiple prints.
30 Dec 14:v1.03d
-Further bug fixes in LookForTrading
30 Dec 14:v1.03e
-Further code improvements in LookForTrading and ManageStopLoss
11 Jan 15:v1.04
-Updated EA to use HGI Lib. Please dl the .ex and .mqh files and place in the appropriate folders
-Added option to exit on Range
Code: Select all
extern bool ExitOnRange = true;-Added 60 and 240 MA Check.
Enable CheckTrend to use.
Code: Select all
extern bool CheckTrend = false;Code: Select all
extern bool PartCloseOnBreakEven =false;
extern double BEPartClosePercent = 50.0; Code: Select all
extern bool useHGILookBack = false;
extern int MaxHGILookBackCandles = 5;
extern bool CheckPriceMoveOnLookBack = true;
extern bool usePreviousHiLoAsRef = false;
extern double MaxPipsInTradeDir = 20;
extern double MaxPipsAgainstTradeDir = 10;It does not make sense to use this without Hurst.
MaxHGILookBackCandles - Maximum candles to look back.
Only check the latest HGI signal. Once a HGI signal is found, the EA does not look further back.
i.e If there is a RAD signal 2 candles ago, any signals before that would not be considered.
CheckPriceMoveOnLookBack
This applies when trading on a lookback signal.
The default reference is the Close of the signal candle, otherwise if usePreviousHiLoAsRef is set true, then the Low of that candle is used for sells, while the High is used for buys.
The current price must be between MaxPipsInTradeDir and MaxPipsAgainstTradeDir for the trade to be taken.
The rationale is that if a Sell Trend signal was 3 candles ago, and if the price is now 50 pips below the Close of that candle, it implies the move has happened and might not be a good idea to enter.
Or if the price is now 40 pips above the Close of that candle, then most likely the signal was not a good one and might be good to avoid.
11 Jan 15:v1.04b
Fixed bug in trading time function.
Due to enabling of #property strict in the EA, the bug surfaced and caused the EA to exit.
Previously this bug was not uncovered without #property strict
20 Jan 15:v1.05
-Added Htf HGI/ Hurst Check option
Code: Select all
extern bool CheckHtfTradeEntry = false;
extern int HtfTradingTimeFrame = PERIOD_D1;
extern int HtfLookBackCandles = 8;
extern bool HtfTradeTrend = true;
extern bool HtfTradeRAD = true;
extern bool HtfTradeRange = true;
extern bool HtfTradeWave = true;
extern bool HtfTradeWaveAndTrend = false;
extern bool HtfUseHurst = false;
extern int HtfFastMA_Period = 5;
extern int HtfFastMA_Shift = 0;
extern int HtfSlowMA_Period = 11;
extern int HtfSlowMA_Shift = 0;The code will check the current and previous HtfLookBackCandles for the last Signal.
Use the HtfTradeTrend/RAD/Range/Wave/WaveAndTrend options to determine which Htf signal to follow.
Set HtfUseHurst to enable Hurst check on the higher time frame
-Added Trade Balance filters
Code: Select all
extern bool UseZeljkoBalancedCcyTrade =false; //Allow only one buy and sell of Currency at one time
extern bool LimitTradesPerCurrency =false; //Limit the maximum trades per currency to MaxTradesPerCurrency
extern int MaxTradesPerCurrency = 2;LimitTradesPerCurrency - limits the maximum trades of each currency subject to MaxTradesPerCurrency
20 Jan 15:v1.05b
Corrected some small bugs which causing the HGI candle lookback shift to display wrongly and spelling errors
Cheers