Sunday, October 19, 2008

Enhanced BASIC Synergy FOREX EXPERT ADVISOR

** DOWNLOAD EA



Introduction

The Synergy forex Trading Method was developed by Dean Malone and is an effective Forex trading method developed to simplify trading decisions with high probability forex precision. It combines the forex market forces of Price Action, forex Trend, Momentum and Market Strength to produce higher probability trades. The Synergy forex trading method depicts...in real-time...the interaction of these forex market forces providing traders the means to make forex trading decisions with greater confidence and less emotional hassle

With Synergy, traders identify and use two important forex trading components in real-time: Price Action and Sentiment.Price Action is forex market movement, such as the oscillation of Open, High, Low and Close prices. Too often, forex traders are mesmerized by trivial price fluctuations and lose sight of the underlying trend of the market. Many traders tend to jump in and out of the forex market instead of staying with the trade as a forex trend develops. Synergy is designed to eliminate price distortions. It reveals periods of forex market strength and trend and periods of consolidation. Sentiment is the intuitive feeling or attitude of traders and forex investors in the forex market. For example, if the sentiment of the market is bullish, then forex traders and investors expect an upward move in the market. Often, sentiment is an indication of optimism or pessimism in the forex market based on recent news announcements or political events. The Synergy forex method uses a hybrid custom forex indicator developed to show positive (buyers) sentiment or negative (sellers) sentiment. Working in unison, Price Action and Sentiment give forex traders a distinct trading advantage. When both are in agreement, a favorable forex trading condition exists. For instance, when price action is showing upward movement with buyers’ sentiment, there is higher probability of a Long position having a favorable outcome. Similarly, when price action has a downward forex movement in conjunction with sellers’ sentiment, a short position has a favorable outcome.

The forex EA was developed by Derk Wehler in Forex-tsd forum to eliminate the stress of gluing to the PC for 24hours looking for trading forex opportunities.

INSTALLATION INSTRUCTIONS: Unzip the file into some temporary folder.Best to shut down your trading forex platform, and then... From there, put the files in these locations: SynergyEA.mq4
> ...\expertsLibDerksUtils.mq4 -> ...\experts\librariesLibOrderReliable.mq4 -> ...\experts\librariesLibDerksUtils.mqh -> ...\experts\includeLibOrderReliable.mqh -> ...\experts\includeSynergyInd.mq4 -> ...\experts\indicatorsHeikenAshi_DM.mq4 -> ...\experts\indicatorsTraders_Dynamic_Index.mq4
> ...\experts\indicatorsChaikin's Volatility_Kalenzo.mq4
> ...\experts\indicators

When you start back up your platform, everything should compile.If you have troubles, you can try compiling manually, by opening your meta4 editor (from your forex platform), and loading and of the .mq4 files listed above and hitting the "Compile" button. You should have no errors or warnings.


EXPLANATION OF SETTINGS FOR FOREX EA

The SynergyInd uses mostly the same settings; the ones that differ are self-explanatory, so although this document only covers settings for the forex EA, it should help you set up the SynergyInd as well.


FOREX MONEY MANAGEMENT SETTINGS

TYPE NAME DEFAULT SETTING
Bool UseMoneyManagement false
Bool UseDualWinMM false
Double TradeSizePercent 3.0
Double ScaleInPercent 25.0
Int MaxScaleIns 0
Bool SplitOrder true
Double Lots 0.2
Double MinLots 0.01
Double MaxLots 100.0

UseMoneyManagement: If enabled, it will calculate how many lots to trade based on TradeSizePercent, but will never trade less than MinLots or more than MaxLots.

The way it calculates how much to trade depends on how much information the EA has about those trades. If you have entered a StopLoss value greater than zero, or if you have enabled UseOppPAC_Trail and OppPACforInitSL, then the forex EA will use an initial stop loss when it places the trade. Given that info, it can calculate worst-case scenario (trade goes against you and hits stop loss) and uses a lot quantity such that, if you lose, your forex account will end up losing TradeSizePercent.

If it has no StopLoss set (zero), then it has to use a different form of calculation (the one many forex EAs use as a standard), but using your margin requirements and your forex account leverage.

In general you will find that if you have a zero StopLoss, you will probably want to use a higher TradeSizePercent, and if you are using a StopLoss (or UseOppPAC_Trail with OppPACforInitSL), then you want a much lower TradeSizePercent; probably 3 or 4 times lower. Ex: No SL, try 5 - 15%, is using SL, try 1 - 5%.
UseDualWinMM: This enables a type of forex money management also known as the binary money management forex system, as pioneered by a 17th century mathematician named d'Alembert. Its full explanation is beyond the scope of this forex manual, but basically this is a system by which the user will always end up “one unit” ahead once the forex EA wins two trades in a row.

This forex system is meant for forex EAs that only enter one trade at a time, so if you set MaxScaleIns to anything but zero, you will get unexpected results, as you likely also shall if you enable UseSplitLots. In addition, the TakeProfit value must be known at the time the trade is placed, so the author does not recommend it’s use in this forex EA, as he feels the forex system works much better utilizing settings incompatible with this option.

TradeSizePercent: Explained above.

ScaleInPercent is the percentage it will use to calculate how many lots to forex trade on any scale-in trade, and is based off the original trade. So if ScaleInPercent is 25.0 and you have an initial trade with a size of 0.8 lots, then each additional trade in the same direction will be placed with 0.2 lots.

MaxScaleIns is the number of additional trades in the same direction that you want the forex EA to take, should it get a continuation forex signal. A continuation signal occurs, for long forex trade, when the TDI green line moves above the top blue Volume line, and is between the values of 50 and 68. For short trades, when the green line is below the lower blue Volume line and the green line’s value falls from 32 to 50.

SplitOrder: When the forex EA gets an entry forex signal and this is set true, it will split the trade into two forex trades for half the lots each. One of them will have no take profit value, and the other will have a take profit depending on the TakeProfit setting. Therefore, one half your trade will exit when it hits take forex profit, and the other half will go until closed by either the PAC trail (assuming you set “UseOppPAC_Trail” to true), or the stop loss / trailing stop function, or the forex ATR exit is enabled, or due to the entry of a trade in the opposite direction.


Lots: The number of lots to use per trade. If SplitOrder is true, then it will open two orders, each at Lots/2. If you are using MoneyManagement, this setting is ignored.

MinLots, MaxLots: These are used with MoneyManagement, and explained in that section.



FOREX INDICATOR SETTINGS

TYPE NAME DEFAULT SETTING
int UseEntry68_32 0
int ReqRedYellowCombo 0
int UseVolExpanding 0
double UnlessVolWidthGT 0.0
int ReqEntryNearPAC 1
int UseHTF_Trend 0
int UseSmallerOrOpp 0
int UseSmallerExit 0
double DefineSmaller 0.08
int UseClosedInside 0
int UseTDI_ExitDir 0
int UseOppPAC_Trail 1
int OppPACforInitSL 0

UseEntry68_32: For a forex signal to occur, one of the requirements is for the green line to be above 50 for long, or below 50 for short. If this is enabled, the green line is also required to be below 68 to forex signal a long trade, and above 32 to signal a short forex trade.

ReqRedYellowCombo: If enabled, this setting requires the red TDI line to be above the yellow line to forex signal a long trade, or below it to signal a short.

UseVolExpanding: Enabling this setting will require that the blue TDI volume lines be diverging in order to forex signal a trade (with exception of “UnlessVolWidthGT” below).

UnlessVolWidthGT: If UseVolExpanding is enabled, and this value is non-zero, then the “expanding volume” rule will be ignored so long as the width of the blue volume bands is greater than this number. The intention here is that sometimes the volume bands are parallel, or converging just slightly, but still far apart, indicating enough sustained volume for a good forex trade.

ReqEntryNearPAC: If this setting is enabled, an otherwise valid forex trade will not be entered if the entry point is farther from the closest PAC line than the width of the PAC itself. The reasoning is that sometimes there is a large forex breakout (e.g. news announcement) where the candle is very large, but the forex strategy, which always lags somewhat, does not forex signal a trade until after that candle has already moved most of it’s distance, or even until a following candle. Often after this occurrence, the price loses momentum or retraces and then stops out at a loss. So this forex setting as to attempt to stay out of such trades, which are triggered by drastic movement.


UseHTF_Trend: This setting, “Use Higher Time Frame Trend”, if enabled, will only allow a trade to be entered if it is in the same direction as the “trend” of an upper timeframe. If set to zero, it is disabled, otherwise it should be set to the higher timeframe (in minutes); e.g.:

60 Hourly
240 Four Hour
1440 Daily
10080 Weekly
43200 Monthly



UseSmallerOrOpp: If this is enabled, the forex EA will check at the open of each candle, and will exit a trade if the previous Heiken Ashi candle is the opposite color from the one preceding it.

UseSmallerExit: If this is enabled, and UseSmallerOrOpp is enabled, then the forex EA will also close the trade if the previous candle is the same color as the one preceding it, but is much smaller than the previous one. How much smaller? See DefineSmaller.

DefineSmaller : This is the multiplier used to determine what “smaller” is, for use with UseSmallerExit, above.

UseClosedInside: If this is enabled, the forex EA will check at the open of each candle, and will exit a trade if the previous forex Heiken Ashi candle closed within the PAC.

UseTDI_ExitDir: If this is enabled, the EA will check at the open of each candle, and will exit a forex trade based on the previous candle’s TDI values as follows:

For longs, it will exit if the green line is greater than 68, but below the red line and the upper blue line.

For shorts, it will exit if the green line is less than 32, but above the red line and the lower blue line.

UseOppPAC_Trail: When this is enabled, the EA will check at the open of each candle, and will exit a trade if the closing price of the previous (just-closed) candle is outside the opposite side of the PAC. This serves to act as a sort of trailing stop, with the unique feature that it will only act on the closing price of the candle. Therefore the price can spike, beyond the opposite PAC, but if it returns before it closes, the order will not exit.

OppPACforInitSL: If this option is enabled, rather than use the StopLoss setting as the initial stop loss for the trade, the forex EA will use the opposite side of the PAC (plus the spread) as the initial stop loss point.


FOREX ATR EXIT SETTINGS

TYPE NAME DEFAULT SETTING
bool UseATR_Exit false
int ATR_Period 5
double ATR_PipMult 4
int ATR_MinPips 50
int ATR_MaxPips 500

The ATR Exit is a simple forex method of trying to let the forex market’s movement tell the forex EA where to set take profit. It works by setting the take profit value to be a certain multiple of the current ATR value. The ATR is Average True Range, and it is basically just a moving average of the range (high – low) of the last “X” candles. Here, by default, I use an forex ATR period of 5, so “X” is 5 candles. So, to give a simple example, if the average range of the last 5 candles is 12 pips, and your ATR_PipMult is set to 4, it sets the take profit at 48 forex pips.

However, the ATR values is always changing, so if the forex market is moving rapidly in one direction, the current candle is probably larger than the previous one; the ATR value is increasing and so is the number of forex pips required for exit. But then as the candles get smaller again (forex market slows), the required take profit value starts to decrease… but meanwhile, the actual forex trade profit has increased, and when the two meet, it exits the trade.

The ATR rarely (essentially never) captures the maximum amount of forex pips that were available on the move, but it does tend to capture most (perhaps 70-80%) of it, and it keeps you from having to use a set take forex profit value, when you don’t know how much the forex market may move.

The optimal situation for the ATR stop is where the market goes in a positive direction for a while, making some larger candles, but then trails off near the top of the move, flattening out and making smaller candles. The worst situation is there the candles move in a positive direction, making bigger candles, but then changes direction and makes equally large candles coming back down. In these cases, the ATR will not be able to secure those pips; it will stay in the forex trade and the profits will be lost as it retraces.

While you are certainly welcome to adjust the ATR_Period setting, the author has always just left it at 5; you wouldn’t want it much longer because it would not be responsive enough. The important variable to experiment with here is the ATR_PipMult. Depending on forex currency pair and timeframe, you may wish to adjust this anywhere from 2.0 to 40.0, but the author recommends you try a value of 4 to 7 to start with. Basically, the higher this value, the more pips the forex EA will demand from the trade. Please play with this first on a forex demo account, or better yet, run a visual backtest to get a feel for the ATR_PipMult setting.

SL, TP & TRAIL EXIT SETTINGS

TYPE NAME DEFAULT SETTING
int StopLoss 0
int TakeProfit 100
int TrailingType 3
int TrailingValue 0
int FirstMove 100
int FirstSL 100
int SecondMove 0
int SecondSL 0
int ThirdMove 0

StopLoss is the initial stop loss assigned to each trade. If zero, no stop loss is used. Please see various other related settings above, especially UseOppPAC_Trail, which will override this forex setting.

TakeProfit is the set amount profit to use for each trade. If zero, no set take profit is used, and exit will instead occur based on one of the following:

The Price Action Channel, if UseOppPAC_Trail enabled

The trailing stop, if TrailingStopType and supporting settings are enabled

The ATR stop, if UseATR_Exit is enabled

The Heiken Ashi candle color, size or closing value, depending on the settings of UseSmallerOrOpp, UseSmallerExit, DefineSmaller and UseClosedInside.

The position of the TDI forex indicator lines, depending on the settings of UseTDI_ExitDir,

Entry forex signal in the opposite direction of the current trade

Please read this entire manual for information on these settings.


TrailingType: This is for use with any of the various kinds of trailing stops available to you. At the time of this writing, there are 6 different types of trailing stop available.

They are explained here:

Type 1:
Moves the stop loss without delay (pip for pip).


Type 2:
Waits for price to move the amount of the trailing stop (TrailingValue) before moving stop loss then moves like type 1. The only difference between this and type 1 is that this one will not initially move the SL until the it would be set at breakeven.


Type 3:
Uses up to 3 levels for trailing stop, and utilizes these additional parameters:

FirstMove: When the forex trade is in profit this much...
FirstSL: Move SL this far from the current price

SecondMove: When the trade is in profit this much...
SecondSL: Move SL this far from the current price

ThirdMove: When the forex trade is in profit this much...
TrailingValue: Use this value & trail like Type 1

One of the unique qualities of a type 3 (or type 5) is that you do not have to use it all. For example, if you just want it to start trailing by 15 pips once it gets to 90 in profit, just set:

TrailingType = 3
TrailingValue = 15
FirstMove = 0
FirstSL = 0
SecondMove = 0
SecondSL = 0
ThirdMove = 90

Or, if say you do not want it to trail at all, but you want to lock in 50 forex pips when the profit reaches 80, and want to lock in 130 pips if the profit reaches 180, then you would set:

TrailingType = 3
TrailingValue = 0
FirstMove = 80
FirstSL = 30
SecondMove = 180
SecondSL = 50
ThirdMove = 0


Type 4:
Ratchets the SL up:
e.g. if SL = 20, and open price is 1.2400, then
when price reaches 1.2420, SL is set to 1.2400; when
it gets to 1.2440, SL is moved to 1.2420, etc.


Type 5:
Same as Type 3, except after 3rd move, it ratchets like type 4


Type 6:
Keltner Channel Trail
Uses various Keltner Channels as check points;
When it hits the next higher (for buy) channel
point, sets the stoploss to the previous
channel point. Default "K" values for Keltner
indicators are: 4,5,6,8,10,12,15,18,20

AUTHORS NOTE: If you are confused by all these trailing options, forget about them. The forex EA uses a trailing function from my library; all my forex EAs have it. But that doesn’t mean it’s best to use all of it. For this EA so far, I have only tried a “standard” type 2 trail, TrailingType = 2, TrailingValue = 100 (or whatever you want to trail by).

TrailingValue is the number of pips to trail by; see explanation above regarding various types of trail.

FirstMove, FirstSL, SecondMove, SecondSL, ThirdMove: See trailing types 3 and 5, explanation above.


GENERAL SETTINGS:

TYPE NAME DEFAULT SETTING
bool UseAlert false
bool UseEmail false
int Slippage 1
int MagicSeed 28000
string ExpertName "SynergyEA"
int DebugLevel 5

UseAlert, if set to true, will pop up an alert window when the forex EA enters or exits a trade.

UseEmail will send an email when the forex EA enters or exits a trade. This will only function if you have correctly set up your email settings in your platform.

Slippage is the amount you will allow your broker to "slip" the price, on entry or exit. Common to most forex EAs.

MagicSeed is just any number you want to enter, or leave at default. The forex EA will use this as a base, then add a unique number to it based on the forex currency and timeframe, and will use this end number to "tag" trades, so it (and other EAs) know which forex trades were opened by it. Magic numbers are used with all forex EAs.

ExpertName is simply the text that will appear as the comment on each trade the forex EA makes.

DebugLevel sets a level, from zero to 5, which controls how much info gets printed to the experts tab. I have left it defaulted to 5, but after you are satisfied that the forex EA is working as it should, I recommend you change to zero so that it will print nothing extraneous to the experts tab.


2 comments:

  1. Wow what winderful and informative article here it will help lot for newbie. I've open a demo account in zforex.co.uk and I think it is best to learn from demo first and then try with real.

    ReplyDelete
  2. I would like to suggest that you trade with the highest ranking Forex broker - AvaTrade.

    ReplyDelete