Journal of Technical Analysis - Market Technicians Association
Journal of Technical Analysis - Market Technicians Association
Journal of Technical Analysis - Market Technicians Association
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
32<br />
Conclusions<br />
The PDF has been shown to <strong>of</strong>fer an alternative approach to the classical oscillator, one that is non-causal in anticipating short-term turning points.<br />
Several specific trading strategies have been presented that demonstrate robust performance across long timespans to accommodate varying market conditions;<br />
across a large number <strong>of</strong> trades to avoid curve fitting; and among different markets to demonstrate freedom from market personalities.<br />
In each case the PDF can infer a trading strategy that is likely to be successful. When no strategy is suggested, the Fisher Transform can be applied to change<br />
the PDF to a Gaussian distribution. The Gaussian PDF then infers that a trading strategy using a reversion to the mean can be successful.<br />
Inputs:<br />
Length(20);<br />
Vars:<br />
HH(0), LL(0), Count(0), Psn(0), I(0);<br />
Arrays:<br />
Bin[100](0);<br />
If CurrentBar > Length Then Begin<br />
HH = Close;<br />
LL = Close;<br />
For Count = 0 to Length - 1 Begin<br />
If Close[Count] > HH Then HH = Close[Count];<br />
If Close[Count] < LL Then LL = Close[Count];<br />
End;<br />
If HH LL Then Value1 = 100*(Close - LL) / (HH - LL);<br />
Psn = (Value1 + 2*Value1[1] + Value1[2]) / 4;<br />
For I = 1 to 100 Begin<br />
If Psn > I - 1 and Psn HPPeriod Then Begin<br />
HH = HP;<br />
LL = HP;<br />
For Count = 0 to HPPeriod - 1 Begin<br />
If HP[Count] > HH Then HH = HP[Count];<br />
If HP[Count] < LL Then LL = HP[Count];<br />
End;<br />
If HH LL Then Value1 = 100*((HP - LL) / (HH - LL));<br />
Psn = (Value1 + 2*Value1[1] + Value1[2]) / 4;<br />
For I = 1 to 100 Begin<br />
If Psn > I - 1 and Psn Length Then Begin<br />
CU = 0;<br />
CD = 0;<br />
For I = 0 to Length - 1 Begin<br />
If Close[I] - Close[I + 1] > 0 Then CU = CU + Close[I] - Close[I + 1];<br />
If Close[I] - Close[I + 1] < 0 Then CD = CD + Close[I + 1] - Close[I];<br />
End;<br />
If CU + CD 0 Then MyRSI = 50*((CU - CD) / (CU + CD) + 1);<br />
Psn = (MyRSI + 2*MyRSI[1] + MyRSI[2]) / 4;<br />
For I = 1 to 100 Begin<br />
If Psn > I - 1 and Psn HPPeriod Then Begin<br />
HH = HP;<br />
LL = HP;<br />
For Count = 0 to HPPeriod - 1 Begin<br />
If HP[Count] > HH Then HH = HP[Count];<br />
If HP[Count] < LL Then LL = HP[Count];<br />
End;<br />
If HH LL Then Value1 = 2*((HP - LL) / (HH - LL) - .5);<br />
Psn = (Value1 + 2*Value1[1] + Value1[2]) / 4;<br />
If Psn > .999 Then Psn = .999;<br />
If Psn < -.999 Then Psn = -.999;<br />
Fish = 16*(.5*Log((1 + Psn) / (1 - Psn)) + 3);<br />
If Fish < 0 then Fish = 0;<br />
If Fish >100 then Fish = 100;<br />
For I = 1 to 100 Begin<br />
If Fish > I - 1 and Fish