TWENTYTRADER

METRIC-TREND-TRADER

TWENTYTRADER Cập nhật   
This script is a Fully Automated trading script meant to be used with "Oanda" broker and the plug-ins for algorithmic trading automation.( FOREX ONLY)
This script is meant to capture "TREND FOLLOWING " for intraday charts (1hour) preferably and will hold for days / weeks .trading on forex markets.

(The combination of indicators includes a short high and low price channel and a longer term high and low price channel)

This script is original in description as being automated to try and capture dynamic trending markets with both long and short fractal price channels. although trend trading is not an original concept. trend trading with this dynamic indicator allows the user visualize both short term and longer term price action at the same time, helping to make better trading decisions. the channels are designed to buy breakouts in the direction of the longer term trend while trailing stop a built-in stop loss that allows normal market movement while attempting to lock in flexible profits.

The concept of this indicator is be able to quickly visualize trends by high lighting the large green areas beneath price "when trending long" which is the difference between the (user defined) short term lows and the (user defined) Long period price lows. For "down trending" markets a large red area above price will be displayed and this is the difference between the (user defined) short term highs and the (user defined) long term highs.

This strategy uses a lower than reward profile to jump in direction of market moves for continuation,
(1 risk to 4 reward)
in the likelihood the instrument will continue (example) 200 pips before it reverts 50 pips in the counter direction.

This strategy should only be used in markets that you believe are "TRENDING" at the time of trading otherwise you risk trend trading a range market.


This script uses a (user defined period) of short term high and low price ( green/red color) and (user defined period) Long Term high and low price (green/red) chosen in the indicator settings menu.
The default parameters are 10 with a (minimum of 1 and maximum of 10000) for the short term channel and 50 with a (minimum of 1 and maximum of 10000) for the long term price channel , the default parameters = roughly 2 days "long term" and 10 hours "short term" of price action on the (1 hour) chart.

Strategy entries and exits , for Long trades the trade will be entered if the short term high crosses above the Long Term high and the Short term low is not equal to the Long term low . the trade will exit if profit or stop loss are hit or if the Short term low crosses under the long term low.
For Short trades the trade will enter short if , the short term low crosses under the long term low and the short term high is not equal to the long term high. the trade will exit if profit or stop loss are hit or the short term high crosses over the long term high

"The default parameters should be kept unless you fully understand the complete strategy"
There are two very important inputs to be selected at the user setting menu "Long Only " and "Short Only" if you are looking to place long trades only select "Long Only" or for short trades select " Short Only" it is not recommended to keep both selected as it will trade both sides!

When the trade is entered a red , a blue and green horizontal dotted line will appear on the chart.
the blue line is the strategy entry price , the red line is the stop loss price , and the green line is the take profit price . the colors will invert if the trade is long or short.

(Setting alerts should be done in the indicator settings menu, and the parameters you chose will determine the stop loss/target and the amount of "units = (position size)" you wish to trade for the (forex only) markets. using "alert() function calls only" is the only alert that should be used with this strategy.
(note : when "alert() function calls only" is set two messages will be sent, one closing any open position in the opposite direction and one placing the new order regardless if you are currently in a trade or not)

Trade targets , stoploss and trade position size are a user defined variables entered in the indicator settings menu. (target pips minimum 0 and a maximum of 1000)(stop pips minimum of 0 and maximum of 1000)


Back test date range is included in the script for back testing different data periods.
the back ground will be colored a transparent navy blue if the period you are looking trading is with in the date range( note: to place live trades the end date will need to be in the future)
this is also adjustable in the settings menu

The avoid spread filter is a user defined time in which the spread is typically higher than average, applying this filter avoids trades in the specified time. When this filter is applied there will be a transparent red back ground color in the specified time.

Back test default setting are equivocal to USDJPY

at the time of this publication placing trades with the "Oanda" broker are as follows , USD units = 2000 equal 2000 USD position size . "Oanda" current leverage is 20 to 1 for this particular pair and commission is paid in spread (1.4) pips = 0.19 USD per trade , Margin required for the trade is 100.0 USD , Position sizing = 10% of a 1000 USD account.

USDJPY
Phát hành các Ghi chú:
updated margin requirement USDJPY = 3.3 % , Removed redundant calculation causing intermittent stop loss and profit target orders not to placed on brokers exchange.
Phát hành các Ghi chú:
added buy default recalculate position after order fills for more realistic back testing results , added a buy stop / sell stop / for entry prices to fix random entry error.
Phát hành các Ghi chú:
Fixed repainting issue . (note: when setting alerts it is recommended to to set "Long Only " or "Short Only" separately having both selected at the same time may cause back testing random issues.) however alerts will fire correctly regardless , but the back tester may not reflect this.
Phát hành các Ghi chú:
Added groups to settings menu

Tập lệnh chỉ hiển thị cho người được mời

Quyền truy cập vào tập lệnh này bị hạn chế đối với người dùng được tác giả ủy quyền và thường yêu cầu thanh toán. Bạn có thể thêm nó vào mục yêu thích của mình, nhưng bạn sẽ chỉ có thể sử dụng nó sau khi yêu cầu sự cho phép từ tác giả. Liên hệ TWENTYTRADER để thêm thông tin, hoặc làm theo hướng dẫn của tác giả bên dưới.

TradingView không đề xuất trả tiền cho một tập lệnh và sử dụng cho đến khi bạn hoàn toàn tin tưởng tác giả và hiểu cách thức hoạt động của tập lệnh. Trong nhiều trường hợp, bạn có thể tìm thấy một giải pháp thay thế nguồn mở miễn phí trong Thư viện Công cộng của chúng tôi.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Hướng dẫn của tác giả

Tác giả của tập lệnh này không thể cấp quyền truy cập vào nó nữa. Vui lòng không yêu cầu quyền truy cập.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?

Cảnh báo: vui lòng đọc trước khi yêu cầu quyền truy cập.