
인텔리전트 트레일링 스톱 로스 전략 (Intelligent Trailing Stop Loss Strategy) 은 가격 변화에 따라 자동으로 스톱 포인트를 조정하는 전략이다. 그것은 SAR 지표의 논리를 결합하여 가격이 새로운 최고점이나 최저점에 도달했을 때 스톱 라인을 조정하여 최대 회수 통제를 위해 추적한다.
이 전략의 핵심 논리는 SAR 지표에 따라 자동으로 스톱 라인을 조정하는 것입니다. 구체적으로 4개의 변수를 정의합니다:
상향 트렌드일 때, 스톱 로프는 지속적으로 상향을 조정하여 가격 상승을 추적합니다. 가격이 하향으로 전환할 때, 스톱 로프는 다시 상향으로 전환할 때까지 변하지 않습니다.
스톱 라인 조정의 폭은 스텝 길이 인자 AF 제어에 의해。AF는 새로운 스톱 포인트를 성공적으로 설정할 때 증가하여 다음 단계의 조정 폭을 확대한다。
이 전략의 가장 큰 장점은 시장의 변동에 따라 스톱포드를 지능적으로 조정할 수 있다는 점이며, 충분한 수익 공간을 보장하면서도 최대한의 최대 회수를 줄일 수 있다는 것입니다. 전통적인 정적 스톱포드 방식에 비해 가격 추세를 더 잘 포착 할 수 있습니다.
특히, 다음과 같은 장점이 있습니다:
이 전략에는 몇 가지 위험도 있습니다.
이 전략은 다음과 같은 방향으로 최적화될 수 있습니다.
지능형 추적 중지 전략은 SAR 지표의 운영 논리를 모방하여 실시간으로 중지 라인의 위치를 조정하여 수익을 보호하면서 손실 기회를 최소화합니다. 그것은 중지 기능 자체의 가치를 최대한 발휘합니다.
기존의 고정 스톱 포인트 전략에 비해, 이 전략은 시장의 변화에 더 잘 적응할 수 있으며, 더 유연하다. 사용자 정의 파라미터를 설정함으로써, 사용자는 자신의 위험 선호도에 따라 자신의 스톱 모드를 선택할 수 있다.
물론, 이 전략에는 또한 몇 가지 변수 최적화 공간과 다른 지표와 결합하여 달성할 수 있는 향상된 효과도 있습니다. 전체적으로, 이것은 투자자들에게 스톱로즈와 스톱스 사이에 더 지능적인 균형점을 찾습니다.
/*backtest
start: 2024-01-17 00:00:00
end: 2024-01-24 00:00:00
period: 15m
basePeriod: 5m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
strategy("Lucid SAR Strategy", shorttitle="Lucid SAR Strategy", overlay=true)
// Full credit to Sawcruhteez, Lucid Investment Strategies LLC and Casey Bowman.
// This is a strategy version of the Lucid SAR indicator created by the above-mentioned parties.
// Original version of the indicator: https://www.tradingview.com/script/OkACQQgL-Lucid-SAR/
// Branded under the name "Lucid SAR"
// As agreed to with Lucid Investment Strategies LLC on July 9, 2019
// https://lucidinvestmentstrategies.com/
// Created by Casey Bowman on July 4, 2019
// MIT License
// Copyright (c) 2019 Casey Bowman
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
AF_initial = input(0.02)
AF_increment = input(0.02)
AF_maximum = input(0.2)
// start with uptrend
uptrend = true
newtrend = false
EP = high
SAR = low
AF = AF_initial
if not na(uptrend[1]) and not na(newtrend[1])
if uptrend[1]
EP := max(high, EP[1])
else
EP := min(low, EP[1])
if newtrend[1]
AF := AF_initial
else
if EP != EP[1]
AF := min(AF_maximum, AF[1] + AF_increment)
else
AF := AF[1]
SAR := SAR[1] + AF * (EP - SAR[1])
if uptrend[1]
if newtrend
SAR := max(high, EP[1])
EP := min(low, low[1])
else
SAR := min(SAR, low[1])
if not na(low[2])
SAR := min(SAR, low[2])
if SAR > low
uptrend := false
newtrend := true
SAR := max(high, EP[1])
EP := min(low, low[1])
else
uptrend := true
newtrend := false
else
if newtrend
SAR := min(low, EP[1])
EP := max(high, high[1])
else
SAR := max(SAR, high[1])
if not na(high[2])
SAR := max(SAR, high[2])
if SAR < high
uptrend := true
newtrend := true
SAR := min(low, EP[1])
EP := max(high, high[1])
else
uptrend := false
newtrend := false
plot(SAR, color = color.blue, style = plot.style_cross, linewidth = 2)
if (uptrend)
strategy.entry("PBSARLE", strategy.long, comment="PBSARLE")
if (newtrend)
strategy.entry("PBSARSE", strategy.short, comment="PBSARSE")