Showing posts with label forex ea. Show all posts
Showing posts with label forex ea. Show all posts

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.


Thursday, October 9, 2008

Forex Education - Forex EA Testing Setup and Procedures

1. Setting up a platform for testing:

· To test numerous forex trading EA’s or forex currency pairs, we want to setup and name a different platform for each forex EA and currency pair. When naming the platform, it may be best to name each platform with the forex currency pair that you are testing and from this time forward use this platform to only test that forex currency pair. This may seem cumbersome but this initial work makes testing results later 1000 times easier. The rule here is 1 EA per currency pair, per time frame, per platform. This will then mean only one output to forex review with no cross forex currency results or cross time frame results to pull out before evaluating the forex trade results. Now with these actual forward traded results accumulated, we can go and back test the forex EA against these results and evaluate the back testing of MetaTrader4.
· Open the currency pair chart window for the time frame to test.
· Load the chart template file associated with the forex EA. This template shows the forex indicators that the EA uses. At the end of the testing or each week, we will save the template with a name associated with the forex EA. This will save the trades executed that are displayed for further review. This template file can be sent to anyone at this point to see how the EA traded.


2. Account setup:

· Open a new account for the forex EA on the currency pair platform to be tested. Remember, 1 EA per currency pair, per time frame, per account. So for ex., if you are testing “Ultimate” EA on the 15 min chart on 4 forex currency pairs, you will need 4 different platforms setup.
· When filling out the application to set up the account, in the name field enter the name of the EA that you are testing. Ex Name: “Ultimate EA” this will then be displayed at the top of the reports that can be printed.
· Open a standard account for $10,000.00 and trade 1 lot sizes.


3. Attach your forex EA:

· Attach your forex EA to the correct currency pair and time frame to be tested. Remember to attach the forex EA to only 1 time frame per currency per MT4 forex platform. Hopefully this will not be necessary to do in the future if we can get something like Order History working or another forex program that Mick Mick has told me about that will strip out the needed information automatically instead. For now though this is the only way I see to do these studies and to separate the forex results.

4. Weekly reporting:

· After the trading week has ended you will need to go to the terminal window and open account history.
· Right click in the account history field and choose custom period.
· Set the beginning and ending period to go from before the market opened for the week to after the forex market closed for the week. Ex. Saturday to Saturday.
· Go back to account history field and right click again and click “Save as Detailed Report”.
· Name the report with these rules to allow for easy naming. “forex EA name, forex chart time period, start date of week” Ex. Ultimate 1HR 6_3 This will quickly and simply give us the forex EA name, the forex chart period it was run on and the start date of the test.
· Email the test results that you have now saved. Include in the subject line the name of the forex EA, time period, and forex currency pair.

5. Weekly back forex testing:

· It is now at this point you will look to do the weekly back testing of the forex EA on the same forex currency pair for that time period.
· Name the report with these rules to allow for easy naming. “EA name, chart time period, start date of week, back test” Ex. Ultimate 1HR 6_3 Back test This will quickly and simply give us the forex EA name, the forex chart period it was run on and the start date of the test and that it is the back test results.
· The results of the back test will also need to be saved
· You should look to see how the results compared between the forward traded results and how the back test performed at the end of the week.
· Proper setup for back testing and the procedures involved will follow. This will include checking and confirming the data that will be used for the back test and loading the additional data if required.

Best Currency Forex Strategies and Profitable Forex Systems

Forex Automated EA - Forex strategy ...

Many thanks to Tkimble on the ForexFactory for the simple forex strategy that this forex EA is designed to manage.

Name: Rhythm Pair: Any Pair You like.

This is a simple Stop @ Reverse forex system. It should be able to be used with
Daily and weekly forex trading

Once trade is initiated the stop loss and reversals are equal. Example: the stop is placed at 40 PIPs and the reversal is likewise placed at 40 PIPs. When the stop is activated, the reversal is simultaneously activated. There is no limit on how
many reversals there can be in a day unless Max Trades variable is used

Forex EA- Variables:

Overrule Direction: = True/False forex EA makes next day forex trade decision on the basis of the previous Days forex trend (i.e.; previous day up, Place "Buy" forex market order, previous day down, enter "Sell" forex market order) Example: Yesterdays open/close positive = LongEntry) (Yesterdays open/close negative = ShortEntry) 00:00 >< 23:55 Set it to False if you want to choose your own initial entry direction

Direction Long: =True/False this is the manual way to either go Long or Short for your opening forex trade. If using this variable Overrule Direction should be set to True

EntryTime Hour: = Entry will execute on the Open of the hour chosen. 00:00 thru 23:00

ExitTime Hour: = 00:00 thru 23:00 Exit will execute on the Open of the preceding bar from exit hour chosen Example: exit set for 17:00 exit will execute on the open of the 18:00 bar.

Max Trades: = 0=False or 1,2,3,4 etc Set this variable if you want to limit on how many whipsaws you want in a day. EA will not take anymore forex trades for current day or week once variable is reached

TrailStop Once: = True/False (If set to True, Stop and Reverse order will move positive one time at the value of the Stop loss variable) Example: I am long at 1.2000 and I have my stop set at 1.1960 (-40) If price was to advance to 1.2040 then my Stop & Reverse orders would move positive to 1.2000 This would be the only positive move they would make.

Trailing Stop: = True/False (If set to True, Stop and Reverse order will move
every time price moves positive at the value of the Stop loss variable)

Stoploss: = Default 40 “Very important”. It is the Value that all Stops will use. (i.e.; TrailStop Once, Trailing Stop) It is the value that all Stop and Reverse orders are placed.

ProfitTarget: = 0=False, Default 120 If Profit Target or Time exit is not used than trade will remain open until manually closed or when Profit Target or Time exit is initiated and executed in the future.

Lots: = Default 0.1 Mini


The easiest settings for daily would be to pick your direction

Overrule Direction =True
Direction Long = True / False for short
EntryTime Hour = 00:00
ExitTime Hour= 23:00---------I have notice 16:00 and 17:00 maybe better exits
Max Trades = 0
TrailStop Once = false
Trailing Stop = false
Stoploss: = 40
ProfitTarget: = 0
Lots: = 0.1

For weekly: Just change ExitTime Hour to 0 trade will remain open

If you search: Forex Automated Reviews