|
|||||||||||||||||||
| Special offer: buy AmiBroker and EOD+Real-Time Data |
|
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; Once the function has been created, we can then create the indicator and the system. For both, the KPeriods input determines length of the %K; the DPeriods input determines the length of the %D; and the KSlow input determines the smoothing factor for the %K line. The indicator can be created in the Power Editor using the EasyLanguage shown below: Type: Indicator , Name: Stochastic S&C Input: KPeriods(5), DPeriods(12), KSlow(3); Variables: KVal(0), DVal(0); KVal = StochCustom(KPeriods, KSlow); DVal = Average(KVal, DPeriods); If CurrentBar > KPeriods Then Plot1(KVal, "%K"); If CurrentBar > DPeriods Then Plot2(DVal, "%D"); 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 Code:
all formulas for TradeStation all formulas
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| However we try to maintain hiqhest possible level of service - most formulas, oscillators, indicators and systems are submitted by anonymous users. Therefore S4T™ does not take any responsibility for it's quality. If you use any of this information, use it at your own risk. You are responsible for your own trading decisions. Be sure to verify that any information you see on these pages is correct, and is applicable to your particular trade. In no case will S4T™ be responsible for your trading gains or losses. |
|
|