
この戦略の主な考えは,価格の動力の指標に基づいて暗号通貨の購入と売却を決定することです.価格の動向が逆転するときにトレンドを捕捉し,価格の動きの動力を利用して利益を得るように試みます.
この戦略は,2つの指標を使用して入場と退出の信号を決定する.最初のものは価格そのものである - それは過去10Kラインの最高価格と最低価格をチェックする.第二のものは価格に基づく動力の指標である%K値である.
具体的には,価格が過去10Kラインの最高価格の98%以下であるとき ((買入値),戦略は買入シグナルを発信する.これは価格が下方突破したことを意味する. 同様に,価格が過去10Kラインの最低価格の102%以上であるとき ((売出値),戦略は売り出シグナルを発信する.価格が上方突破した.
このように,戦略は,価格運動が新しいトレンドを形成するときに反転点を捉えることができます. 買い売りの値を調整することによって,戦略の突破信号に対する感受性を制御することができます.
この戦略の最大の利点は,価格レベルと動力の要因を同時に考慮していることです.動力の指標に依存することで,偽の突破によって誤導されるのではなく,真のトレンドの逆転をより信頼的に捉えることができます.具体的利点は次のとおりです.
この戦略にはいくつかのリスクがあります. 主なリスクは以下の通りです.
対策として
この戦略は,以下の点で最適化できます.
この動態突破戦略は,全体的に,暗号通貨のショートライン取引機会を捕獲するのに非常に適しています.それは,価格の逆転時に動態特性を効果的に利用して,利潤を得ながら,リスクを制御します.パラメータとモデルを継続的に最適化することで,戦略をより安定させ,より高い安定した収益を得ることができます.
/*backtest
start: 2023-02-22 00:00:00
end: 2024-02-28 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © nyxover
//@version=5
strategy("Stratégie d'achat bas/vendre haut", shorttitle="Achat/Vente")
// Paramètres d'entrée
crypto = input("BTC", "Crypto-monnaie")
capital = input(1.0, "Capital de départ")
buy_threshold = input(0.02, "Seuil d'achat")
sell_threshold = input(0.02, "Seuil de vente")
fee_rate = input(0.01, "Taux de frais")
// Balances
var float initial_balance = na
var float current_balance = na
// Fonction pour calculer les frais
calculate_fees(amount) =>
amount * fee_rate
// Fonction pour acheter
should_buy() =>
close < ta.highest(close, 10) * (1 - buy_threshold)
// Fonction pour vendre
should_sell() =>
close > ta.lowest(close, 10) * (1 + sell_threshold)
// Logique de la stratégie
if barstate.isfirst
initial_balance := capital
current_balance := capital
if should_buy()
amount_to_buy = current_balance / close
fees = calculate_fees(amount_to_buy)
current_balance := current_balance - amount_to_buy - fees
strategy.entry("Achat", strategy.long)
if should_sell()
amount_to_sell = current_balance
fees = calculate_fees(amount_to_sell)
current_balance := current_balance - amount_to_sell - fees
strategy.close("Achat")
// Affichage des informations
plot(initial_balance, color=color.green, title="Capital de départ")
plot(current_balance, color=color.blue, title="Capital actuel")