
반전 상장 삼키기 전략은 주식의 첫 번째 K선에 기반한 간단한 일일 거래 전략이다. 이 전략의 핵심 아이디어는 매일 상장 후 첫 번째 K선이 나타나면, 그 상승과 하락의 방향을 판단하고, 반전 작업을 한다. 첫 번째 K선이 빨간 선이라면, 더 많이 하고, 첫 번째 K선이 초록 선이라면, 공백하게 한다. 이 전략은 동시에 중지 손실과 중지 출구 메커니즘을 설정한다.
이 전략의 원리는 오픈 후 첫 번째 K 라인의 특수성에 기초한다. 오픈 시에는 다공이 양쪽의 힘이 가장 격렬하게 대립하고, 상황이 역전될 확률이 높다. 첫 번째 K 라인의 하락 방향을 판단하고, 그 반대로 진행하는 것이 이 전략의 핵심 사상이다.
구체적으로, 새로운 하루의 오픈 후, 전략은 첫 번째 K 라인의 오픈 가격, 클로징 가격 및 하락 상황을 기록합니다. 오픈 가격이 클로징 가격 (녹색 음선), 공백을 나타낸다면 승리하면 더 많이; 오픈 가격이 클로징 가격 (붉은 선), 다중을 나타낸다면 승리하면 더 많이합니다. 이러한 역전화 작업을 통해 전략은 오픈 후의 역전 기회를 잡으려고합니다.
동시에, 전략은 다중 중단 가격, 다중 중단 가격, 다중 중단 가격 및 다중 중단 가격, 다중 휴식 가격에 대한 위험과 수익을 제어하기 위해 과도한 손실 또는 조기 삭감을 방지하기 위해 중단 및 중지 장치를 설정합니다.
반전 상장 삼키는 전략은 다음과 같은 장점이 있습니다.
이 아이디어는 간단하고 명확하며, 이해하기 쉽고, 실행하기 쉽습니다.
오픈 시기의 높은 예측 가치 특성을 활용하여 역전 기회를 잡습니다.
또한 스톱 로즈 스톱을 설정하여 위험을 효과적으로 제어할 수 있습니다.
전략적 사고는 대부분의 주식에 적용할 수 있는 범용성이 있다.
참여 비용이 낮고, 자금 통제가 쉽다.
리버스 오픈 삼키기 전략에는 다음과 같은 위험 요소가 있습니다.
디스크 역전 실패의 확률. K 라인의 역전 신호가 실패하면 큰 손실이 발생할 수 있다.
낮은 품질의 주식을 효과적으로 필터링 할 수 없습니다. 이 전략은 주식의 기초 분석이 부족하여 기초가 좋지 않은 몇 가지 나쁜 주식을 선택할 수 있습니다.
중요한 부정적인 뉴스 측면의 영향과 같은 급격한 사건의 체계적 위험을 효과적으로 제어할 수 없습니다.
상쇄금지장치 설정이 잘못되면 손실이 커지거나 이익이 줄어들 수 있습니다.
리버스 디스크 삼키는 전략은 다음과 같은 측면에서 최적화 될 수 있습니다:
디스크 역전 신호의 유효성 검사를 추가하여 유효하지 않은 신호를 피한다. 예를 들어 합성 교통량 분석이다.
주식 기본 사항과 기술 지표를 결합하여 주식 풀의 우수한 선택을 수행하고, 저품질의 주식을 필터링한다.
주요 사건과 뉴스 측면에 대한 모니터링 모듈을 추가하고, 체계적인 위험을 제어한다.
유전 알고리즘, 기계 학습 등의 방법을 사용하여 역동적으로 손해 차단 설정을 최적화한다.
역 디스크 삼키기 전략은 첫 번째 K 라인의 방향을 판단하고 역 동작을 수행하여 디스크를 열고 뒤집는 기회를 잡으려고 노력한다. 이 전략은 아이디어가 간단하고 참여 비용이 낮으며 실제적인 가치가 있습니다. 그러나 우리는 그 위험성을 인식하고 실제적으로 지속적으로 개선하고 최적화하여 더 안정적이고 신뢰할 수 있도록 해야합니다.
/*backtest
start: 2023-10-22 00:00:00
end: 2023-11-21 00:00:00
period: 3h
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/
// © vikris
//@version=4
strategy("[VJ]First Candle Strategy", overlay = true,calc_on_every_tick = true,default_qty_type=strategy.percent_of_equity,default_qty_value=100,initial_capital=750,commission_type=strategy.commission.percent,
commission_value=0.02)
// ********** Strategy inputs - Start **********
// Used for intraday handling
// Session value should be from market start to the time you want to square-off
// your intraday strategy
// Important: The end time should be at least 2 minutes before the intraday
// square-off time set by your broker
var i_marketSession = input(title="Market session", type=input.session,
defval="0915-1455", confirm=true)
// Make inputs that set the take profit % (optional)
longProfitPerc = input(title="Long Take Profit (%)",
type=input.float, minval=0.0, step=0.1, defval=1) * 0.01
shortProfitPerc = input(title="Short Take Profit (%)",
type=input.float, minval=0.0, step=0.1, defval=1) * 0.01
// Set stop loss level with input options (optional)
longLossPerc = input(title="Long Stop Loss (%)",
type=input.float, minval=0.0, step=0.1, defval=0.5) * 0.01
shortLossPerc = input(title="Short Stop Loss (%)",
type=input.float, minval=0.0, step=0.1, defval=0.5) * 0.01
// ********** Strategy inputs - End **********
// ********** Supporting functions - Start **********
// A function to check whether the bar or period is in intraday session
barInSession(sess) => time(timeframe.period, sess) != 0
// Figure out take profit price
longExitPrice = strategy.position_avg_price * (1 + longProfitPerc)
shortExitPrice = strategy.position_avg_price * (1 - shortProfitPerc)
// Determine stop loss price
longStopPrice = strategy.position_avg_price * (1 - longLossPerc)
shortStopPrice = strategy.position_avg_price * (1 + shortLossPerc)
// ********** Supporting functions - End **********
// ********** Strategy - Start **********
// See if intraday session is active
bool intradaySession = barInSession(i_marketSession)
// Trade only if intraday session is active
//=================Strategy logic goes in here===========================
// If start of the daily session changed, then it's first bar of the new session
isNewDay = time("D") != time("D")[1]
var firstBarCloseValue = close
var firstBarOpenValue = open
if isNewDay
firstBarCloseValue := close
firstBarOpenValue := open
greenCandle = firstBarOpenValue < firstBarCloseValue
redCandle = firstBarOpenValue > firstBarCloseValue
buy = redCandle
sell = greenCandle
// plot(firstBarCloseValue)
// plot(firstBarOpenValue)
//Final Long/Short Condition
longCondition = buy
shortCondition =sell
//Long Strategy - buy condition and exits with Take profit and SL
if (longCondition and intradaySession)
stop_level = longStopPrice
profit_level = longExitPrice
strategy.entry("My Long Entry Id", strategy.long)
strategy.exit("TP/SL", "My Long Entry Id", stop=stop_level, limit=profit_level)
//Short Strategy - sell condition and exits with Take profit and SL
if (shortCondition and intradaySession)
stop_level = shortStopPrice
profit_level = shortExitPrice
strategy.entry("My Short Entry Id", strategy.short)
strategy.exit("TP/SL", "My Short Entry Id", stop=stop_level, limit=profit_level)
// Square-off position (when session is over and position is open)
squareOff = (not intradaySession) and (strategy.position_size != 0)
strategy.close_all(when = squareOff, comment = "Square-off")
// ********** Strategy - End **********