
이 전략의 주요 아이디어는 가격의 동적 지표에 따라 암호화폐를 언제 구매하고 판매할지를 결정하는 것이다. 이는 가격의 동적 움직임이 역전될 때 동향을 포착하고 가격 움직임의 동력을 활용하여 이익을 얻으려고 한다.
이 전략은 두 가지 지표를 사용하여 입수 및 퇴출 신호를 결정한다. 첫 번째는 가격 자체이다 - 그것은 지난 10 K 선의 최고 가격과 최저 가격을 검사한다. 두 번째는 가격에 기반한 동력 지표, 즉% K 값이다.
구체적으로, 가격이 지난 10 K 라인 최저 가격의 98%보다 낮을 때 ((구매 하락), 전략은 구매 신호를 발산한다. 이는 가격이 하향으로 돌파되었다는 것을 의미한다. 마찬가지로, 가격이 지난 10 K 라인 최저 가격의 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")