
이것은 또 다른 평범한 트렌드 추적 전략이 아닙니다. LTPI 전략은 2.16 배의 ATR을 트렌드 반전으로 트리거한 값을 사용합니다. 이 값은 신중하게 조정된 을 통해 90%의 시장 소음을 필터링 할 수 있으며 진정한 트렌드 시작 신호를 놓치지 않습니다.
중요한 것은 트렌드를 유발하는 논리입니다. 가격은 새로운 트렌드를 유발하기 위해 현재 트렌드 라인을 ± 2.16배 ATR을 뚫어야 합니다. 이것은 낮은 변동 기간 동안 상대적으로 더 큰 가격 이동이 필요하고 높은 변동 기간 동안 상대적으로 느슨합니다.
전통적인 트렌드 라인은 정적이고, LTPI는 활동적입니다. 기본 단계 길이는 ATR의 2.52배이고, 그 다음에는 매 사이클마다 ATR의 0.0093배의 증가율을 증가시킵니다. 이 디자인 철학은 간단합니다. 트렌드가 길고, 단계가 더 커질수록, 트렌드 라인이 더 급격하게 이동합니다.
수학 공식: stepSize = min ((2.52 × ATR + 0.0093 × 트렌드 지속 기간 × ATR, 최대 단계 길)
최대 스텝 길이는 -0.004배 ATR (마이너스 스캐닝) 으로 설정되어 있으며, 극단적 변동에서 너무 큰 스텝이 트렌드 라인을 제어하지 못하게합니다. 이러한 점진적 가속 메커니즘은 트렌드 초기에는 전략이 보수적이지만 트렌드 확인 후에는 더 급진적이게됩니다.
가장 치명적인 디자인 세부 사항: 트렌드 반전 후 강제적인 잠금 17주기 동안 반전 신호는 무시됩니다. 이것은 흔들리는 시장에 대한 궁극적인 방어입니다.
왜 17이냐구요?
그 대가는 분명합니다. 빠른 V형 역전에서 지연이 있지만, 그 대가로 충격적인 상황에서 안정적인 성적을 낸다. 이것은 전형적인 위험과 이익의 균형이며, 전략은 안정성을 선택한다.
위아래 통로 = 트렌드 라인 ± 1배의 ATR, 이것은 임의로 설정되지 않습니다. 1배의 ATR 대역은 통계적으로 정상적인 가격 변동의 68%를 덮고 나머지 32%의 돌파구가 의미있는 신호로 간주됩니다.
이 채널의 진정한 가치는 다음과 같습니다:
브린 반지와는 달리, 이 통로는 단순한 통계적 분포가 아닌 추세 방향의 움직임을 기반으로 한다. 강한 추세에서 통로는 지속적으로 추세 방향으로 기울어지며, 더 정확한 거래 경계를 제공한다.
단점으로 직접 말씀드리죠:
이 전략은 누구를 위한 것인가?
적합하지 않다: 일일 거래, 소액 계좌, 고주파 거래를 추구하는 투자자.
핵심 변수 조정 제안:
리스크 관리는 엄격해야 한다: 단위 리스크가 2%를 초과하지 않고, 총 포지션이 계좌의 50%를 초과하지 않는다.
// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © lungusebi100
//@version=6
strategy("LTPI Strat", overlay=false, process_orders_on_close=true, calc_on_every_tick=false)
RequestSecurityNRP(_tf, _exp, _barmerge)=>
request.security(syminfo.tickerid, _tf, _exp[barstate.isrealtime ? 1 : 0],_barmerge)[barstate.isrealtime ? 0 : 1]
int indicator_1 = na
int indicator_2 = na
int indicator_3 = na
float indicator_4 = na
int indicator_5 = na
var int indicator_6 = na
int indicator_7 = na
var int indicator_8 = na
var int indicator_9 = na
var int indicator_10 = na
int indicator_11 = na
int indicator_12 = na
int indicator_13 = na
int indicator_14 = na
int indicator_15 = na
int indicator_16 = na
// ------------------------------------------------------------INDICATOR 1: Trend Impulse Channels ---------------------------------------
var string t1 = "Trigger Threshold: Controls when a new trend step is triggered. It's a multiplier of the ATR — higher values require a stronger price move to flip the trend direction."
var string t2 = "Max Step Size: Defines the maximum allowed size for each trend step, based on ATR. Use a negative number to scale down large step jumps in volatile conditions."
var string t3 = "Band Multiplier: Expands or contracts the volatility bands around the trend line. A higher value creates wider channels to account for more price fluctuation."
var string t4 = "Trend Hold: After a trend flip, the trend will hold for this many bars before another flip can occur. Useful for avoiding rapid flip-flopping in choppy markets."
var string t5 = "Retest Signals: Enables triangle markers on the chart when price re-tests the upper or lower channel boundary. Helpful for spotting potential continuation or bounce zones."
var string t6 = "Trend Filter: Only show retest signals if they align with the current trend direction (e.g., only show upper retests in a downtrend)."
var string t7 = "Trend Step Signals: Shows circular markers each time a new step is taken in the trend direction. These mark every structural trend advancement."
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Inputs {
indi_1_tf = input.timeframe(title = "Timeframe", defval="2D", group = "-------Trend Impulse Channel------")
flipMult = input.float(2.16,step=0.01, title="Trigger Threshold", group = "-------Trend Impulse Channel------", inline="", tooltip=t1)
maxStepAtr = input.float(-0.004,step=0.001, title="Max Step Size", group = "-------Trend Impulse Channel------", inline="", tooltip=t2)
bandMult = input.float(1, step=0.01,title="Band Multiplier", group = "-------Trend Impulse Channel------", inline="", tooltip=t3)
holdBars = input.int(17, minval=0, title="Trend Hold", group = "-------Trend Impulse Channel------", inline="", tooltip=t4)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
[close2d, atr2d] = request.security(syminfo.tickerid, indi_1_tf, [close, ta.atr(200)], gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_off)
// ~~ Atr Scaling {
atr = atr2d
stepBase = atr * 2.52
maxStep = atr * maxStepAtr
trigger = atr * flipMult
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Var {
var float trend = na
var int dir = 0
var int barsInTrend = 0
var float hold = na
var int extension = 0
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Logic {
startLong = close2d > nz(trend) + trigger
startShort = close2d < nz(trend) - trigger
flip = (startLong or startShort) and barsInTrend >= 0
stepSize = math.min(stepBase + 0.0093 * barsInTrend * atr, maxStep)
if na(trend)
trend := close2d
dir := 0
barsInTrend := 0
hold := trigger
extension := 0
else
if flip and extension <= 0
trend := close2d
dir := startLong ? 1 : -1
barsInTrend := 1
hold := trigger
extension := holdBars
else
trend := trend + (dir == 1 ? stepSize : dir == -1 ? -stepSize : 0)
barsInTrend += 1
extension := math.max(extension - 1, 0)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Channel {
trendDirection = dir == 1 ? 1 : dir == -1 ? -1 : 0
upper = trend + atr * bandMult
lower = trend - atr * bandMult
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// LTPI Signal
indicator_1 := dir
if indicator_1 > 0
strategy.entry("long", strategy.long)
if indicator_1 < 0
strategy.close("long")
plot (indicator_1, color = color.blue)