|
|||||||||||||||||||
|
|||||||||||||||||||
| Special offer: buy AmiBroker and EOD+Real-Time Data |
|
Below is the Power Editor code for the filtered moving average crossover indicator, also called "Simple futures MA," which is very similar to the code given above for the crossover system. For the indicator code, we've simply added the Plot statements and the Alert. Type: Indicator, Name: Simple Futures MA Inputs: Price(Close), FastAvg(9), SlowAvg(50), AvgFltr(80); Vars: FastMA(0), SlowMA(0), Filter(0); FastMA = Average(Price, FastAvg); SlowMA = Average(Price, SlowAvg); Filter = Average(Price, AvgFltr); Condition1 = Close > Filter; Condition2 = Close < Filter; Plot1(FastMA, "FastMA"); Plot2(SlowMA, "SlowMA"); Plot3(Filter, "MAFilter"); IF (Plot1 Crosses Above Plot2 OR Plot1 Crosses Below Plot2) AND (Condition1 OR Condition2) Then IF CheckAlert Then Alert = True; Notice that you must specifically format the above indicator. The scaling for this indicator should be set to "Same as price data," and the MaxBarsBack can simply be set to "Auto-Detect. " This code is available at Omega's Web site. The file name is "SFAvg.ELA." The Quick Editor code is provided in a file called "SFAvgQ.ELA." -- Gaston Sanchez, Omega Research 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. |
|
|