Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Pinbar trader EA - Trading pinbars based on weekly S&R levels (Pinbar trader EA - Trading pinbars of

author EAcpu | 5 reads | 0 comments |

=== Pinbar Trading EA ===


Hello everyone, welcome!
I would like to introduce my latest EA.
It implements a very basic but very effective strategy. Trade pinbar based on weekly S&R levels

Strategy:
- We wait for the pinbar to appear rejecting the weekly support and resistance levels
- When the candle with the pinbar closes, we open a new buy/sell trade on the next candle

Pinbar Trading EA
The pinbar trader EA implements this strategy and has many additional features:

  1. It scans multiple currencies. So load the EA on 1 chart and by default it will scan all major currencies (you can change which currencies in settings)
  2. It can send you alerts when weekly S&R levels detect pinbar
  3. It can do automated trading, but please run it in the demo before deciding to use it
  4. You can choose a trailing stop or risk:reward exit strategy
  5. You can choose whether to use a fixed lot size, a fixed amount$ or a risk percentage of your account balance
  6. It has a news filter to skip transactions during news events

Install:
Download the zip file and extract it somewhere

  1. Copy pinbartrader.tpl to your MT4 templates folder
  2. Copy SupportResistance.ex4 to your MT4 indicators folder
  3. Copy PinbarTrader.ex4 to your MT4 Expert folder
  4. Now launch MT4, enable automatic trading and DLL import
  5. Place your EA on any chart on the daily (D1) time frame!

Look...
By default, automated trading and alerts are turned off. So if you want to use them, enable them

source code:
Want to get involved? You can find all the source code for this project (and my other EAs and indicators) on GitHub
https://github.com/erwin-beckers/SimpleTrendReversalEA

Backtest:
Attached are EURUSD 2-year backtest results

Next version/future ideas:
- Added distributed S&R filter. No need to try to calculate the correct S&R levels, just download them from the central server.
- Send alerts for mean reversal setups (and perhaps automated trading)
- Enable trend trading on a pinbar to get the average of the pinbar

General usage:
The EA will show you a table with currency pairs that have pinbars or are at weekly S&R resistance levels.
Currency pairs that do not have any pinbar and do not have weekly S&R levels will be filtered out and will not be displayed.
In short.. the EA will only show currency pairs that look interesting. Of course, over time new pairs will be automatically shown or removed.

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

When automated trading is enabled, the EA will also show you a list of all open trades as well as a trading statistics panel where you can track its performance

Manual trading
EA can be used as an auxiliary tool for manual trading or for automatic trading.

For manual trading just set sendalert =true (and/or sendmail =true)
When the EA detects a valid buy/sell signal, it sends an alert (or email).
Alerts can even be sent to your phone!
See here for how to set up: http://www.cmapllc.com/how-to-set-up...nd-iphone.html
When you receive an alert, you can view the chart to see if you like the signal, or open a trade manually

Automated Trading <br> For automated trading just set allow trades = true and select your lot size and exit strategy. When the EA detects a valid buy/sell signal, it will automatically open trades and manage these trades for you.
When trading automatically, you must tell the EA how much money you are allowed to use per trade. Here you have 3 options:

Money Management :

Fixed lot/trade

Set MoneyManagent = Use Fixed Lot Size and fill in your Lot Size below Fixed Lot Size

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


Fixed amount per transaction $

Package Money Management = Use Fixed Amount and fill in the amount below Fixed Amount .

Note that this is your account currency. So if your account is in Euros, the fixed amount will also be in Euros

A fixed amount will be used for each trade opened by the EA.

When the stop loss is large, a smaller lot size must be used; when the stop loss is small, a larger lot size can be used.

Therefore, you always risk the same amount on every trade


Account balance/percentage of transactions

Package Money Management = Account Balance Usage Percent and fill in the percentage below (1-100) Risk Percent .

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

So if you have a $1000 account with Riskpercentage = 5, the risk is 5% of $1000 = $50, - / trade


Exit Strategy <br> Here you can choose trailing stop loss or fixed risk/reward ratio

Trailing Stop:

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

It uses hidden/virtual stop loss.

This allows us to set a stop loss anywhere without the knowledge of the broker and without any broker restrictions

So.. when the EA places a new order, the initial hidden/virtual stop loss will be set at the S&R level

Then, when the trade becomes profitable, we trail the hidden/virtual stop loss as follows:

When the profit reaches the order TS1 trigger point, the virtual stop loss is moved to the order TS1 point

When the profit reaches the order TS2 trigger point, the virtual stop loss is moved to the order TS2 point

When the profit reaches the order TS3 trigger point, the virtual stop loss is moved to the order TS3 point

When the profit reaches the order TS4 trigger point, the virtual stop loss is moved to the order TS4 point

When the profit is above the order TS4 trigger point, the rest will be tracked by the tracking step


risk/reward ratio

Set trailing method = UseRiskRewardRations and set take profit to give you R:R

Screen Shot 2018-01-27 at 10.25.20.pngScreen Shot 2018-01-27 at 10.07.10.pngScreen Shot 2018-01-27 at 10.07.24.pngpinbar.jpg
Screen Shot 2018-01-27 at 10.25.20.pngScreen Shot 2018-01-27 at 10.07.10.pngScreen Shot 2018-01-27 at 10.07.24.pngpinbar.jpg
Screen Shot 2018-01-27 at 10.25.20.pngScreen Shot 2018-01-27 at 10.07.10.pngScreen Shot 2018-01-27 at 10.07.24.pngpinbar.jpg
Screen Shot 2018-01-27 at 10.25.20.pngScreen Shot 2018-01-27 at 10.07.10.pngScreen Shot 2018-01-27 at 10.07.24.pngpinbar.jpg
Screen Shot 2018-01-27 at 10.25.20.pngScreen Shot 2018-01-27 at 10.07.10.pngScreen Shot 2018-01-27 at 10.07.24.pngpinbar.jpg
Screen Shot 2018-01-27 at 10.25.20.pngScreen Shot 2018-01-27 at 10.07.10.pngScreen Shot 2018-01-27 at 10.07.24.pngpinbar.jpg

Attachment to original post (1)

📦 Summary of post attachments (10)

Below are all the files (10) shared in the reply.

Verification code Refresh