
지표 평평 무작위 지표 이동 전략은 전통적인 무작위 지표의 기초에 지표 중량 변수를 추가하여 무작위 지표의 감성을 조정하여 거래 신호를 생성합니다. 지표가 초고가역에서 반전할 때 더하고 초고가역에서 반전할 때 더하지 않습니다. 이 전략이 최적화되면 매우 안정적인 트렌드 추적 전략이 될 수 있습니다.
지수 평평 무작위 지표 이동 전략의 핵심은 지수 가중 변수 ex ̇이다. 전통적인 무작위 지표의 계산 공식은 다음과 같다:
s=100 * (close - 最低价) / (最高价 - 最低价)
지수 변수를 추가한 후, 계산 공식은 다음과 같다:
exp= ex<10? (ex)/(10-ex) : 99
s=100 * (close - 最低价) / (最高价 - 最低价)
ks=s>50? math.pow(math.abs(s-50),exp)/math.pow(50,exp-1)+50
:-math.pow(math.abs(s-50),exp)/math.pow(50,exp-1)+50
exp의 값을 조정하면, sks에 대한 영향력을 바꿀 수 있으며, exp값을 확대하면 지표가 더 민감하지 않게 되고, exp값을 줄이면 지표가 더 민감하게 된다.
ks가 초매구역에서 반전하면 구매 신호가 발생하고, ks가 초매구역에서 반전하면 판매 신호가 발생한다.
지수 평평 무작위 지표 이동 전략은 전통적인 무작위 전략에 비해 다음과 같은 장점이 있다:
지수 평평 무작위 지표 변동 전략에는 다음과 같은 위험도 있다:
지수 평평 무작위 지표 변동 전략은 다음과 같은 측면에서 최적화할 수 있다:
지수 평평 무작위 지표 변동 전략은 무작위 지표의 감성을 조정하여 더 신뢰할 수 있는 거래 신호를 생성한다. 이 전략은 중장선 트렌드를 효과적으로 추적할 수 있으며, 또한 단선 전략으로 최적화할 수 있다. 복합화 및 변수 최적화로 더 나은 안정적인 수익을 얻을 수 있다.
/*backtest
start: 2023-01-11 00:00:00
end: 2024-01-17 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © faytterro
//@version=5
strategy("Exponential Stochastic Strategy", overlay=false, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
len=input.int(14, "length")
ex=input.int(2, title="exp", minval=1, maxval=10)
exp= ex<10? (ex)/(10-ex) : 99
s=100 * (close - ta.lowest(low, len)) / (ta.highest(high, len) - ta.lowest(low, len))
ks=s>50? math.pow(math.abs(s-50),exp)/math.pow(50,exp-1)+50 :
-math.pow(math.abs(s-50),exp)/math.pow(50,exp-1)+50
plot(ks, color= color.white)
bot=input.int(20)
top=input.int(80)
longCondition = ta.crossover(ks, bot) and bar_index>0
if (longCondition)
strategy.entry("My Long Entry Id", strategy.long)
shortCondition = ta.crossunder(ks, top) and bar_index>0
if (shortCondition)
strategy.entry("My Short Entry Id", strategy.short)
// strategy.close("My Long Entry Id")
alertcondition(longCondition, title = "buy")
alertcondition(shortCondition, title = "sell")
h1=hline(top)
h2=hline(bot)
h3=hline(100)
h4=hline(0)
fill(h1,h3, color= color.rgb(255,0,0,200-top*2))
fill(h2,h4, color= color.rgb(0,255,0,bot*2))