
이 전략은 양평선 교차와 RSI 지표를 결합하여 트렌드 방향과 오버 바이 오버 소드를 식별합니다. 구매 조건이 충족되면 더 많이 구매하고 판매 조건이 충족되면 더 적게 구매합니다. 이 전략은 트렌드 방향을 결정하기 위해 평평선 교차를 사용하며 RSI 지표를 사용하여 시장의 상단에서 더 많이 구매하지 않고 시장의 하단에서 더 많이 구매하지 않도록합니다.
빠른 9주기 평균선에서 느린 50주기 평균선을 통과할 때, 단기 트렌드 상승이 장기 트렌드 상승에 중첩되는 것을 나타내는 전형적인 멀티 헤드 신호에 속한다. 한편, RSI 지표가 이전 주기 5점보다 크고 70점보다 작으면, 과매 이전 영역에 있다는 것을 나타내는데, 이 때 더 많이 하는 것이 더 적절한 시간이다.
빠른 9주기 평균선 아래에서 느린 50주기 평균선을 통과하면 공백 시장에 있다는 것을 나타내고, 평지 자세가 필요하다.
이 전략은 양평선 교차 판단 방향과 RSI 추종을 피하여 상위 추종을 피하여 중장선 추세를 효과적으로 활용하여 안정적인 수익을 얻을 수 있습니다. 그러나 또한 평평선 교차 신호의 지연성과 RSI 매개 변수의 조정을 경계해야하며 가격과 거래량과의 관계를 고려해야합니다. 지속적인 테스트 및 최적화를 통해이 전략은 더 나은 효과를 얻을 수 있습니다.
/*backtest
start: 2022-11-14 00:00:00
end: 2023-11-20 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/
// © joshuajcoop01
//@version=5
strategy("Bitpanda Coinrule Template",
overlay=true,
initial_capital=1000,
process_orders_on_close=true,
default_qty_type=strategy.percent_of_equity,
default_qty_value=30,
commission_type=strategy.commission.percent,
commission_value=0.1)
showDate = input(defval=true, title='Show Date Range')
timePeriod = time >= timestamp(syminfo.timezone, 2020, 1, 1, 0, 0)
notInTrade = strategy.position_size <= 0
// RSI
length = input(14)
vrsi = ta.rsi(close, length)
// Moving Averages for Buy Condition
buyFastEMA = ta.ema(close, 9)
buySlowEMA = ta.ema(close, 50)
buyCondition1 = ta.crossover(buyFastEMA, buySlowEMA)
increase = 5
if ((vrsi > vrsi[1]+increase) and buyCondition1 and vrsi < 70 and timePeriod)
strategy.entry("Long", strategy.long)
// Moving Averages for Sell Condition
sellFastEMA = ta.ema(close, 9)
sellSlowEMA = ta.ema(close, 50)
plot(request.security(syminfo.tickerid, "60", sellFastEMA), color = color.blue)
plot(request.security(syminfo.tickerid, "60", sellSlowEMA), color = color.green)
condition = ta.crossover(sellSlowEMA, sellFastEMA)
//sellCondition1 = request.security(syminfo.tickerid, "60", condition)
strategy.close('Long', when = condition and timePeriod)