Topic: Slow Stochastics Extremes with Commodity Channel Index Filter
Slow Stochastics Extremes with Commodity Channel Index Filter
This mean reversion system initiates trades whenever both the slow stochastics and commodity channel index (CCI) indicators achieve extreme overbought or oversold levels. Exits occur when slow stochastics retreats from these unsustainable extremes or the failsafe stop loss level is triggered. Using CQG, the programming code for our slow stochastics mean reversion system with CCI filter and 1.5 percent stop loss is written in this way:
Long Entry:
SSD(@,14,Smo,3,Smo,3)[–1] XBELOW 15 AND CCI(@,10) [–1] < –100
Long Exit—Condition #1:
SSD(@,14,Smo,3,Smo,3)[–1] XABOVE 30
Long Exit—Condition #2 set “Price” field to:
EntryPrice(@,0,All,ThisTradeOnly)–(.015*EntryPrice(@,0,All, ThisTradeOnly))
Short Entry:
SSD(@,14,Smo,3,Smo,3)[-1] XABOVE 85 AND CCI(@,10)[–1] > 100
Short Exit—Condition #1:
SSD(@,14,Smo,3,Smo,3)[–1] XBELOW 70
Short Exit—Condition #2 set “Price” field to:
EntryPrice(@,0,All,ThisTradeOnly)+(.015* EntryPrice(@,0,All, ThisTradeOnly))
Not sure how to program this one...