Traders' Tips from TASC Magazine
Squelch Those Whipsaws
In his article "Squelch Those Whipsaws" John Ehlers introduces the Squelch Control indicator as a paintbar. To create this in MetaStock 6.52 or higher select Indicator Builder from the Tools menu and enter the following new formulas. Each formula must be created separately and must be named exactly as it appears below. The formulas can also be downloaded from http://www.metastock.com/customer/support/formulas/. Note that all of the following formulas are the same formulas referenced from his article in the May 2000 Traders Tip, with the exception of the Expert Advisor highlight. If you have downloaded and installed the May 2000 formulas you will be asked to overwrite the existing formulas when installing these formulas. If you do not wish to overwrite them do not download the formula file, instead refer to the instructions below for creating only the Expert Advisor formula.
If you are using MetaStock version 7 or higher follow these instructions:
- Click here to download the self extracting formula file to a temp folder
- Double click on the downloaded file to start the importing process
- After the import has finished locate the formulas in MetaStock
If you are using MetaStock version 6.52 use these instructions:
- Click here to download the Sept2000Formulas652.zip file.
- Double-click on the downloaded file to extract the MS65FORM.DTA and MS65EXPT.DTA files to a temp folder.
- Run MetaStock.
- Choose Expert Advisor from the Tools menu.
- Click the Organizer button to launch the Formula Organizer Wizard.
- Follow the on-screen instructions.
- After the formulas have been imported simply attach the "Squelch Threshold" expert to your chart.
Name: Hilbert cycle period - 1a
value1:=((H+L)/2) - Ref(((H+L)/2),-6);
value2:= Ref(value1,-3);
value3:=0.75*(value1-Ref(value1,-6)) + 0.25*(Ref(value1,-2)-Ref(value1,-4));
inphase:= 0.33 * value2 + (0.67 * PREV);
quad:= 0.2 * value3 + ( 0.8 * PREV);
p1:=Atan(Abs(quad+Ref(quad,-1)),Abs(inphase+Ref(inphase,-1)));
phase:=If(inphase<0 AND quad>0, 180-p1,
If(inphase<0 AND quad<0, 180+p1,
If(inphase>0 AND quad<0, 360-p1,p1)));
dp:=If(Ref(phase,-1)<90 AND phase>270, 360+Ref(phase,-1)-phase,Ref(phase,-1)-phase);
dp2:=If(dp <
1, 1,
If(dp >
60, 60, dp));
dp2
Name: H cycle count 1a
value:= Fml("Hilbert cycle period - 1a");
If(Sum(value,6)>=360 AND Sum(value,5)<360 ,6,0) +
If(Sum(value,7)>=360 AND Sum(value,6)<360 ,7,0) +
If(Sum(value,8)>=360 AND Sum(value,7)<360 ,8,0) +
If(Sum(value,9)>=360 AND Sum(value,8)<360 ,9,0) +
If(Sum(value,10)>=360 AND Sum(value,9)<360 ,10,0) +
If(Sum(value,11)>=360 AND Sum(value,10)<360 ,11,0) +
If(Sum(value,12)>=360 AND Sum(value,11)<360 ,12,0) +
If(Sum(value,13)>=360 AND Sum(value,12)<360 ,13,0) +
If(Sum(value,14)>=360 AND Sum(value,13)<360 ,14,0) +
If(Sum(value,15)>=360 AND Sum(value,14)<360 ,15,0)
Name: H cycle count 2a
value:= Fml("Hilbert cycle period - 1a");
If(Sum(value,16)>=360 AND Sum(value,15)<360 ,16,0) +
If(Sum(value,17)>=360 AND Sum(value,16)<360 ,17,0) +
If(Sum(value,18)>=360 AND Sum(value,17)<360 ,18,0) +
If(Sum(value,19)>=360 AND Sum(value,18)<360 ,19,0) +
If(Sum(value,20)>=360 AND Sum(value,19)<360 ,20,0) +
If(Sum(value,21)>=360 AND Sum(value,20)<360 ,21,0) +
If(Sum(value,22)>=360 AND Sum(value,21)<360 ,22,0) +
If(Sum(value,23)>=360 AND Sum(value,22)<360 ,23,0) +
If(Sum(value,24)>=360 AND Sum(value,23)<360 ,24,0) +
If(Sum(value,25)>=360 AND Sum(value,24)<360 ,25,0)
Name: H cycle count 3a
value:= Fml("Hilbert cycle period - 1a");
If(Sum(value,26)>=360 AND Sum(value,25)<360 ,26,0) +
If(Sum(value,27)>=360 AND Sum(value,26)<360 ,27,0) +
If(Sum(value,28)>=360 AND Sum(value,27)<360 ,28,0) +
If(Sum(value,29)>=360 AND Sum(value,28)<360 ,29,0) +
If(Sum(value,30)>=360 AND Sum(value,29)<360 ,30,0) +
If(Sum(value,31)>=360 AND Sum(value,30)<360 ,31,0) +
If(Sum(value,32)>=360 AND Sum(value,31)<360 ,32,0) +
If(Sum(value,33)>=360 AND Sum(value,32)<360 ,33,0) +
If(Sum(value,34)>=360 AND Sum(value,33)<360 ,34,0) +
If(Sum(value,35)>=360 AND Sum(value,34)<360 ,35,0)
Name: Hilbert cycle period - final-a
c1:= Fml( "H cycle count 1a") + Fml( "H cycle count 2a") + Fml( "H cycle count 3a") ;
c2:=If(c1=0,PREV,c1);
(0.25*c2) + (0.75*PREV)
To create the indicator as a highlight, select Expert Advisor from the Tools menu. Click New, enter "Hilbert Squelch Indicator" for the name, and select the Highlights page. Click New and enter the following formula:
Name: Squelch Threshold
Squelch:=20;
Fml("Hilbert cycle period - final-a")<Squelch
To apply the Indicator, open the Expert Advisor, select the Squelch Indicator expert, and then click the Attach button.
Contents
- Affine transformation
- Anticipating Moving Average Crossovers
- At Last! A Trend-Friendly Oscillator
- Average True Range or Standard Deviation
- Balance of Market Power
- Between Price and Volume
- Bollinger Band Targets
- BONUS ISSUE: Mutual Fund Screen
- Boosting Profitability - the AIM Indicator
- Breakout_Range2
- Bridging the Gap, Linking Point & Figure and Bar Charts
- Buff Up Your Moving Averages
- Bull and Bear Balance Indicator
- Candlestick Filtering
- Coding Candlesticks (II)
- Confirming the Price Trend
- Creating Multi-Colored Indicators in MetaStock
- Darvas-Style Trading and Something Darvas
- Deviation Oscillator
- Directional Breakout
- Ehlers Filters
- Elastic Volume Weighted Moving Average
- Finding Key Reversals
- Fisher Transform
- FVE - %b
- FVE - lin reg slope
- FVE - Storz's divergence
- FVE w/ linear regression slope
- High Low Strategy
- High Tech Mesa Adaptive Moving Averages
- Hilbert Indicators Tell You When to Trade
- Holding Overnight Positions
- Hot Zones
- How Smooth is Your Data Smoother
- Ichimoku Charts
- Index of Chart Sentiment
- Laguerre Filter
- Laguerre RSI
- MACD of Relative Strength
- Moving Average Crossovers
- Moving Average: Long on Talk, Sort on Action
- Normalization
- Now's The Time To Trade Crude
- Pivot point Strategy
- Profit with ETFs
- Quicken Your Averages
- Red-Green Strategy
- Refining the Hilbert Indicator
- Regularization
- Relative Performance Charting
- RSI Bands
- Squelch Those Whipsaws
- sRSI - Original
- sRSI - Using Wilders
- Stochastics
- Tandem Studies on Market Movement
- Targeting Your Pattern
- TC 2000 Scans
- The Average Peak Excursion
- The Cocked Gun Revisited
- The Inverse Fisher Transform
- The Self-Adjusting RSI
- The Truth about Volatility
- The Wilson Relative Price Channel
- Thrust Oscillator
- Trade Against the Gap
- Trade Into the Gap
- Trade the Swing Price
- Trend Continuation Factor
- Trend Quality Indicator
- Trend Trigger Factor
- TrendIV & Volume - Buy Signal
- TrendIV & Volume - Sell Signal
- Triggering Your Trading System
- Using Money Flow to Stay with the Trend
- Using Volume to Detect Shifts In Power
- Volatility System
- VWAP for Support and Resistance
- When and When not to Trade