30분 스윙 트레이딩 전략


생성 날짜: 2023-09-14 17:44:03 마지막으로 수정됨: 2023-09-14 17:44:03
복사: 0 클릭수: 859
avatar of ChaoZhang ChaoZhang
1
집중하다
1617
수행원

전략 원칙

이 전략은 30분 시간 프레임에서 짧은 선의 흔들림 기회를 사용하는 것을 목표로 한다. 그것은 이동 평균, RSI 지표 등을 통합적으로 사용하여 시장의 방향과 입시 시간을 판단한다.

주요 거래 논리:

  1. 두 개의 가중 이동 평균 주기의 다른 평균선을 계산하고 두 가지의 방향을 비교

  2. RSI를 계산하여 과매매 현상을 판단합니다.

  3. RSI 지표가 오버 소드 영역에 있을 때, 그 지점의 흔들림 거래 기회를 고려하십시오.

  4. 평선 방향과 결합하여 구체적인 도모 방향 확인

  5. 출입 후 합리적인 스톱로스를 설정하여 위험을 통제합니다.

이 전략은 중단계 가격의 역전 기회를 잡기 위해 시도되며, 엄격한 자금 관리 하에서, 자주 거래함으로써 자금의 성장을 달성한다.

전략적 이점

  • 30분이면 짧은 주기의 진동을 알아낼 수 있습니다.

  • RSI는 오버 바이 오버 세일로 많은 역전 기회를 판단합니다.

  • 가중 이동 평균 평평한 가격

전략적 위험

  • 시장의 변화를 자주 감시해야 합니다.

  • 회귀는 불확실하며 손실이 발생할 수 있습니다.

  • 높은 주파수 거래는 거래 비용을 증가시킬 것입니다.

요약하다

이 전략은 30분 주기로 채굴하여 짧은 선의 흔들림 기회를 시도한다. 그러나 거래 빈도가 높기 때문에 비용 통제에 주의를 기울이고 전략 매개 변수를 최적화하여 지속적인 수익을 창출해야 한다.

전략 소스 코드
/*backtest
start: 2023-08-14 00:00:00
end: 2023-09-13 00:00:00
period: 2h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=2
// strategy("cowboy30minswing", overlay=true,default_qty_type=strategy.cash,default_qty_value=10000,scale=true,initial_capital=10000,currency=currency.USD)

//A Swing trading strategy that use a combination of indicators, rsi for target, hull for overall direction enad ema for entering the trade using the 30min


n=input(title="period",defval=70)

n2ma=2*wma(close,round(n/2))
nma=wma(close,n)
diff=n2ma-nma
sqn=round(sqrt(n))

n2ma1=2*wma(close[1],round(n/2))
nma1=wma(close[1],n)
diff1=n2ma1-nma1
sqn1=round(sqrt(n))

n1=wma(diff,sqn)
n2=wma(diff1,sqn)
c=n1>n2?green:red
ma=plot(n1,color=c)



// RSi and Moving averages

length = input( 14 )
overSold = input( 70)
overBought = input( 30)
point = 0.0001
dev= 2

fastLength = input(59)
fastLengthL = input(82)
slowLength = input(96)
slowLengthL = input(95)
price = close

mafast = ema(price, fastLength)
mafastL= ema(price, fastLengthL)
maslow = ema(price, slowLength)
maslowL = ema(price, slowLengthL)
vrsi = rsi(price, length)
cShort =  (crossunder(vrsi, overBought))

condDown = n2 >= n1
condUp = condDown != true



col =condUp ? lime : condDown ? red : yellow
plot(n1,color=col,linewidth=3)




 


sl = input(75)
Stop = sl * 10
Q = 100





//plot(strategy.equity, title="equity", color=red, linewidth=2, style=areabr)
if condUp
    strategy.entry("Enter Long", strategy.long)
else if condDown
    strategy.entry("Enter Short", strategy.short)