
これは,内部強度指数 (Internal Bar Strength, IBS) に基づく空調策で,主に終盤価格が日内価格区間の位置を監視することによって取引の機会を識別する.IBS指数がオーバーバイ状態を示すとき,戦略は,特定の条件を満たしたときに空調ポジションを開き,IBSがオーバーセールレベルに達したときに平仓で出場する.この戦略は,株式やETF市場の日線レベルの取引のために特別に設計されています.
戦略の核心は,IBS指標を使用して,閉盘価格が当日の高低点の範囲内の位置を測定することです.IBSの計算式は: ((閉盘価格 - 最低価格) / ((最高価格 - 最低価格) である.IBS値が0.9より大きいときは,閉盘価格が当日の最高点に近づいていることを示す,超買い状態と考えられます.IBS値が0.3より小さい場合は,閉盘価格が当日の最低点に近づいていることを示す,超売り状態と考えられます.
これは,平均値回帰思想に基づく空白策であり,IBS指標によって価格超買い後の回落の機会を捉える.戦略は簡潔に設計され,操作は明確であるが,特定の取引品種と市場環境に応じて最適化する必要がある.実際の取引の前に,異なるパラメータの組み合わせを十分にテストし,他の技術指標と組み合わせて戦略の安定性を高めるのが推奨される.同時に,リスク管理に注意を払う必要があります.
/*backtest
start: 2024-06-01 00:00:00
end: 2025-02-18 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Binance","currency":"ETH_USDT"}]
*/
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Botnet101
//@version=6
strategy('[SHORT ONLY] Internal Bar Strength (IBS) Mean Reversion Strategy', overlay = false, default_qty_value = 100, default_qty_type = strategy.percent_of_equity, margin_long = 5, margin_short = 5, process_orders_on_close = true, precision = 4)
//#region INPUTS SECTION
// ============================================
//#region IBS Thresholds
upperThresholdInput = input.float(defval = 0.9, title = 'Upper Threshold', step = 0.1, maxval=1, group = 'IBS Settings')
lowerThresholdInput = input.float(defval = 0.3, title = 'Lower Threshold', step = 0.1, minval=0, group = 'IBS Settings')
//#endregion
//#endregion
//#region IBS CALCULATION
// ============================================
// IBS Value Calculation
// ============================================
internalBarStrength = (close - low) / (high - low)
//#endregion
//#region TRADING CONDITIONS
// ============================================
// Entry/Exit Logic
// ============================================
shortCondition = internalBarStrength >= upperThresholdInput and close>high[1]
exitCondition = internalBarStrength <= lowerThresholdInput
//#endregion
//#region STRATEGY EXECUTION
// ============================================
// Order Management
// ============================================
if shortCondition
strategy.entry('short', strategy.short)
if exitCondition
strategy.close_all()
//#endregion
//#region PLOTTING
// ============================================
// Visual Components
// ============================================
plot(internalBarStrength, color = color.white, title = "IBS Value")
plot(upperThresholdInput, color = color.yellow, title = "Upper Threshold")
plot(lowerThresholdInput, color = color.yellow, title = "Lower Threshold")
//#endregion