|
|
Stochastic S&C System by Robert Zellner |
|
|
Type: Function, Name: StochCustom
Inputs:
KPeriods(NumericSimple),
KSlow(NumericSimple);
Variables:
LoLo(0),
HiHi(0),
HLDIff(0);
LoLo = Lowest(Low, KPeriods);
HiHi = Highest(High, KPeriods);
HLDIff = HiHi - LoLo;
If HLDIff > 0 Then Begin
If KSlow <= 1 Then
StochCustom = (Close - LoLo) / HLDIff * 100
Else
StochCustom = Average(Close-LoLo,KSlow) / Average(HLDIff, KSlow)*100;
End;
|
|
The EasyLanguage for the system consists of finding a SwingLow for in the %K during an uptrend in the %D for a buy signal, or finding a SwingHigh in the %K during a downtrend in the %D for a sell signal. The exit for both the long and short side occurs after the period specified by the ExitBars input. After creating the system and applying it to a chart, you can then add money-management stops, from which the system would undoubtedly benefit. |
|
|
Type: System, Name: Stochastic S&C Input: KPeriods(7), DPeriods(12), KSlow(3), ExitBars(5);
Variables: KVal(0), DVal(0);
KVal = StochCustom(KPeriods, KSlow);
DVal = Average(KVal, DPeriods);
Condition1 = DVal > DVal[1] AND DVal[1] > DVal[2];
Condition2 = DVal < DVal[1] AND DVal[1] < DVal[2];
If Condition1 AND SwingLow(1, KVal, 1, 2) <> -1 Then
Buy This Bar on Close;
If Condition2 AND SwingHigh(1, KVal, 1, 2) <> -1 Then
Sell This Bar on Close;
If MarketPosition = 1 AND BarsSinceEntry = ExitBars Then
ExitLong This Bar on Close;
If MarketPosition = -1 AND BarsSinceEntry = ExitBars Then
ExitShort This Bar on Close;
|
|
|
|
This EasyLanguage code is also available at Omega Research's Website. The filename is "StochSC.Ela." Note that all Traders' Tips techniques that are posted at the Omega Research Website can be utilized by either TradeStation or SuperCharts. Whenever possible, the posted techniques will include both Quick Editor and Power Editor formats.
-- Gaston Sanchez, Omega Research Inc.
800 422-8587, 305 270-1095
Internet: http://www.omegaresearch.com
|
|
| Source / From: |
TOP |
http://www.traders.com
|
|
|
Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.
TradeStation® Pro, TradeStation® 2000i, OptionStation®, SuperCharts®, PowerEditor® and EasyLanguage®
are registered trademarks of TradeStation Technologies, Inc.
Other names and marks referred to are the property of their respective owners.
All information provided on this website is for educational purposes only.
Trading involves risk, including possible loss of principal and other losses.
Ten i inne materiały na tej stronie zostały zamieszczone zostały jedynie w celach edukacyjnych, nie ponoszę żadnej odpowiedzialno¶ci za ich stosowanie.
Gra na giełdzie niesie ze sob± ryzyko poważnych strat finansowych! |