欢迎访问 外汇EA下载与MT4/MT5自动交易资源 - 聚合外汇EA、黄金EA、量化交易工具与自动化交易实战内容。
登录 注册

Pinbar 交易者 EA - 根据每周 S&R 水平进行 pinbar 交易 (Pinbar trader EA - Trading pinbars off w)

author emer | 0 人阅读 | 0 人评论 |
来源:ForexFactory · Trading Systems · 原帖链接
原帖作者:ebeckers
发布日期:First Post: Jan 27, 2018 5:15pm | Edited Jan 29, 2018 12:39am

=== Pinbar Trader EA ===


Hi everyone, welcome !
I would like to present my latest EA.
It implements a very basic, but very effective strategy. trading pinbars from weekly S&R levels

Strategy:
- we wait for a pinbar to appear which rejects a weekly support & resistance level
- When the candle with the pinbar is closed we open a new buy/sell trade on the next candle

The Pinbar trader EA
The pinbar trader EA implements the strategy and has lots of extra features:

  1. it scans multiple currencies. So load the EA on 1 chart and it will scan all major currencies by default (you can change which ones in the settings)
  2. it can send you alerts when a pinbar is detected on a weekly S&R level
  3. it can do auto trading, although please run this on demo first before you decide to go live with this
  4. You can choose between a trailing stops or risk:reward exit strategy
  5. You can choose if it should use a fixed lot sizes, a fixed amount of $, or a risk % of your account balance
  6. It has a news filter implemented to skip trading during news events

Installation:
Download the zip file and unzip it somewhere

  1. copy the pinbartrader.tpl to your MT4 templates folder
  2. copy the SupportResistance.ex4 to your MT4 indicators folder
  3. copy the PinbarTrader.ex4 to your MT4 experts folder
  4. Now start MT4, enable auto trading and DLL imports
  5. put the EA on any chart on the Daily (D1) timeframe !

and voila..
By default auto-trading and alerts are turned off. So enable them if you want to use them

Source code:
Want to get involved ? you can find all source code for this (and my other ea's & indicators) on GitHub
https://github.com/erwin-beckers/SimpleTrendReversalEA

Backtesting:
Attached the results of a 2-year backtest on EURUSD

Idea's for the next version/future:
- add a distributed S&R filter. Instead of trying to calculate the correct S&R levels, simply download them from a central server.
- send alerts for mean reversal setups (and perhaps auto trade those)
- open with-the-trend trades on pinbars for pinbars on/to the mean

General usage:
The EA will show you a table with the pairs which have a pinbar or are at a weekly S&R resistance level.
Pairs which don't have any pinbar and are not at a weekly S&R level are filtered out and are not shown.
In short.. the EA will only show pairs which looks interesting
Off course when time goes by new pairs will be shown or removed automatically.

The color of a pair indicates if we are looking to buy (green) or
When all signals are valid the last column will contain the word buy or sell and when this happens the EA will send you an alert and/or open a trade.
If you want to look at the chart , then simply click on the name of the currency pair in the 1st column (e.g. EURUSD in the screenshot)
This will open a new chart with the S&R indicator attached so you can take a quick look

When auto-trading is enabled the EA will also show you a list of all open trades and a trade statistics panel where you can keep track on its performance

Manual Trading
The EA can be used as an aid for manual trading or it can do automated trading.

For manual trading just set sendAlerts=true (and/or sendEmails = true)
The EA will then send an alert (or email) when it detects a valid buy/sell signal.
Alerts can even be send to your phone!
See here on how to set this up : http://www.cmapllc.com/how-to-set-up...nd-iphone.html
When you receive an alert you can look at the chart and if you like the signal or not and perhaps open a trade manually

Automated Trading
For automated trading just set allowTrading=true and choose your lotsize and exit strategy
The EA will open trades automatically when it detects valid buy/sell signals and manage these trades for you.
When auto trading you must tell the EA how much money it is allowed to use for each trade
Here you have 3 options:

MoneyManagement:

Fixed Lot Size / trade

Set MoneyManagent = UseFixedLotSize and fill in your lotsize under FixedLotSize

Each trade opened by the EA will use this fixed lot size


Fixed Amount of $ / trade

Set MoneyManagement = UseFixedAmount and fill in the amount of under FixedAmount.

Note that this is your account currency. So if your account is in EUR then FixedAmount is also in EUR

Each trade opened by the EA will use a fixed amount of money.

When the SL is bigger it must use a smaller lotsize and when the SL is smaller it can use a higher lotsize.

So it will always risk the same amount of money on each and every trade


Percentage of Account Balance / trade

Set MoneyManagement = UsePercentageOfAccountBalance and fill in the percentage (1-100) under RiskPercentage.

Each trade opened by the EA will risk a fixed % of your total balance

So if you have a $1000 account and Riskpercentage = 5 it will risk 5% of $1000 = $50,- / trade


Exit Strategies
Here you can choose between a trailing stop or a fixed Risk/Reward ratio

Trailing stop:

Set trailingmethod=UseTrailingStops and fill in the OrderHiddenSL, OrderTSx , OrderTSxTrigger levels

It uses a hidden / virtual stoploss.

This allows us to put the stop loss anywhere without the broker knowing and without any broker restrictions

So.. When the EA places a new order then the initial hidden/virtual stoploss is placed at the S&R level

then when trade gets into profit we trail the hidden / virtual stoploss like this:

when profit reaches Order TS1 Trigger pips, the virtual stoploss is moved to Order TS1 pips

when profit reaches Order TS2 Trigger pips, the virtual stoploss is moved to Order TS2 pips

when profit reaches Order TS3 Trigger pips, the virtual stoploss is moved to Order TS3 pips

when profit reaches Order TS4 Trigger pips, the virtual stoploss is moved to Order TS4 pips

when profit goes above Order TS4 Trigger pips then the rest gets trailed with a Trailing Step


Risk/Reward ratio

Set trailing method = UseRiskRewardRations and set TakeProfit to your R:R

原帖附件 (6)

📦 帖子附件汇总 (150)

以下是回帖中所有共享的附件(150 个,已去重)。

🔐
请登录后参与评论
注册满12小时后评论,即可解锁附件下载
立即登录