Site Network: Home | Forex-TSD | Forex Factory | Kaskus

EA Universal MA

For forex traders who want to use a strategy based on Moving Average Indicator, I attach an Expert Advisor that can be set for this purpose. Basically, this Expert Advisor could be used for crossing from 2 different period and type of Moving Average but there is an option for 3 MA, too.

These are the setting parameter :

StopLoss (default 100) : Set your Stop Loss. Use 0 (zero) if you don't like to use Stop Loss ( not recommended ).
TakeProfit (default 200) :
Set your Take Profit. Use 0 (zero) if you like to use open target.

TrailingStopType (default 1)
: Set trailing stop type. 1:will start trailing if profit in pips is greater / same with TrailingStop. 2:will start trailing as soon as trade in profit.
TrailingStop (default 40) :
Set the Trailing Stop. Use 0 (zero) if you don't use trailing stop feature.

Moving Average Setting :
------------------------
FastMAPeriod (default 10) : Fast Moving Average Period.
FastMAType (default EMA / 1) : Fast Moving Average Type 0:SMA 1:EMA 2:SMMA 3:LWMA
FastMAPrice (default Close / 0) : Fast Moving Average Applied Price 0:Close 1:Open 2:High 3:Low 4:Median 5:Typical 6:Weighted
FastMAshift (default 0) : Fast Moving Average Shift
SlowMAPeriod (default 80) : Slow Moving Average Period.
SlowMAType (default EMA / 1) : Slow Moving Average Type 0:SMA 1:EMA 2:SMMA 3:LWMA
SlowMAPrice (default Close / 0) : Slow Moving Average Applied Price 0:Close 1:Open 2:High 3:Low 4:Median 5:Typical 6:Weighted
FastMAshift (default 0) : Slow Moving Average Shift

Minimum Cross Distance :
------------------------
MinCrossDistance (default 0) : Set the pip distance between FastMA and SlowMA to be consider as a valid cross. Use 0 (zero) to disable this filter.
MaxLookUp (default 1) : Set number of bar after the cross to keep checking on the entry condition in regards with the minimum distance between FastMA and SlowMA. Need MinCrosDistance > 0 to enable this feature. Use 0 (zero) to disable this feature.

Exit Setting :
-------------
StopAndReverse (default true) : If set to TRUE, will exit any trade and reverse position when signal change.
PureSAR (default false) : If set to TRUE, will use no Stop Loss - Take Profit - and Trailing Stop. This is always in play setting.
ExitOnCross (default false) : If set to TRUE, will exit any trade if there is an opposite cross without consider any additional filter. So exit purely base on moving average cross.

Third MA Setting :
------------------
UseThirdMA (default false) : If set to TRUE (and UseCounterTrend = FALSE), will only trade according to ThirdMA direction, above for BUY and below for SELL.
UseCounterTrend (default false) : If set to TRUE will keep trade even if counter ThirdMA direction, but with different StopLoss and TakeProfit. Need UseThirdMA = TRUE to enable this feature.
OnlyCounterTrend (default false) : If set to TRUE will set the EA only to trade counter trend trade, mean BUY if cross below ThirdMA and SELL if cross above ThirdMA. Need UseCounterTrend = TRUE to enable this feature.
ThirdMAPeriod (defaul 100) : Third Moving Average Period.
ThirdMAType (default EMA / 1) : Third Moving Average Type 0:SMA 1:EMA 2:SMMA 3:LWMA
ThirdMAPrice (default Close / 0) : Third Moving Average Applied Price 0:Close 1:Open 2:High 3:Low 4:Median 5:Typical 6:Weighted
ThridMAshift (default 0) : Third Moving Average Shift
CTStopLoss (default 0) : Set your Stop Loss for CounterTrend trade. Use 0 (zero) if you don't like to use Stop Loss ( not recommended ).
CTTakeProfit (default 0) : Set your Take Profit for CounterTrend trade. Use 0 (zero) if you like to use open target.

Pivot Filter Setting :
-------------------
Use.Pivot.Filter (default false) : Set to true if you like to filter the trade, only BUY if the cross of Slow and Fast MA occur between S1 and S2 and only SELL if the cross of Slow and Fast MA occur between R1 and R2.

Order Setting :
--------------
ReverseCondition (default false) : Set TRUE to reverse the entry condition.
ConfirmedOnEntry (default true) : If set to TRUE, will enter/exit trade on the next bar after the cross confirmed. If set to FALSE, will enter/exit trade as soon as there is a cross.
OneEntryPerBar (default true) : If set to TRUE, will only trade once on one bar. If set to FALSE, will trade more than once on one bar if the entry condition is still valid, although still one trade at a time.
NumberOfTries (default 5) : Number of try if the order rejected by the system.
Slippage (default 5) : Slippage setting.
MagicNumber (default 1234) : Use to generate Magic Number. Change this number ONLY

Multiple Open Trade Setting :
-----------------------------
MaxOpenTrade (default 2) : Number of maximum open trade at one time. This setting is use when StopAndReverse / PureSAR = FALSE so the EA won't close the open order when there is an opposite signal, but rather it will open a new trade. Set the number of open trade allowed. If StopAndReverse / PureSAR = TRUE this setting will always = 1, mean one trade at a time.
MinPriceDistance (default 5) : If multiple open trade enable (by set MaxOpenOrder>1 and OneEntryPerBar=FALSE) this number will determine the minimum distance between each trade on same direction.

Time Filter Setting :
-------------------
UseHourTrade (default false) : If set to TRUE, the EA only active on certain time.
StartHour (default 10) : Time when the EA start active (use with UseHourTrade = TRUE).
EndHour (default 11) : Time when the EA stop active (use with UseHourTrade = TRUE).

Lot and Money Management Setting :
------------------------------------
Lots (default 1) : Number of lot per trade.
MM (default false) : If set to TRUE, will use build in money management.
AccountIsMicro (default false) : If using Micro Account set this to TRUE.
Risk (default 10) : Use with MM = TRUE to set the risk per trade.

Cross Alert Setting :
--------------------
EnableAlert (default true) : Will sound an alert when there is a moving average cross, cross UP or cross DOWN.
SoundFilename (default "alert.wav") : The filename for the alert.

BackTest Setting :
------------------
PrintControl (default true) : Print some comment on backtesting.
Show_Settings (default true) : Show setting on the chart. if you like to run the EA on same pair and same time frame but with different setting.



This EA is created by Firedave at Forex-TSD.com. The credit is for him because his generous for giving this EA freely to all people.

Download Link : here

2 Comments:

  1. Anonymous said...
    masih banyak bugsnya bos...coba dicheck aja
    backtestnya sih perfect tapi begitu mausk forward bisa aneh2
    arief said...
    udah ada ver-1 nya tuh
    http://cdn.forexfactory.com/attachment.php?attachmentid=463953&d=1272132999

    musti di tweak, tuk cari parameter yang pas..

Post a Comment