I try to develop this strategy Scalping with Parabolic Sar and CCI Trading System - Forex Strategies - Forex Resources - Forex Trading-free forex trading signals and FX Forecast ( in a fully automatic. Unfortunately I can't define in programming way when the market is in trending (see screens shots attached).