Shmendridge C7MT4 Channel Breaks
- Simultaneous Multi-Signals, Multi-Symbols and Multi-Timeframes. Please email me for ALL settings: firstname.lastname@example.org
- I am constantly seeking new signals and improving old ones to maintain and improve the edges in my updates to this EA
- Extraordinarily robust (wide range of settings produces positive results over long testing periods during optimizations and across different broker feeds and timeframes)
- Built-in anti-curve fitting features for extremely robust optimizations (Time Dilation testing, Monte Carlo testing and Jiggle testing)
- No martingale or other suspicious/dangerous MM
- No suspicious open trade drawdowns. Standard broker stop-loss placed on all orders
- No hard-coded tricks to fit past data
- Settings working across multiple timeframes and markets nicely
- Very simple and safe money management by percent of account equity
- This EA is a powerful tool that will probably live forever in your trading arsenal
- Less than 1/3rd of the price of other incredible EAs
This EA is a Multi-Signal, Multi-Time frame, Multi-Symbol robot which plays Donchian Channel breakouts, Trendline breaks, Traders Pivot signals, Keltner Channel breakouts and more. Email me for all the settings email@example.com. It has unique ways of calculating the channel width, channel/trendline touch points, entry, SL and TP and adapting to volatility. The trailing SL can utilize "big round numbers" as protection from premature stop-outs. The built-in anti-curve fitting features yield a high correlation between the results in sample backtest and the output of a sample forward test on many markets and timeframes.
I use 3rd party software, experimentation and am often researching traders forums always looking to try, improve and add new signals for my updates to this EA. (New signal ideas always welcome.)
I am using this EA on my own live account but I don't have much initial capital, so I will sell some copies of this to give my trading account a little boost.
- Symbols - number of symbols from the symbols list to run simultaneously. (Multi-Symbol mode only works live. MT4 Tester can not do multi-symbols.)
- symbol0..symbol30 - symbols list
- timeframes - number of timeframes from the timeframes list to run on simultaneously.
- timeframe0..timeframe5 - timeframes list
- method - trading signal type to trade:
- dchan - Donchian channel signal, places orders at channel edges
- ichi_E - Ichimoku cross signal
- kelt - Keltner channel signal
- trln - trendline break signal
- mal - places stop or limit order on moving average
- pivma - pivot trading signal
- psar - SAR indicator signal
- FREQUENCY - number of seconds to wait in between main program calls
- magic - Magic Number
- Lots - Percent. Lot size calculation is always this percent of account equity.
- AlwaysMinLot - Force at least a minimum lot order execution even if it means higher risk than specified in Lots.
- Enter - 0 = enter with stop order, 1 = enter with limit order
- maxorderage - keep pending entry orders active for this many bars
- maxposage - number of bars to hold a position open before exiting
- maxspread - expressed in volatility units. If triggered, will remove all pending orders temporarily to protect from slippage due to low liquidity
- stoploss - stop loss expressed in either ATR or Bollinger Band Percent (depending on the "factor1" setting, see below.)
- takeprofit - take profit expressed in either ATR or Bollinger Band Percent as defined below.
- Chanlength - length of channel expressed in bars
- Chanwidth - width of channel expressed in either ATR or Bollinger Band Percent depending on the "factor2" setting (see below)
- chancore - Channel core expressed in either ATR or Bollinger Band Percent depending on the "factor2" setting (see below)
- keltS - width of the Keltner channel expressed in factor1 (either ATR or BB units)
- F1type - Factor 1 definition. Can be set to either "1 - bbF" (percent of bolinger band) or "0 - atrF" (ATR). This is the measurement that the SL, trailing SL and pad are expressed in.
- F2type - Factor 2 definition. Can be set to either "1 - bbF" (percent of bb) or "0 - atrF" (ATR). This is the secondary measurement i.e. that the channel width is expressed in.
- FnumTP - whether to us factor 1 or factor 2 to express the take profit measurement.
- UseMacdFl: if 'true', MACD filter is used
- UseMAdifFl: if 'true', it will use the moving average difference filter
- UseDayBarFl - if true will only open trades outside of the previous days range
- UseATRfilter - if true will use the ATR filter
- fixed bug in commission report at end of test.
- added more stops error checking and error reporting.
-Added No15Trades: if true will not trade on the 15th of any month.
-Added trailTP: if non 0 will trail the tp on a losing trade based on ATR units.
-Fixed bug where positions weren't being aged. (All strategies which trade specific hours only will need to be retested)
-Added UseATRfilter, PointsTF, MaxPointsATR, MinPointsATR
If UseATRfilter is true than only trade while the ATR reading from the timeframe PointsTF is between MaxPointsATR and MinPointsATR in points.
-Added UseADXfilter_x, ADXfilter_x_TF, ADXfilter_x_p, ADXfilter_x_v
If UseADXfilter_x is true then only trade if the ADX reading from the ADXfilter_x_TF time-frame and ADXfilter_x_p period is lower than ADXfilter_v_p.
-Added variable mintouchptdc: minimum touch points to define a channel level
-Added variable dctol: tolerance in ATR to define a touch point.
- Added 'cyclehours' - if not 24, it will trade only the 'cyclehours' hour (allows using the optimizer to step through each hour 1 hour at a time).
- Added Monday-Friday - if 'true', the EA trades on that day.
- Added UseDayBarFl - if 'true', the EA uses the day bar filter.
- Added UseH4BarFl - if 'true', the EA uses the H4 bar filter.
- Added UseH1BarFl - if 'true', the EA uses the H1 bar filter.
- Updated/optimized the default settings.
- New "every tick mode". Set FREQUENCY=0 for "every tick mode" (only for single currency strategies).
- The default settings are now M5 scalp settings. A low transaction cost and 0 stop level are required.
- Fixed divide by 0 bug if point and tick size report 0.
- If timframe of EA settings does not match a timeframe of the tester, the tester timeframe is used with warnings.
Added: 8 different trailing stop methods
-exBRN the original big round number trailing stop
-exHiLow trails on the last hi/low of the last x bars.
-exDHiLow trails on the last daily hi/low of the last x daily bars
-exIchi trails on the x line of the ichimoku indicator.
-exKelt trails on the keltner channel line of x bars.
-exHeiken trails on the heiken ashi hi/low of x bars.
-exDHeiken trails on the daily heiken ashi hi/low of the last x daily bars.
-exPsar trails on the SAR indicator.
[x=trailstop*10; one should optimize trailstop as follows: start 0.1 step 0.1 end 1.2]
added: 3 new signals
-mal places entry orders based from a moving average. signal always fires.
-pivma when moving average is higher than a traders pivot level it will go long and vice versa for short. places orders on a moving average.
-psar places entry orders based from the SAR indicator. signal always fires.
-trailtype select one of the trailing stop methods above.
-pivttype select one of the traders pivot levels for the pivma signal only.
-pvTF select a larger time frame for the traders pivots to be calculated from.
-psar1 step of the SAR for the psar signal only
-psar2 max for the SAR indicator psar signal only
- Fixed maxspread was not expressed in % of ATR as intended.
- Added on chart comments to show various info.
- Added slippage reported to logs and push notifications.
- Fixed order and position age calculation during initialization.
- Fixed an error where exitafterpeak would not exit after peak trading hours.
- Added: pending orders are removed but open trades are kept open (but not managed) during non-peak hours if both exitafterpeak and opentradepeakonly are 'true'.
- maxspread is now expressed in percent of ATR instead of points.
Re-initializing the EA no longer triggers exits of positions on the next bar.
- method kelt: Keltner channel breakout signal
- method trnln: pattern recognition signal
- ENTERTYPE EnterWithLimit and EnterWithStop: entry methods
- OnlyPlaceWhenClose: if 'true', it will not place any orders at all until price gets closer to the entry price
- ReverseSignal: if 'true', reverses long and short entry prices.
- alwaysforceorder: if 'true', it will place an order regardless of how far price has moved past the target entry price
- keltS: width of the Keltner channel expressed in factor1 (either ATR or BB units)
- mintouche: minimum extremity of touch point expressed in bars
- mintouchpt: minimum touch points for each trendline
- Shortest: shortest segment allowed within the trendline
- ttol: tolerance for precision of a straight line expressed in factor1 (either ATR or BB units)
- bounce: minimum bounce away from trendline for each touch point expressed in factor1 (either ATR or BB units)
- anglefilter: if 'true', it will not allow long signal on an up slope nor a short signal on a down slope
- maxage: maximum age allowed for any trendline without a new touch point expressed in bars
- patd: if not 0, then it is the maximum distance between upper and lower lines allowed to produce a signal expressed in factor1 (either ATR or BB units). If 0, then only one line produces a signal
- UseMacdFl: if 'true', MACD filter is used
- MacdFl1: MACD filter period 1
- MacdFl2: MACD filter period 2
- MacdFl1: MACD filter period 3
- UseMAdifFl: if 'true', it will use the moving average difference filter
- MAdifP: MA difference filter period
- MAdifT: tolerance (distance between the current price and the MA) expressed in factor1
- MAdifM: moving average method for the MA difference filter
- Padding added (0.1 ATR) to the replace order sequence (To prevent a replace sequence ending in "market too close" before the orders can be replaced.)
When the "Tenkan" Ichimoku indicator crosses the "Senko" Ichimoku indicator and the highest high or lowest low of the last x th bars is broken, then it places a stop entry near (+/- padding) the moving average.
fixed Bollinger Band factor calculation.
method=ichi_E - to run the new ichi-E signal, default is dchan which runs the original channel signal
BarFraction - the fraction of a bar used to determine how long to wait between main program calls. It is an alternative to FREQUENCY. In case you want to run the main program every 1/4 of a bar for instance, you would set BarFraction to 0.25 and FREQUENCY to 1. It is only useful on the new ichi-E signal
PreCheckFraction - if true, it will not even execute order management or spread check functions until BarFraction is satisfied. Used to save CPU during optimizations
adjustorders - if true, it will continue to adjust pending orders once placed
checkdifonnewbar - if true, it will only adjust pending orders on a new bar
checkpatternonnewbar - if true, it will only place new orders on a new bar
usecurrentbar - if true, it will use the current bar in factor 1 calculations. It will be quicker to adjust to market conditions if true.
exitfriday - if true, it will close positions and orders on Friday at "exitfridaytime" hour
opentradepeakonly - if true, it will only open new trades during peak hours defined by "peakbegin" and "peakend"
exitafterpeak - if true, it will exit positions after peak hours defined above
AlwaysMinLot - if true, it will always open the minimum lot size. If false, it will not open any order, which would exceed your risk percent by 2x even if that means not opening any orders at all
Tenkan1 - the first period of the "tenkan" ichimoku indicator (ichi_E signal only)
Tenkan2 - the second period of the "tenkan" ichimoku (ichi_E)
Tenkan3 - the third period of the "Tenkan" ichimoku (ichi_E)
IchiB - the buffer number to use from the "Tenkan" ichimoku indicator (ichi_E)
Senk1 - the first period of the "Senko" Ichimoku (ichi_E)
Senk1 - the second period of the "Senko" Ichimoku (ichi_E)
Senk1 - the third period of the "Senko" Ichimoku (ichi_E)
IchiSB - the buffer number to use from the "Senko" ichimoku indicator (ichi_E)
Ma1 - the periods to use for the moving average (ichi_E)
Ma1m - the type of moving average (ichi_E)
spaceB - the number of the last bars, of which all the highs or lows must be broken to complete ichi_E signal (ichi_E)
Removed SL from max spread calculation.
Fixed critical bug: when running multisymbols the ATR and BB were sometimes bleeding into the next symbol.
symbols - number of symbols from the symbols list to run simultaneously (multi-symbol mode works live only on mt4. mt4 Tester can only run one symbol at a time)
symbol0..symbol30 - symbols list
timeframes - number of timeframes from the timeframes list to run on simultaneously
timeframe0..timeframe5 - timeframes list
FREQUENCY - number of seconds to wait in between main program calls
magic - Magic Number (now plays nice with other EAs and other instances of itself on the same symbol as long as the magic number is unique)
CheckMargin - check margin before placing an order. You may turn it off to increase performance in the Tester
slippage - maximum allowable slippage (if the broker allows such a setting)
maxspread - maximum spread allowed before it triggers safety mode and closes all pending orders temporarily
Lots - risk expressed in percent
stoploss - stop loss expressed in "factor1" (see below)
takeprofit - take profit expressed in factor defined below
trailstop - trailing stop loss expressed in "factor1" (see below)
trailpadding - padding of the trailing stop loss expressed in "factor1" (see below)
BRNTrailadj - adjuster used in the calculation of the frequency of the "big round numbers". A higher number is further apart big round numbers. This is a complex algorithm
Chanlength - length of channel expressed in bars
Chanwidth - width of channel expressed in "factor2" (see below)
chancore - channel core expressed in "factor2" (see below)
pad - pending order padding expressed in "factor1" (see below)
dchanmaxorderage - maximum order age of pending orders expressed in bars
dchanmaxposage - maximum position age of an open position expressed in bars
lotchngsense - minimum percent change of the lot size before an order replace sequence occurs
tpchngsense - minimum percent change of TP distance before an order modify or replace sequence is triggered (with the exception of a shrinking channel). In case the channel gets tighter/smaller, the order will always adjust)
maxadjDistance - expressed in "factor1" (see below), the market price must be within this price range for an order replace or order modify sequence to take place
F1type - Factor 1 definition. It can be bbF (percent of Bollinger Band 1) or atrF (ATR 1). This is the measurement of the SL and trailing SL are in
F2type - Factor 2 definition. It can be bbF (percent of Bollinger Band 2) or atrF (ATR 2). This is the measurement of the channel width, core and pad are in
Fbars1 - bars for the factor 1 calculation
Fbars2 - bars for the factor 2 calculation
bbd1 - Bollinger Band 1 setting
bbd2 - Bollinger Band 2 setting
Fnum TP - whether to use factor 1 or factor 2 calculation for the take profit factor
Cspreadmode - custom spread mode. It can either be csADD to add points to existing spread to simulate a wider spread or csMIN to be a static minimum spread. The balance is adjusted with the withdrawal function of Tester to replicate this larger spread. Use it to factor in additional commission and slippage to make sure your strategy/settings are robust
CustomSpread - custom spread expressed in points
TesterMinTrades - minimum trades used to calculate custom score of tester
MaxDchanWrat - maximum width to length ratio of the channel. It will error on init with the incorrect parameters message if this ratio is higher
MinDchanWrat - minimum width to length ratio of the channel. It will error on init with the incorrect parameters message if this ratio is lower
randFmode - it can be "scndtf", which will apply a change to the factors of all timeframes other than the timframe0. (It can be used to force a jiggle test on each frame if used in combination with a multi-timeframe optimization where all timeframe0..timeframe5 are the same, see below). It can be "all" which will change the factors of all timeframes including the timeframe0. It can be set to "off" as well
distributionmode - it can be "randD" which will make any factor changes random for a Monte Carlo effect or can be "evenD" which will make any factor changes evenly distributed (see below)
RandPercent - maximum percent of change applied to the factors when rand mode is on. This effects both randD mode and evenD mode
ScndTFadj - risk multiplier for the secondary timeframes. 1.0 means risk will be the same across all timeframes
Additional notable changes:
- Is now multi-symbol and multi-timeframe capable. Combination of rand modes and multi-timeframes uses include Monte Carlo mode and time dilation mode for robustness (see below)
- Orders are not arbitrarily contracted inwards unless the core requirement is met for the new width.
- Is now timer based. Main program is not called on each tick. Main program is called depending on FREQUENCY setting instead.
- Bolling Band percent instead of ATR can now be used as a factor to express the TP, SL, channel width and core settings.
- Order change sensitivity is now highly configurable in case your broker does not like the pending order spam.
- Is now very easy for me to add in new patterns, filters and other features so look out in the future for big additions.
Examples of Setting Combos:
Built in jiggle test during optimization for robustness: There will be 4 extra "5 minute runs" for each frame where the factors (effecting channel length, width, SL, TP, core etc.) are +6.25%, +12.5%, -12.5%, -6.25% making sure a wide range of similar settings are profitable during optimization:
timeframes - 5
timeframe0..timeframe5 - 5 minutes
randFmode - scndtf
distributionmode - evenD
RandPercent - 25
Monte Carlo 10 slightly adjusted (+/-12.5%) frames for verifying robustness of settings after optimization is complete:
Turn optimization on for FREQUENCY only (start 50 up to 500 to make the 10 frames)
randFmode - all
distributionmode - randD
Use "Bollinger Band 1 Percent" to express stop loss and trail and use "ATR 2" to express channel dimensions and TP:
- If spread becomes volatile, orders are adjusted regardless of whether it is a new bar or not.
- SpreadBars is now hundreds of ticks instead of bars.
- Fixed New Channel bug.
- Updated default settings
-fixed invisible tighter stops (when sl is set tighter than stop_level) as they were not triggering correctly. This would not effect any of the official .set files though as I do not release settings with overly tight sl.
-added: InitiateAddToEquity-if a terminal global variable called "ADDTOEQUITY" does not yet exist then it will be created with the value of InitiateAddToEquity.
-now uses ADDTOEQUITY terminal global variable which will be included in lot size calculations. You may change it freely.
-reduced aggression of the safety alert and added line breaks for easier viewing.
- Fixed bug where "spread too wide" was sometimes not triggering.
- Implemented ultra tight stops. Now, a stop loss can be even tighter than allowed by the broker via an additional invisible stop loss handled within C7.
- Added: RestrictToDaily. If true, it will prohibit any pending orders from being placed within the previous days range (used for experimenting with some M1 settings).
- Minor bug fix for ultra tight stops.
- Added warning for a stop too tight for stop_level.
- Added more delete order error handling.
- Added AddToEquity input. Manually enter extra equity you would like to be included in the lot size calculation.
- SWINGOUTRATIO - the ratio of the true channel core that a swing must protrude in order to be calculated as a swing.
- ExpressCore - the expression of the CHANNEL_CORE. It can be Percent or ATR.
- Frequent readjustments of orders.
- Arrows now indicate Channel walls and core positions.
- Timeframe added to order comments (user request).
- Checks Description(d99) setting for matching timeframe and symbol for safety (user request).
- Now checks at initialization after a reset if there was supposed to be an order placed since the last new high/low. If so, places the order. That way, if you miss an order because your computer crashed, it will still place the order when you reset and re-init. Note that if you disconnect and reconnect and miss an order, you will have to reset the bot to take advantage of this.
- Removed STEP setting.
- Added ATR_BARS setting. The amount of bars in the ATR calculation.
- Now uses way less bars in its calculation.
- The whole algorithm is rebuilt. It is a lot more sensitive to current market conditions. It will adjust sl, tp, price and lot size based on recent volatility. Much testing shows this to have an overall increase in performance and robustness across different brokers data.
- Added the newest settings and readme doc to the comments area. Please read before using.
- Now the auto back order mechanism runs each time a new channel is detected. Much testing shows more trades/better performance.
- Fixed a small bug causing lot sizes to be slightly off as the spread was not being included in the formula.
- Fixed other small bugs.
- Added SWINGPOINTONLY flag. Only channel walls defined by swingpoints will form a channel wall if true.
- Improved PUREDD mode to improve forward test and back test correlation.
- Updated default settings to freshly optimized (Feb 24th/2014).
Message me for newest settings for other pairs.
Converted all pip inputs to be based in ATR/StdDev instead of pips.
- STOP_LOSS, STEP, ALLOWANCE, CUSION, BRNSTOPLOSS, TAKE_PROFIT, CHANNEL_CORE, TRAILING_STOP, MINSWINGOUT, MAXCHANNELWIDTH are now expressed in ATR.
Added big round number trailing stop system.
Added new inputs:
- PUREDD to turn on optimization by pure balance relative drawdown %.
- PUREPFW weight of PF in PUREDD mode.
Various bullet proofing.
- New optimized default settings for EUR M5.
Optimization paragraph on product page should now read:
Mostly profitable results are returned by the tester when these parameters are optimized in this fashion on EUR M5 from the last 8 years:
MINSWINGOUT - 0.5 to 20.5, step 5
MINSWINGSPACE - 50 to 200, step 50
MAXSWINGSPACE - 250 to 2000, step 250
MINSWINGS - 2 to 3, step 1
ALLOWANCE - 0.2 to 1.8, step 0.4
MAXCHANNELWIDTH - 30 to 180, step 30
CHANNEL_LENGTH - 96 to 2400, step 96
CHANNEL_CORE - 5 to 10, step 1
NOCHANNELBARS - 10 to 510, step 100
STOP_LOSS - 1 to 5, step 1
TAKE_PROFIT - 25 to 45, step 5
TRAILING_STOP - 2 to 18, step 4
STEP - 0.1 to 0.3, step 0.1
CUSHION - -0.5 to 1, step 0.25
BRNSTOP - true
BRN - 0.0005 to 0.001, step 0.0005
BRNSTOPLOSS - 1 to 6, step 1
LOT - 0.1
LOT_TYPE - Percent
This is a very coarse optimization for minimal curve fitting.
Bugfix of swingpoint. Was not performing as designed.
Improved volume corrections on existing pending orders.
SWINGTYPE. Experimental swingpoint definitions.
MINSWINGOUT. Now consolidated with CHANNELCORE.