- 评论 (2)
- 评论 (6)
Triple Moving Average Trend
Free trend trader EA posted here for your own use, use with caution. EURUSD on 1H timeframe shown at bottom.
Trend trader: only does one active trade per symbol; no hedge and should be FIFO.
(1) Enter in Market: Uses three moving averages. BUY once when condition for MA_1 > MA_2 > MA_3 and SELL if MA_1 < MA_2 < MA_3
(2) Protection: Fixed stoploss and optional stoploss.
(3) Exit from Market: If it was a BUY and new signal is SELL, then close. Same for if it was a SELL and new signal is BUY, then close.
Limit Time Range:
|No more trades before this hour (if want trading all day, then set StartHour=EndHour)||StartHour|
|No more trades after this hour||EndHour|
|Start trading day||StartDay|
|End trading day||EndDay|
|Close trades at end of trading day?||exit_end_day|
|If close at end of trading day, then what hour?||ExitHour|
Main Trading Parameters:
|unique magic number for managing trend trades||MAGIC|
|Period value for "fastest" MA (recommend: 9)||MA_1_Period|
|Period value for "medium" MA (recommend: 7) ||MA_2_Period|
|(recommend: Simple) ||MA_2_Type|
|Period value for "slowest" MA (recommend: 80) ||MA_3_Period|
|(recommend: Exponential) ||MA_3_Type|
|Max drawdown percent (40 is an ok value)||max_percent_dd|
|Max points takeprofit value||TP|
|Max points stoploss value||SL|
|Lot size per trade||Lots|
|Max allowed spread for entering into trade||Spread|
Added functionality for setting trading day range, such as Monday-Wednesday
Added functionality for closing trades and not opening trades after trading day range
Added functionality for limiting drawdown
Added functionality for auto-scaling lot size based on user specified start balance and scaling parameter
Added functionality for limiting min and max lot sizes
Updated EA's user interface with dividing messages, such as "----------- Limit Time Range -----------"
Some code optimization:
Most initial error checks are now only done once as they should be, at start of EA program launch
Most error check messages are updated to be more clearer
EA now closes previous open trades (if needed) before opening new trades