클론 음양 양적 거래 전략은 일간 양 가격 관계를 기반으로 한 단선 거래 전략이다. 이 전략은 일간 주식 거래의 음양 방향 정보를 활용하여 양을 확인할 수 있는 신호와 결합하여 낮은 위험의 단선 작업을 수행한다.
이 전략은 ATR 지표와 결합하여 주식의 매일 개시 가격, 종료 가격, 최고 가격, 최저 가격을 계산하여 Renko 블록을 생성합니다. 양양 블록이 역전되면 거래 신호를 생성합니다.
구체적으로, 전략은 먼저 렌코 블록의 오프닝 가격 o2와 오프닝 가격 c2를 계산한다. 만약 o2c2, 음선을 나타낸다. 양선이 양선으로 바뀌면 매출 신호가 발생하고, 양선이 양선으로 바뀌면 매수 신호가 발생한다.
가짜 돌파구를 필터링하기 위해, 전략은 전날 선과 음의 주기 수를 통산하고, 선의 주기 수가 많으면 신호가 더 신뢰할 수 있다. 또한, 전략은 구매 및 판매 후 중지 손실 막 논리를 설정한다.
레노 블록은 시장의 소음을 필터링하여 거래 신호를 더 명확하게 만듭니다.
융합 에너지 관계, 가짜 돌파의 위험을 피한다.
DAPM 모델은 간단하고 효과적이며, 하루 단시간 운영에 적합하다.
사용자 정의 ATR 변수가 거래 주파수를 조정한다.
맞춤형 H&P 전략, 최적화된 위험 관리.
하지만, 아직까지 미확인된 가짜 침입의 위험은 남아있다.
렌코 변수 설정이 잘못되면 트렌드를 놓치거나 거래 빈도를 증가시킬 수 있습니다.
스톱포인트가 너무 작게 설정되면 미세한 손실이 반발하여 스톱포인이 발생할 수 있다.
다른 기술 지표와 결합하여 필터링 신호를 고려할 수 있다.
이동 중지 기능이나 추적 중지 기능을 추가하는 것을 고려할 수 있습니다.
다양한 품종의 매개 변수에 대해 최적화 테스트를 수행할 수 있다.
다른 시간 주기들의 조합을 고려할 수 있으며, 여러 시간 프레임 거래가 가능하다.
이 전략은 전반적으로 매우 실용적인 단선 거래 전략이다. 그것은 양과 가격 관계를 사용하여 효율적인 필터링을 통해 단선 가격의 상승과 하향의 핵심 지점을 잡을 수 있다. 또한 합리적인 변수 설정, 적절한 위험 관리 및 중단 전략에 주의를 기울이는 것도 필요합니다. 전략의 안정성과 수익성을 크게 향상시킬 수 있다. 지속적인 최적화 테스트를 통해 이 전략은 하루 단선 거래자가 필수적인 강력한 도구가 될 수 있다.
/*backtest
start: 2022-09-26 00:00:00
end: 2023-09-26 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
// This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License https://creativecommons.org/licenses/by-sa/4.0/
// © dman103
strategy(title="Renko Strategy V2", shorttitle="Renko Strategy V2", overlay=true,precision=3, commission_value=0.025, default_qty_type=strategy.cash, default_qty_value=10000, initial_capital=10000)
// Version 2.0 of my previous renko strategy using Renko calculations, this time without Tilson T3 and without using security with Renko to remove repaints!
// Seems to work nicely on cryptocurrencies on higher time frames.
//== Description ==
// Strategy gets Renko values and uses renko close and open to trigger signals.
// Base on these results the strategy triggers a long and short orders, where green is uptrending and red is downtrending.
// This Renko version is based on ATR, you can Set ATR (in settings) to adjust it.
// == Notes ==
// Supports alerts.
// Supports backtesting time ranges.
// Shorts are disabled by default (can be enabled in settings).
// Link to previous Renko strategy V1: https://www.tradingview.com/script/KeWBWLGT-Renko-Strategy-T3-V1/
//
// Stay tuned for version V3 in the future as i have an in progress prototype, Follow to get updated: https://www.tradingview.com/u/dman103/#published-scripts
// === INPUT BACKTEST RANGE ===
useDate = input(true, title='---------------- Trade Range ----------------', type=input.bool)
FromMonth = input(defval = 1, title = "From Month", minval = 1, maxval = 12)
FromDay = input(defval = 1, title = "From Day", minval = 1, maxval = 31)
FromYear = input(defval = 2017, title = "From Year", minval = 2000)
ToMonth = input(defval = 1, title = "To Month", minval = 1, maxval = 12)
ToDay = input(defval = 1, title = "To Day", minval = 1, maxval = 31)
ToYear = input(defval = 2099, title = "To Year", minval = 2010)
start = timestamp(FromYear, FromMonth, FromDay, 00, 00) // backtest start window
finish = timestamp(ToYear, ToMonth, ToDay, 23, 59) // backtest finish window
window() => time >= start and time <= finish ? true : false // create
settings = input(true, title='---------------- Settings ----------------', type=input.bool)
allow_short = input(false,title="Allow Short")
atr_len = input(10,"ATR Length")
atr = atr(atr_len)
// Thanks to renko snippet calculations from @RafaelZioni https://www.tradingview.com/script/2vKhpfVH-Renko-XZ/
Renko1() =>
p1 = 0.0
p1 := close > nz(p1[1]) + atr ? nz(p1[1]) + atr : close < nz(p1[1]) - atr ? nz(p1[1]) - atr : nz(p1[1])
p1
Renko2() =>
p2 = 0.0
Br_1 = Renko1()
p2 := Renko1() != Renko1()[1] ? Br_1[1] : nz(p2[1])
p2
Renko3() =>
p3 = 0.0
p3 := open > nz(p3[1]) + atr ? nz(p3[1]) + atr : open < nz(p3[1]) - atr ? nz(p3[1]) - atr : nz(p3[1])
p3
Renko4() =>
open_v = 0.0
Br_2 = Renko3()
open_v := Renko3() != Renko3()[1] ? Br_2[1] : nz(open_v[1])
open_v
o2 = Renko4()
c2 = Renko1()
l2 =low
h2 = high
//=== Plotting ===
crossPlot= 0.0
if (o2 < c2)
crossPlot :=o2
else
crossPlot := o2
// Used to make sure that even if o2 and c2 are equal, the result (short or long) will be based on previous trend.
bars_since_up=barssince(o2 < c2)
bars_since_down=barssince(o2 > c2)
go_long= (bars_since_up<bars_since_down) and o2<c2
go_short = (bars_since_up>bars_since_down) and o2>c2
plotColor = go_long and o2<c2 ? color.green : go_short and o2>c2? color.red : color.white
plot(crossPlot, color = plotColor, style = plot.style_circles, linewidth = 2,join=true)
changeCond = plotColor != plotColor[1]
//=== Buy/Sell ===
closeStatus = strategy.openprofit > 0 ? "win" : "lose"
long_entry = plotColor == color.green and window() and changeCond
long_exit_entry = plotColor == color.red //or (allow_alternative_sl and close < low_result )
short_entry = plotColor == color.red and window() and changeCond
short_exit_entry = plotColor == color.green // or (allow_alternative_sl and close > high_result )
strategy.entry("long", true, when = long_entry)
strategy.close("long",when=long_exit_entry,comment=closeStatus)
if (allow_short)
strategy.entry("short",false, when = short_entry)
strategy.close("short",when=short_exit_entry,comment=closeStatus)
//=== Alerts ===
alertcondition(go_long and changeCond , title='Renko Buy Signal', message='Renko Revered to Buy Signal')
alertcondition(go_short and changeCond , title='Renko Sell Signal', message='Renko Revered to Sell Signal')