clocks156t174

scalping against trapped countertrend

Abstract
This script attempts to find the end of countertrend.
This script uses oscillators to measure long term and short period trends. When the long term trend keeps positive and clear short term period is over, this script provides a buy signal.
This script does not contain pullback, cut loss and re-enter. You need to add it manually.

Introduction
Many traders want to buy when long term trend is bullish and short term pullback is over.
This is because we can take advantage to the emotion of countertrend traders.
Countertrend traders realizes their profit is finite and therefore want to protect their profit well and limit their loss.
This script is inspired by a searchable trading strategy video.
The video mentioned 4 points.
(1) long term trend. The video did not spend much ink on this point. You can use any method to observe.
(2) clear pullback bar (at least 50% body)
(3) weak bar after clear pullback
(4) entry trigger buy stop
This script attempts to quantize these points to determine trading direction.
This script is originally designed for timeframes lower than examples in the video but you can apply it on any timeframe.

Computing and Adjusting
(1) long term trend
This script uses smoothed stochastic.
(2) clear pullback bar
Since this script is originally designed for timeframes lower than examples in the video, so the condition becomes:
RSI is low enough
(3) weak bar after clear pullback
RSI goes back from low level.
(4) entry trigger buy stop
This script does not include this condition.
You can decide enter when buy stop or pullback.

Parameters
x_src : the value for computing oscillators
x_len_a : how many bars for measuring short term trend
x_len_b : how many bars for measuring long term trend
x_k_b : smooth long term trend, the average value of stochastic values
x_changk = check if clear short term pullback appears recently. 1 means do not use, larger numbers means how long of periods to check.
x_rsi_ct : threshold of short term pullback clear
x_rsi_ft : threshold of short term pullback end

Reading numbers in Strategy Tester
Most possible loss :
(1) to find rational pullback. Generally 1/3 to 2/3 atr.
(2) to find cut loss distance. Generally 1 to 2 atr.
Most possible profit :
to find if trading the opposite direction against this script is profitable.

Conclusion
This script can suggest us trading direction.
Waiting for pullback can reduce risk, compared to buy stop.
This script does not provide good signals in sideways markets.

Reference
A searchable trading strategy video
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

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.

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