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.
THIS IS AN EXPERIMENTAL EA NOT YET BEING USED ON OUR LIVE ACCOUNTS
This EA is a result of the discussion from :
http://www.stevehopwoodforex.com/phpBB3 ... =23&t=3682
http://www.stevehopwoodforex.com/phpBB3 ... =12&t=3708
USE THIS ON A 4H CHART ONLY
Trading Rules
Long Trade Entry
1. Price is above 240 Lwma
2. MACD Main signal below 0
3. Price open below 5ema shift 5 and close above
Long Exit:
1. Trade is in profit
2. Price opens above 5ema shift 5 and close below
Short Trade Entry
1. Price is below 240 Lwma
2. MACD Main signal above 0
3. Price open above 5ema shift 5 and close below
Short Exit:
1. Trade is in profit
2. Price opens below 5ema shift 5 and close above
Trade Exits will be invalid once first ALR trade has trigger.
After recovery trade has triggered, trades will exit either by sl or tp.
Please do not use Stoploss management with ALR as it will mess things up.
The EA is coded on a customized shell , which is a hybrid of Steve's and Tommaso.
The good thing is that most of the code is designed to be efficient and reduce CPU cycles in processing of the EA,
but the down side is that it is relatively untested compared to Steve's/Tommaso shell and there could be some bugs lurking around.(though hopefully unlikely)
Please test out this initial version and see if you encounter any bugs or errors.
Currently, the lot size setting if using FixedLot = false, is based on the Stoploss value, as such it is recommended to do your own Math and set StopLoss to be equal to (ALRZonePips + ALRTargetPipsOppDir).
At this point of time, it is nice if someone can backtest this EA on Empty4 in tick mode, just for sanity checking purpose. (Didnt manage to do this due to time constraints)
Dewey was testing out earlier and it seems to be fine (as long as the backtesting is not in candle mode)
Code: Select all
extern string gen0a="====Automated Loss Recovery Settings====";
extern bool useAutomatedLossRecovery = true;
extern double ALR_ZonePips = 50;
extern double ALR_TargetPips_SameDir = 150;
extern double ALR_TargetPips_OppDir = 150;
extern double ALR_TargetProfitDollars = 10.0;
extern double ALR_DollarPerPipLot = 10.0;
extern int ALR_MaxTrades = 10;
extern double ALR_SpreadPips = 1;
Hopefully Dewey can recommend some settings and will hardcode it into the EA.
To do list:
1. Update more details on the EA in post 1.
2. Add ALR_PercentRisk parameter based on worse case loss when ALR sequence ends with a loss
3. Initial lots and risk calculation to be based on ALR settings rather than stop-loss when useAutomatedLossRecovery is enabled true.
Version Updates:
v1.01
-Added in code in consideration of ALR Max Trades Limit. (Forgot about this one)
v1.02
-Add trade comments to make trades more traceable
-Some code clean up and minor efficiency enhancements
v1.03a
-Some bug fixes in InitializeALRPositions, this should fix the issue of wrong lot sizes
-Initialize ALR to round up lots to next lot step in lot size calculation
-Note: If you are "backtesting" , try using visual mode at highest speed.
v1.03b
-Add tracking of number of positions in code
-If there is a discrepancy in positions, EA will close all positions for safety.
v2.00
-Major rework of ALR concept
-Initial trade is closed and loss is taken, while the next order in the opposing direction is opened.
-Basically, the next order in the opposing direction is taken to cover the losses of the previous trades
This results in smaller positions and smaller losses for same number of turns.
ALR Variables:
Code: Select all
extern bool useAutomatedLossRecovery = true;
extern double ALR_ZonePips = 50;
extern double ALR_TargetPips_SameDir = 150;
extern double ALR_TargetPips_OppDir = 150;
extern double ALR_ProfitPips = 10.0;
extern double ALR_CommissionPips = 1.0;
extern int ALR_MaxTrades = 10;
extern double ALR_MaxLots = 5.0;
ALR_CommissionPips is the number of pips your broker charges as commission which has to be taken to consideration with each trade that is closed.
ALR_MaxLots limits the maximum lots possible in the ALR progression and it supercedes ALR_MaxTrades.
If ALR_MaxLots is exceeded, then ALR_MaxTrades will automatically be toned down.
v2.01
-Patched in a missing line in the error catching code
v2.02
-Add in missing code to remove all pending trades when original trades are closed by the EA
v2.03
-More options to adjust timeframe for indicators
-The Timeframe settings for all indicators default to 0, which is chart tf settings.
Please look at variables:
Code: Select all
extern int MACD_FastEMAPeriod =0;
extern int TradingTimeFrame =0;
extern int FastMaTdTF =0;
extern int SlowMaTdTF =0;
-Fixed bug that caused lot size calculation to be wrong
-Fixed bug that caused lot size of recovery trades to be wrong
v2.05
-Code improvements to better adjust profit at the end of the ALR progression
-The target price is no longer static and is adjusted slightly to precisely achieve the target profit.
-Please use ALR_ProfitPips if you like more profit at the end of the ALR progression.
v2.06
-Removed ALR_ProfitPips and replaced with ALR_TargetPercentProfit
Use this to set the target percent profit you wish to have at the end of an ALR progression
0 is ok, if you wish to minimize lot sizes, anything higher means higher lot sizes.
i.e: if you set 0.1%, you get a 0.1% profit for your account at the end of each ALR Progression upon hitting tp.
-new variable ALR_MaxPercentLoss
Determines the maximum hit to the account for ALR progression and supercedes MaxALRTrades
Use this to protect your account from more losses than acceptable.
i.e: for 20%, the maximum hit your account can take is 20% and no more.
Code: Select all
extern double ALR_TargetPercentProfit = 0.1;
extern double ALR_MaxPercentLoss = 20;