
インテリジェント・トレーリング・ストップ・ロス・ストラテジー (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")