
황소 시장 회귀 짧은 라인 전략은 트렌드 추적 전략이다. 황소 시장에서 회귀를 구입하고 큰 손실을 설정하여 수익을 내기 위해 출전한다. 이 전략은 황소 시장에 주로 적용되며 초과 수익을 얻을 수 있다.
이 전략은 먼저 최근 특정 주기 동안의 종결 가격 변화의 폭을 계산하고, 주가가 설정된 회귀의 폭을 넘어 떨어지면 구매 신호를 발산한다. 동시에, 종결 가격보다 높은 이동 평균을 요구하며, 이는 상승 추세를 확인하는 조건이다.
진입 후, 중지 손실 및 중지 가격을 설정하십시오. 중지 손실이 크면 자금의 충분한 요구 사항을 충족합니다. 중지 손실이 작으면 신속하게 수익을 얻습니다. 중지 손실 또는 중지 문제가 발생하면 상장을 종료합니다.
이 전략은 다음과 같은 장점을 가지고 있습니다.
이 전략에는 위험도 있습니다.
대책: 포지션 규모를 엄격히 통제하고, 스톱 손실을 조정하고, 스톱 탈퇴 비율을 적절히 축소하고, 위험을 줄입니다.
이 전략은 다음과 같은 부분에서 최적화될 수 있습니다.
황소 시장 회귀 짧은 라인 전략, 더 높은 손실로 대가로 과잉 수익. 그것은 트렌드 판단과 회귀 구매의 조합을 사용하여 황소 시장 시장 상황이 가져오는 기회를 효과적으로 얻을 수 있습니다. 변수 조정 및 위험 제어를 통해 더 나은 안정적인 수익을 얻을 수 있습니다.
/*backtest
start: 2023-12-30 00:00:00
end: 2024-01-29 00:00:00
period: 1h
basePeriod: 15m
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/
// © Coinrule
//@version=3
strategy(shorttitle='Scalping Dips On Trend',title='Scalping Dips On Trend (by Coinrule)', overlay=true, initial_capital = 1000, default_qty_type = strategy.percent_of_equity, default_qty_value = 30, commission_type=strategy.commission.percent, commission_value=0.1)
//Backtest dates
fromMonth = input(defval = 1, title = "From Month")
fromDay = input(defval = 10, title = "From Day")
fromYear = input(defval = 2020, title = "From Year")
thruMonth = input(defval = 1, title = "Thru Month")
thruDay = input(defval = 1, title = "Thru Day")
thruYear = input(defval = 2112, title = "Thru Year")
showDate = input(defval = true, title = "Show Date Range")
start = timestamp(fromYear, fromMonth, fromDay, 00, 00) // backtest start window
finish = timestamp(thruYear, thruMonth, thruDay, 23, 59) // backtest finish window
window() => true
inp_lkb = input(1, title='Lookback Period')
perc_change(lkb) =>
overall_change = ((close[0] - close[lkb]) / close[lkb]) * 100
// Call the function
overall = perc_change(inp_lkb)
//MA inputs and calculations
MA=input(50, title='Moving Average')
MAsignal = sma(close, MA)
//Entry
dip= -(input(2))
strategy.entry(id="long", long = true, when = overall< dip and MAsignal > close and window())
//Exit
Stop_loss= ((input (10))/100)
Take_profit= ((input (3))/100)
longStopPrice = strategy.position_avg_price * (1 - Stop_loss)
longTakeProfit = strategy.position_avg_price * (1 + Take_profit)
strategy.close("long", when = close < longStopPrice or close > longTakeProfit and window())