Join our fan page
- Views:
- 39213
- Rating:
- Published:
- 2011.08.03 15:53
- Updated:
- 2014.04.21 14:55
-
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
Expert advisor that trade in the trend of EMA and buy/sell signals get from Williams %R I have tried to create an Expert advisor that could by traded with 1000 EUR starting equity and to minimize the drawdown. Hope you like it. I appreciate every feedback. Optimized for EURUSD 5 min I have removed some bugs, removed position sizing, add some inputs. You use it on your own risk. I am not responsible for your loss, you have to change, test and optimize it for your purpose.
old versions:
http://codebase.mql4.com/en/code/10116
http://codebase.mql4.com/en/code/10201
inputs:extern string separator1 = "------trend settings------";
extern bool useEMAtrend = true; // trade in EMA trend
extern int barsInTrend = 1; // how many bars should be in trend
extern double EMAtrend = 144; // EMA period for trend
extern string separator2 = "------WPR settings------";
extern double iWPRPeriod = 46; // WPR period for enter and exit
extern double iWPRRetracement = 30; // minimal retracement for WPR to allow another trade
extern bool useWPRExit = true; // use exit with WPR indicator
extern string separator3 = "------position settings------";
extern double lots = 0.1; // fixed lot size
extern int maxTrades = 2; // max trades allowed for pyramiding
extern double stop_loss = 50; // stop loss
extern double take_profit = 200; // take profit
extern bool useTrailingStop = false; // use trailing stop
extern double trailing_stop = 10; // trail stop loss
extern bool useUnprofitExit = false; // exit trade when trade was not in profit in defined amount of bars
extern int maxUnprofitBars = 5; // amount of bars not in profit

Example of using optimization reports in an Expert Advisor.

Combines a strategy based on MA crossover with RSI and MACD confirmation by cmillion

This uses the standard Bollinger Band calculations to further calculate the width of the Upper and Lower Bands, comparing that number to the Max and Min width of the bands for the last N periods. The results are plotted onto a histogram.

This script reads your unread GMail messages.