// This Pine Script® code is licensed under Apache-2.0
// SPDX-License-Identifier: Apache-2.0
// © PineForge contributors 2026
//
// PF TA-isolate probe — CMO(9) zero-line cross.
// Isolates ta.cmo (Chande Momentum Oscillator): a momentum oscillator built
// from summed up/down moves over `length` bars, bounded [-100, +100]. This
// probe drives a flat long/short flip purely off the CMO sign change so a TV
// export adjudicates the engine's CMO warmup window and up/down accumulation
// against TradingView with no other moving parts.
//@version=6
strategy("PF TA isolate - CMO(9) zero cross", shorttitle="TAI_CMO",
overlay=false, initial_capital=1000000,
commission_type=strategy.commission.percent, commission_value=0, slippage=0,
default_qty_type=strategy.fixed, default_qty_value=1, pyramiding=1,
process_orders_on_close=false)
cmo = ta.cmo(close, 9)
if ta.crossover(cmo, 0)
strategy.entry("L", strategy.long, comment="cmo cross up 0")
if ta.crossunder(cmo, 0)
strategy.entry("S", strategy.short, comment="cmo cross dn 0")