
이 전략은 오픈 마켓 노출 (Open Market Exposure, OME) 을 기반으로 한 정량 거래 시스템으로, 누적된 OME 값을 계산하여 시장 움직임을 판단하고, 샤프 비율과 같은 위험 제어 지표와 결합하여 거래 결정을 내립니다. 이 전략은 다이내믹한 스톱 손실 메커니즘을 채택하여 수익을 보장하면서 위험을 효과적으로 제어합니다. 이 전략은 시장 개시 후의 가격 변화의 전체 움직임에 대한 영향을 주로 고려하며, 과학적인 방법을 통해 시장 감정 및 추세의 변화를 판단합니다.
전략의 핵심은 오픈 마켓 노출도를 계산하여 시장의 움직임을 측정하는 것이다. OME는 현재 종결 가격과 이전 거래일 개시 가격의 차이는 이전 개시 가격에 대한 비율로 계산한다. 전략은 누적된 OME 마이너스를 거래 신호로 설정하고, 누적된 OME가 설정된 마이너스를 초과할 때 더 많이 진출하고, 마이너스 마이너스를 때 평점보다 낮다.
오픈 마켓 노출도 동적 조치 전략은 기술 분석과 위험 관리를 결합한 완전한 거래 시스템이다. OME 지표의 혁신적인 응용을 통해 시장 추세를 효과적으로 파악한다. 전략은 전체적으로 합리적으로 설계되어 있으며, 강력한 실용성과 확장성을 가지고 있다. 지속적인 최적화와 개선으로 전략은 실제 거래에서 더 나은 성과를 낼 것으로 보인다.
/*backtest
start: 2019-12-23 08:00:00
end: 2024-11-11 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Open Market Exposure (OME) Strategy", overlay=true)
// Input parameters
length = input(14, title="Length for Variance")
sharpe_length = input(30, title="Length for Sharpe Ratio")
threshold = input(0.01, title="Cumulative OME Threshold") // Define a threshold for entry
take_profit = input(0.02, title="Take Profit (%)") // Define a take profit percentage
stop_loss = input(0.01, title="Stop Loss (%)") // Define a stop loss percentage
// Calculate Daily Returns
daily_return = (close - close[1]) / close[1]
// Open Market Exposure (OME) calculation
ome = (close - open[1]) / open[1]
// Cumulative OME
var float cum_ome = na
if na(cum_ome)
cum_ome := 0.0
if (dayofweek != dayofweek[1]) // Reset cumulative OME daily
cum_ome := 0.0
cum_ome := cum_ome + ome
// Performance Metrics Calculation (Sharpe Ratio)
mean_return = ta.sma(cum_ome, sharpe_length)
std_dev = ta.stdev(cum_ome, sharpe_length)
sharpe_ratio = na(cum_ome) or (std_dev == 0) ? na : mean_return / std_dev
// Entry Condition: Buy when Cumulative OME crosses above the threshold
if (cum_ome > threshold)
strategy.entry("Long", strategy.long)
// Exit Condition: Sell when Cumulative OME crosses below the threshold
if (cum_ome < -threshold)
strategy.close("Long")
// Take Profit and Stop Loss
if (strategy.position_size > 0)
// Calculate target and stop levels
target_price = close * (1 + take_profit)
stop_price = close * (1 - stop_loss)
// Place limit and stop orders
strategy.exit("Take Profit", "Long", limit=target_price)
strategy.exit("Stop Loss", "Long", stop=stop_price)