log in     sign up for free
 
I turned from a loser to a winner when I was able to separate my ego needs from making money. When I was able to accept being wrong. Before that, admitting I was wrong was more upsetting than losing the money.
Marty Schwartz
 
 
Home
systems (285)
 
 
Special offer: buy MetaStock (try for free)   |   Reuters QuoteCenter Real-Time Data (get a free month)   |   EOD Data
Formula Library
 
AmiBroker
MetaTrader
MetaStock
TradeStation
Wealth-Lab
NinjaTrader
 
add your formula
System Library
 
 
Account login
Your email:
Password:
 
Log in
New to s4t? Sign up.
If you forgot your password click here.
Search the Web
 
Custom Search

Buff Averages

Formula for: TradeStation

indicator

 

 

Views:  2122

Added: December 05, 2006
 
Rate this code:  Rate: 1 Rate: 2 Rate: 3 Rate: 4 Rate: 5
This formula has not been rated yet
 

email this link

 
 
Tags: TradeStation, indicator
 


This month in Traders' Tips, we'll be buffing up your moving averages using the volume-weighting method presented in Buff Dormeier's article in this issue, "Buff Up Your Moving Averages." The weighting formula has been created as a function in EasyLanguage so that it can be referenced from any analysis technique or strategy. In addition, a simple two-line volume-weighted average indicator that references the function has also
been included.
The name of the volume-weighted average function is "BuffAverage." The function has two inputs, price and length. The price input represents the price value upon which the average calculation is based. The length input represents the number of bars that are used in the calculation of the average. Here is the EasyLanguage for the function:

Typ : Function, Name : BuffAverage
Inputs: Price(Numeric), Length(Numeric);
Variables: VolSum(0), Buff(0);

VolSum = Summation(Volume, Length);
Buff = 0;

If VolSum <> 0 Then Begin
For value1 = 0 To Length - 1 Begin
Buff = Buff + ((Price[value1] * Volume[value1]) / VolSum);
End;
End;

BuffAverage = Buff;




The two-line volume-weighted average indicator for EasyLanguage is named Buff averages. This indicator has three inputs. The price input represents the price value upon which the average calculation is based. The FastAvg input represents the number of bars to use in the fast volume-weighted average calculation. The SlowAvg input represents the number of bars to use in the slow volume-weighted average calculation. A simple alert criteria has also been included to provide an alert when the two lines cross.

Below is the EasyLanguage for this indicator. The recommended properties for the indicator are presented after the EasyLanguage code.

Typ : Indicator, Name : Buff Averages
Inputs: Price(Close), FastAvg(5), SlowAvg(20);

Plot1(BuffAverage(Price, FastAvg), "FastBuff");
Plot2(BuffAverage(Price, SlowAvg), "SlowBuff");

If Plot1 Crosses Above Plot2 Then
Alert("Buff Averages Bullish Crossover.");
If Plot1 Crosses Below Plot2 Then
Alert("Buff Averages Bearish Crossover.");




Chart style:
PlotName Style Weight
FastBuff Line Thinnest
SlowBuff Line Thinnest
Chart color:
PlotName Color
FastBuff Magenta
SlowBuff Cyan

Scaling: Same as symbol.

The EasyLanguage code for the Buff average function and indicator are also available for download from the EasyLanguage portion of the support section at Omega Research's website. The name of the file is "BuffAvg.Els" for use in TradeStation and ProSuite 2000i.

 

 



Code:

Typ : Function, Name : BuffAverage
Inputs: Price(Numeric), Length(Numeric);
Variables: VolSum(0), Buff(0);

VolSum = Summation(Volume, Length);
Buff = 0;

If VolSum <> 0 Then Begin
For value1 = 0 To Length - 1 Begin
Buff = Buff + ((Price[value1] * Volume[value1]) / VolSum);
End;
End;

BuffAverage = Buff;

 

 

 

Typ : Indicator, Name : Buff Averages
Inputs: Price(Close), FastAvg(5), SlowAvg(20);

Plot1(BuffAverage(Price, FastAvg), "FastBuff");
Plot2(BuffAverage(Price, SlowAvg), "SlowBuff");

If Plot1 Crosses Above Plot2 Then
Alert("Buff Averages Bullish Crossover.");
If Plot1 Crosses Below Plot2 Then
Alert("Buff Averages Bearish Crossover.");


 





Code to difficult? Find somebody to help you with coding here.

 



Author: Buff Dormeier
Source: http://www.traders.com

 

View similar (indicator for TradeStation):

Distance Coefficient Ehlers Filter
R - Squared
Hilbert Channel Indicator
Macd Momentum
Hull Moving Average
ADX / MovAvg
Tether Line
RAVI II
Chande's Momemtum Oscillator
MACD (DEMA)
...
 
 
all formulas for TradeStation
all formulas

 

 

Email to friend

Top

 

     
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.
PayPalSecure payments by PayPal S4T™ is a part of TAURO EDUCATION NETWORK
 
Privacy note | (c) copyrights systems4trading.com 2006-2009