TWENTYTRADER

METRIC-TREND-TRADER

TWENTYTRADER تم تحديثه   
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
ملاحظات الأخبار:
updated margin requirement USDJPY = 3.3 % , Removed redundant calculation causing intermittent stop loss and profit target orders not to placed on brokers exchange.
ملاحظات الأخبار:
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.
ملاحظات الأخبار:
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.
ملاحظات الأخبار:
Added groups to settings menu

نص برمجي للمستخدمين المدعوين فقط

الوصول إلى هذا النص مقيد للمستخدمين المصرح لهم من قبل المؤلف وعادة ما يكون الدفع مطلوباً. يمكنك إضافته إلى مفضلاتك، لكن لن تتمكن من استخدامه إلا بعد طلب الإذن والحصول عليه من مؤلفه. تواصل مع TWENTYTRADER للحصول على مزيد من المعلومات، أو اتبع إرشادات المؤلف أدناه.

لا تقترح TradingView الدفع مقابل النصوص البرمجية واستخدامها حتى تثق بنسبة 100٪ في مؤلفها وتفهم كيفية عملها. في كثير من الحالات، يمكنك العثور على بديل جيد مفتوح المصدر مجانًا في المكتبة العامة.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

تعليمات المؤلف

لم يعد بإمكان مؤلف هذا النص البرمجي منح حق الوصول إليه. من فضلك لا تطلب الوصول.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟

تحذير: يرجى القراءة قبل طلب الوصول.