[trans]
점진적으로 평행한 평행선 동시 전략은 RENKO 차트를 기반으로 한 거래 전략이다. 이 전략은 평행선 indicaotr를 사용하여 가격을 부드럽게 처리하고, 다른 시간 주기 평행선의 교차를 구매 신호로 이용한다. 이 전략은 또한 ATR 지표에 따라 중지 지점을 결정하여 중지 손실을 더 합리적으로 만든다.
이 전략은 다음의 몇 가지 부분으로 이루어집니다.
입력으로 RENKO 시간 주기 및 ATR 주기 선택
RENKO 가격과 색상을 계산하여, 가격이 이전 RENKO 가격과 현재 ATR을 더하면 으로 변하고, 이전 RENKO 가격과 현재의 ATR을 빼면 0으로 변합니다.
두 개의 정수인 BUY와 SELL을 사용하여 현재 다중 주문과 빈 주문 수를 기록합니다.
을 뚫을 때, 공백이 없다면 더 많이 열리고, 공백이 있다면 평평해집니다. 파산할 때, 만약 더 많은 상자가 없다면 공백이 되고, 더 많은 상자는 평평해집니다.
RENKO 지도를 plot로 그리기
이러한 논리를 통해, 전략은 가격 파격 전의 레벨에 대해 포지션을 열고 더 많은 공백을 할 수 있으며, 가격이 반전되면 현재 포지션을 평면화 할 수 있습니다. 또한, ATR을 사용하여 파격 범위를 결정하는 것은 현재의 변동률에 따라 합리적인 중지 위치를 결정할 수 있습니다.
이 전략에는 다음과 같은 장점이 있습니다.
RENKO를 사용하여 노이즈를 제거하고 트렌드를 파악합니다. RENKO 도표는 가격 변동의 소음을 효과적으로 제거하고 더 명백한 트렌드 방향을 식별할 수 있습니다. 이것은 트렌드를 발견하고 트렌드를 따르는 훌륭한 조합입니다.
평행선 교차는 거래 신호를 발산합니다. 다른 시간 주기 평균선 교차는 더 신뢰할 수 있는 거래 신호 지표로, 잡음 속임수를 피한다.
ATR 동적 상쇄 ATR를 사용하여 동적으로 스톱피스를 설정하면 현재 변동률에 따라 합리적으로 스톱피스를 설정할 수 있으며, 스톱피스가 너무 크거나 너무 작지 않도록 할 수 있다.
추세와 평균을 고려하는 것 트렌드 및 평균 지표의 조합으로, 두 가지의 장점을 동시에 활용할 수 있으며, 트렌드를 포착하면서 거래 신호를 더욱 신뢰할 수 있습니다.
이 전략에는 몇 가지 위험도 있습니다.
트렌드 판단 오류 RENKO가 가격 동향을 결정하는 방식에 오류가 있을 수 있으며, 이로 인해 불필요한 매매가 발생한다. 잘못된 판단을 줄이기 위해 매개 변수를 최적화해야 한다.
평선 교차 가짜 신호 평선 교차 신호에는 가짜 신호가 존재할 수 있으며, 이는 불필요한 매매 행동을 초래할 수 있다. 평선 주기 파라미터를 적절히 최적화할 수 있다.
ATR 변수가 잘못되었습니다. ATR 주기 설정이 잘못되면 너무 큰 또는 너무 작은 스톱로스가 발생할 수 있습니다. 다른 시장에서 더 나은 파라미터를 결정하는 테스트가 필요합니다.
큰 충격 수평과 큰 변동이 있는 상황에서, RENKO 차트는 많은 불필요한 거래가 발생하여 자금을 차지하게 됩니다. 이것은 다른 지표에 의해 필터링이 필요하며, 이러한 거래는 피할 수 있습니다.
이 전략은 다음과 같은 방향으로 최적화될 수 있습니다.
RENKO와 ATR 변수를 최적화 이 두 개의 변수를 조정하면 RENKO의 잘못된 판단을 최소화 할 수 있으며, RENKO는 트렌드를 더 정확하게 파악할 수 있습니다.
평행한 가로 필터를 추가합니다. 더 많은 평행선을 추가하고, 대부분의 평행선이 동방향으로 교차하기 전에 신호를 생성하여 가짜 신호를 필터링 할 수 있다.
다른 지표 필터를 추가 예를 들어, 증가된 양력 지표는 양력이 동향 확인될 때만 거래 신호를 생성하여, 함축되는 것을 피할 수 있다.
손해 방지 전략의 최적화 ATR을 추적하는 것보다 트렌드 반전할 때만 손실을 멈추는 방법을 연구할 수 있습니다.
자금 관리 최적화 이 전략에 따라 수익률을 높이는 동시에 위험을 통제하는 최적화된 자금 관리 방법을 연구한다.
이 전략은 전체적으로 최적화 및 실전 검증에 가치가 있는 전략으로, 핵심 아이디어는 RENKO를 사용하여 트렌드를 식별하고, 평행선 교차를 필터링된 거래 신호로 사용한다. ATR 동적 스톱을 결합하면, 유리한 트렌드 추적 전략이 될 수 있다. 다음 단계는 알려진 위험에 대한 최적화 테스트를 계속해야 하며, 전략 매개 변수를 더 완성시켜서 더 나은 실전 실전 성능을 얻을 수 있다.
||
The Level by Level Build Up Moving Average Strategy is a trading strategy based on RENKO charts. It uses moving average indicators to smooth price and crossovers between moving averages of different timeframes as trading signals. Meanwhile, it also uses the ATR indicator to determine stop loss levels for more reasonable stops.
The core logic of this strategy includes:
Use input to select RENKO timeframe and ATR period
Calculate RENKO price and color. Turn to up when price breaks above previous RENKO price plus current ATR. Turn to down when price falls below previous RENKO price minus current ATR.
Use two integers BUY and SELL to record current long and short positions.
When up breakout, if no short position then go long. If already short then close short position. When down breakout, if no long position then go short. If already long then close long position.
Plot RENKO chart using plot.
With this logic, the strategy can open long or short when price breaks previous level, and close positions when price reverse. Using ATR to determine breakout range makes stop loss more reasonable based on current volatility.
This strategy has the following advantages:
RENKO filters noise and identifies trends RENKO can effectively filter price noise and identify significant trends. This combination is great for trend detection and following.
Moving average crossovers generate trading signals Crossovers between moving averages of different timeframes can provide reliable trading signals and avoid false signals from noise.
Dynamic stops with ATR Using ATR to dynamically set stop loss can make stops more reasonable based on current volatility, avoiding stops too wide or too tight.
Combination of trend and moving average Combining trend and moving average indicators utilizes the strengths of both - catching trends with RENKO while ensuring reliable signals with moving averages.
The strategy also has some risks:
Incorrect trend identification The way RENKO determines trends may result in unnecessary longs or shorts. Parameters need to be optimized to reduce false signals.
False signals from moving average crossovers
There can be false signals from moving average crossovers, causing unnecessary trades. Moving average periods could be optimized.
Improper ATR parameters Improper ATR period setting can also lead to stops too wide or too tight. Different markets should be tested for optimal parameters.
Whipsaw markets In sideways or strong whipsaw markets, RENKO may generate many unnecessary trades, occupying capital. Other filters are needed to avoid trading such markets.
The strategy can be optimized in the following aspects:
Optimize RENKO and ATR parameters
Adjust these parameters to minimize RENKO false signals and better catch trends.
Add moving average crossover filters Add more moving averages and require most of them to align before generating signals, to filter false signals.
Add other indicator filters For example, add volume to only take trades when volume confirms price, avoiding traps.
Improve stop loss strategy Research how to use trend-based stops instead of simply tracking ATR, for more logical stops.
Optimize money management Research optimal capital allocation under this strategy to maximize returns while controlling risks.
Overall this is a strategy worth optimizing and testing in live markets. The core idea of using RENKO for trend and moving average crossovers as filtered signals is sound. With dynamic ATR stops it can become a solid trend following system. The next step is to continue optimizing it based on the known risks to improve parameters and performance.
/*backtest
start: 2022-09-19 00:00:00
end: 2023-09-25 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
strategy("Renko Level Strategy 2", shorttitle="RLS2", overlay=true, pyramiding=2, currency=currency.USD, default_qty_value=50, initial_capital=2000, default_qty_type=strategy.percent_of_equity)
TF = input(title='TimeFrame', type=input.resolution, defval="D")
ATRlength = input(title="ATR length", type=input.integer, defval=14, minval=2, maxval=100)
HIGH = security(syminfo.tickerid, TF, high)
LOW = security(syminfo.tickerid, TF, low)
CLOSE = security(syminfo.tickerid, TF, close)
ATR = security(syminfo.tickerid, TF, atr(ATRlength))
float RENKO = na
color COLOR = na
int BUY = na
int SELL = na
bool UP = na
bool DN = na
RENKO := na(RENKO[1]) ? close : RENKO[1]
COLOR := na(COLOR[1]) ? color.white : COLOR[1]
BUY := na(BUY[1]) ? 0 : BUY[1]
SELL := na(SELL[1]) ? 0 : SELL[1]
UP := false
DN := false
if(close > RENKO[1]+ATR[1])
UP := true
RENKO := close
COLOR := color.lime
SELL := 0
BUY := BUY+1
if(close < RENKO[1]-ATR[1])
DN := true
RENKO := close
COLOR := color.red
BUY := 0
SELL := SELL+1
if(BUY[1]==1 and BUY==2)
strategy.entry("long", strategy.long)//, limit = RENKODN)
if(DN)
strategy.cancel_all()
strategy.close_all(comment = "close")
plot(RENKO, style=plot.style_line, linewidth=2, color=COLOR)