
1-3-1 빨간색 K선 반전 전략은 K선 모양에 따라 매매 신호를 판단하는 전략이다. 이 전략은 1개의 빨간색 K선이 3개의 녹색 K선으로 반전되는지 관찰함으로써 매매 기회를 찾는다.
이 전략의 핵심 논리는 다음과 같습니다.
이 전략으로 우리는 빨간 K선이 반전된 상태에서 구매할 수 있는데, 그 후의 트렌드가 상승할 가능성이 높기 때문입니다. 동시에 위험을 통제하고 수익을 잠금하기 위해 스톱 & 스톱을 설정할 수 있습니다.
1-3-1 빨간색 녹색 K선 역전 전략은 다음과 같은 장점이 있다:
이 전략에는 몇 가지 위험도 있습니다.
대책:
이 전략은 다음과 같은 부분에서 최적화될 수 있습니다.
대시장 지수를 기반으로 한 필터링. 대시장의 단기 및 중기 추세에 따라 거래 신호를 필터링 할 수 있으며, 대시장이 상승 할 때 구매하고 대시장이 떨어질 때 거래를 중단 할 수 있습니다.
거래량 확인을 고려한다. 녹색 K 라인 거래량에 대한 판단을 높여서 거래량이 크게 될 때만 구매한다.
스톱 스톱 비율을 최적화한다. 다양한 스톱 스톱 비율을 테스트하여 최적의 변수 조합을 찾을 수 있다. 또한 동적 스톱 또는 이동 스톱을 설정할 수 있다.
포지션 관리 최적화. 포지션을 세분화하여 조건이 충족되면 포지션을 추가하여 단일 거래의 위험을 줄일 수 있습니다.
더 많은 필터링 조건을 추가하십시오. 예를 들어, 평균선, 변동률과 같은 지표를 고려하여 추세가 더 명확할 때 구매하십시오.
빅데이터 훈련은 최적의 변수를 찾는 것이다. 많은 양의 역사 데이터를 수집하고, 기계 학습과 같은 기술을 사용하여 최적의 변수 값을 훈련한다.
1-3-1 K선 역전 전략은 전체적으로 간단하고 실용적인 단선 거래 전략이다. 명확한 입출장 규칙이 있고, 재측정 효과가 좋다. 우리는 몇 가지 최적화 조치를 통해 실장 효과를 향상시킬 수 있으며, 신뢰할 수 있는 양적 거래 전략이 된다. 또한 위험 통제에 주의를 기울이고, 재산을 적절히 관리해야 한다.
/*backtest
start: 2023-09-26 00:00:00
end: 2023-10-26 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
//by Genma01
strategy("Stratégie tradosaure 1 Bougie Rouge suivi de 3 Bougies Vertes", overlay=true, default_qty_type = strategy.percent_of_equity, default_qty_value = 100)
// Définir les paramètres
var float stopLossPrice = na
var float takeProfitPrice = na
var float stopLossPriceD = na
var float takeProfitPriceD = na
// Vérifier les conditions
redCandle = close[3] < open[3] and low[3] < low[2] and low[3] < low[1] and low[3] < low[0]
greenCandles = close > open and close[1] > open[1] and close[2] > open[2]
higherClose = close > close[1] and close[1] > close[2]
// Calcul du stop-loss
if (redCandle and greenCandles and higherClose) and strategy.position_size == 0
stopLossPrice := low[3]
// Calcul du take-profit
if (not na(stopLossPrice)) and strategy.position_size == 0
takeProfitPrice := close + (close - stopLossPrice)
// Entrée en position long
if (redCandle and greenCandles and higherClose) and strategy.position_size == 0
strategy.entry("Long", strategy.long)
// Sortie de la position
if (not na(stopLossPrice)) and strategy.position_size > 0
strategy.exit("Take Profit/Stop Loss", stop=stopLossPrice, limit=takeProfitPrice)
if strategy.position_size == 0
stopLossPriceD := na
takeProfitPriceD := na
else
stopLossPriceD := stopLossPrice
takeProfitPriceD := takeProfitPrice
// Tracer le stop-loss et le take-profit sur le graphique
plotshape(series=redCandle and greenCandles and higherClose and strategy.position_size == 0, title="Conditions Remplies", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
plotshape(series=redCandle and greenCandles and higherClose and strategy.position_size == 0, title="Conditions Remplies", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
// Afficher les prix du stop-loss et du take-profit
plot(stopLossPriceD, color=color.red, title="Stop Loss Price", linewidth=2, style = plot.style_linebr)
plot(takeProfitPriceD, color=color.green, title="Take Profit Price", linewidth=2, style = plot.style_linebr)