
이 전략은 동적 마크 평균선의 지표를 기반으로, 부린 밴드 및 RSI와 결합하여 거래 신호 필터링을 수행하고, 공백을 만들지 않는 트렌드 추적 전략을 구현한다. 이 전략은 헤이커 라인 종식 가격의 동적 마크 평균선의 변화를 계산하여 트렌드를 판단하고, 부린 밴드와 비교하여 거래 신호를 발산한다. RSI 필터와 결합하여, 트렌드의 폭발점을 효과적으로 식별하고, 트렌드 추적을 구현한다.
이 전략의 핵심은 헤이커 선의 폐가 가격의 동적 마크 평균선의 변화를 계산하는 것이다. 구체적으로, 현재의 K 선과 앞의 두 K 선의 마크 평균선의 차이를 계산하고, 그 후 민감도 계수를 곱하여 정확한 마크 평균선의 변화 값을 얻는다.
그 다음, 이 변화값을 부린띠의 상반도와 하반도의 차치값과 비교한다. 마크 평균선의 변화가 부린띠의 차치값보다 크면, 트렌드가 폭발을 일으킨다고 여겨진다. 그 폭발이 긍정적이면, 즉 마크 평균선이 긍정적으로 변하면, 다중 신호와 녹색 기둥 모양의 선을 생성한다. 폭발이 부정적이면, 즉 마크 평균선이 부정적으로 변하면, 평소 신호와 빨간 기둥 모양의 선을 생성한다.
또한, 이 전략은 RSI 필터를 설정하여 RSI가 하락점보다 높을 때만 더 많은 신호를 발산하여 트렌드 반전의 위험을 방지합니다.
위험 완화 조치에는 다음과 같은 것들이 포함됩니다: 적절한 변수를 조정하여 더 안정적으로, 다른 지표와 결합하여 트렌드 반향을 판단하고, 긴 선의 명확한 트렌드에서만 사용하십시오.
이 전략에는 몇 가지 개선할 수 있는 부분이 있습니다.
더 나은 평준화 효과를 얻기 위해 종점 가격, 평균 등과 같은 다른 가격 소스를 시도하십시오.
마크 평선과 브린 밴드의 주기 변수를 조정하여 다른 품종에 최적화
비율 관계를 감수성 계수를 대체하여 지표 결과를 더 직관적으로 만들려고 시도합니다.
트렌드 평균선, 거래량 등과 같은 다른 필터를 추가하여 신호 품질을 향상시킵니다.
지표 형태에 따라 역행하는 공중전략 개발
위험 통제를 위해 손해배상 제도에 가입하세요
이 전략은 전반적으로 좀 더 안정적인 트렌드 추적 전략이다. 이 전략은 동적 평행선을 사용하여 트렌드 방향을 판단하고, 브린 벨트 폭파점을 식별하고, RSI 필터 가짜 신호를 구현하여, 단지 많은 것을 하는 트렌드 시스템을 구현한다. 그러나 또한 다양한 품종과 주기에 대한 변수 최적화가 필요하며, 하락의 상황에서 이익을 얻을 수 없다. 이 전략은 신호 품질을 더 향상시키고, 공중 전략을 개발하고, 손실을 막는 등의 최적화 공간을 추가하여 더 나은 성과를 얻는다.
/*backtest
start: 2022-11-08 00:00:00
end: 2023-11-14 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
///////////Original Script Courtesy of Lazy_Bear.... Absolute Legend\\\\\\\\\\\\\\\
strategy('SmoothedWaddah', overlay=false, initial_capital=1)
sensitivity = input(150, title='Sensitivity')
fastLength = input(20, title='MacD FastEMA Length')
slowLength = input(40, title='MacD SlowEMA Length')
channelLength = input(20, title='BB Channel Length')
mult = input(1.5, title='BB Stdev Multiplier')
RSI14filter = input(40, title='RSI Value trade filter')
////////////MacD Calculation of price//////////////////////////////
calc_macd(source, fastLength, slowLength) =>
fastMA = ta.ema(source, fastLength)
slowMA = ta.ema(source, slowLength)
fastMA - slowMA
/////////BolingerBand Calculation of Price///////////////////////
calc_BBUpper(source, length, mult) =>
basis = ta.sma(source, length)
dev = mult * ta.stdev(source, length)
basis + dev
calc_BBLower(source, length, mult) =>
basis = ta.sma(source, length)
dev = mult * ta.stdev(source, length)
basis - dev
//////heinkenashi chart call for closing price "smoothing mechanism"\\\\\\\\\\\\\\\\\\\\\\\\\\\
point = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, close)
////////////////////T1 is change in MacD current candle from previous candle Sensitivy amplifies calculation/////////////////////
t1 = (calc_macd(point, fastLength, slowLength) - calc_macd(point[1], fastLength, slowLength)) * sensitivity
//////////////////////T2 is T1 from two candles prior\\\\\\\\\\\\\\\\\\\\\\\\\\\
t2 = (calc_macd(point[2], fastLength, slowLength) - calc_macd(point[3], fastLength, slowLength)) * sensitivity
////////////////E1 is difference in bolinger band upper and lower...E2 is E1 from one candle prior not needed//////////////
e1 = calc_BBUpper(ohlc4, channelLength, mult) - calc_BBLower(ohlc4, channelLength, mult)
//e2 = (calc_BBUpper(close[1], channelLength, mult) - calc_BBLower(close[1], channelLength, mult))
//////signal bar printing.. Up if MacD positive .. Down if MacD negative//////////
trendUp = t1 >= 0 ? t1 : 0
trendDown = t1 < 0 ? -1 * t1 : 0
///////plots difference in macD*Sensitivity, color change if increasing or decreasing.
//////color is green/lime if explosion is up \ color is red/orange if explosion is down/////////
plot(trendUp, style=plot.style_columns, linewidth=1, color=trendUp < trendUp[1] ? color.new(color.lime,45) : color.new(color.green,45), title='UpTrend')
plot(trendDown, style=plot.style_columns, linewidth=1, color=trendDown < trendDown[1] ? color.new(color.orange,45) : color.new(color.red,45), title='DownTrend')
plot(e1, style=plot.style_line, linewidth=2, color=color.new(#A0522D, 0), title='ExplosionLine')
////////////Entry conditions and Concept/////////////////////
////////////Long Only System. T1 is measuring the distance between MACD EMA's. This is Multiplied
////////////by the sensitivity so that it can be compared to the difference between BollingerBand.
/////////////{this could have been a ratio maybe i will work with that in a different script.}
/////////////I found that 135-175 sensitivy allows for values to be compared on most charts.....
////////////If the (difference between the EMA)*(Sensitivity) is greater than (BB upper line- BB lower line)
////////////it is considered an explosion in either the downside or the upside.The indicator will print
///////////a bar higher than the trigger line either green or red (up or down respectively)//////////////////
longCondition = trendUp > e1 and ta.rsi(close, 14) > RSI14filter
if longCondition
strategy.entry('up', strategy.long)
strategy.close('up', trendDown > e1)