SMA-3 거래 전략

저자:차오장, 날짜: 2023-09-11 08:33:43
태그:거래기술 분석이동 평균SMA추세발작위험 관리돈 관리

SMA-3 거래 전략은 거래 기회를 식별하기 위해 3 개의 간단한 이동 평균을 사용하는 기술 분석 접근법입니다. 트레이더 노로 (Noro) 에 의해 만들어졌으며 단기 가격 추세를 활용하는 것을 목표로합니다.

어떻게 작동 합니까?

이 전략은 3개의 SMA 라인을 이용한다. 중간 라인, 상위 라인, 하위 라인이다. 중간 SMA는 폐쇄 가격을 추적한다. 상위와 하위 SMA는 중간 SMA 위와 아래의 고정된 비율로 오프셋된다.

가격이 상단 SMA보다 상위를 넘으면 긴 포지션을 입력합니다. 가격이 하단 SMA보다 낮을 때 짧은 포지션을 취합니다. 수익 목표물은 반대 SMA 라인에 설정됩니다.

SMA 매개 변수, 자본 할당, 날짜 필터 및 기타 설정은 사용자 정의 할 수 있습니다. 전략은 반대 방향으로 SMA 파업이 발생 할 때까지 단기 트렌드를 타는 것을 목표로합니다.

이점 과 위험

SMA-3의 주요 장점은 단순성이다. 이동 평균 크로스오버로 확인된 높은 확률의 브레이크오버를 활용하는 것을 목표로 한다. 고정 비율의 스톱은 추세가 계속되면 수익을 확보하는 데 도움이 된다.

그러나 모든 기술 전략과 마찬가지로, 그것은 윙사와 잘못된 브레이크오웃에 예민합니다. 입출입의 미끄러짐은 수익성을 침식시킬 수 있습니다. SMA 길이를 최적화하고 오프셋 비율은 결과를 위해 중요합니다.

이 전략은 부적절하거나 변동적인 시장에서 낮은 성과를 낼 수 있습니다. 포지션 사이징을 할 때 엄격한 리스크 관리가 권장됩니다. 신중한 돈 관리를 적용하는 것이 중요합니다.

전반적으로, SMA-3는 단기 가격 변동 거래에 대한 간결한 접근 방식을 제공합니다. 적절하게 구현되면 견고 할 수 있지만 정밀 조정과 규율이 필요합니다. 후속 정지 및 신중한 조정은 전략의 장기성을 도울 수 있습니다.


/*backtest
start: 2022-09-04 00:00:00
end: 2023-09-10 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//Noro
//2018

//@version=2
strategy(title = "Noro's SMA-3 Strategy v1.0", shorttitle = "SMA-3 str 1.0", overlay = true, default_qty_type = strategy.percent_of_equity, default_qty_value = 100, pyramiding = 5)

//Settings
needlong = input(true, defval = true, title = "Long")
needshort = input(false, defval = false, title = "Short")
capital = input(100, defval = 100, minval = 1, maxval = 10000, title = "Capital, %")
p = input(20, "bars")
d = input(15, "percent")
showlines = input(true, defval = true, title = "Show Lines?")
fromyear = input(1900, defval = 1900, minval = 1900, maxval = 2100, title = "From Year")
toyear = input(2100, defval = 2100, minval = 1900, maxval = 2100, title = "To Year")
frommonth = input(01, defval = 01, minval = 01, maxval = 12, title = "From Month")
tomonth = input(12, defval = 12, minval = 01, maxval = 12, title = "To Month")
fromday = input(01, defval = 01, minval = 01, maxval = 31, title = "From day")
today = input(31, defval = 31, minval = 01, maxval = 31, title = "To day")

//SMAs
sma = sma(close, p)
upex = sma * ((100 + d) / 100)
dnex = sma * ((100 - d) / 100)
exit = high > sma and low < sma

//Lines
col = showlines ? blue : na
plot(upex, linewidth = 3, color = col, transp = 0)
plot(sma, linewidth = 3, color = col, transp = 0)
plot(dnex, linewidth = 3, color = col, transp = 0)

//Trading
lot = strategy.position_size != strategy.position_size[1] ? strategy.equity / close * capital / 100 : lot[1]

if true
    strategy.entry("Long", strategy.long, needlong == false ? 0 : lot, limit = dnex, when = (time > timestamp(fromyear, frommonth, fromday, 00, 00) and time < timestamp(toyear, tomonth, today, 23, 59)))
    strategy.entry("Short", strategy.short, needshort == false ? 0 : lot, limit = upex, when = (time > timestamp(fromyear, frommonth, fromday, 00, 00) and time < timestamp(toyear, tomonth, today, 23, 59)))

if time > timestamp(toyear, tomonth, today, 23, 59) or exit
    strategy.close_all()

관련

더 많은