log in     sign up for free
 
People avoid looking for good exits because exits do not give them control over the market. However, exits do control something. They control whether you make a profit or a loss, and they control just how big that profit or loss will be. Since they do so much, perhaps they are worthy of a lot more study on the part of most people.
Van K. Tharp
 
 
Home
systems (284)
 
 
Special offer: buy AmiBroker and EOD+Real-Time Data
 

Buy

MetaStock

     (special offer)
 
 
 

Buy

EOD data for MetaStock

     (special offer)
 
 
 

Buy

Realtime data for MetaStock

     (special offer)
 
 
 
 
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

Support and Resistance System

System for: TradeStation


 

 

Views:  2732

Added: August 13, 2008
 
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, system
 
Your Ad Here
In our Traders' Tip this month, we'll focus on the support and resistance oscillators detailed by Mel Widner in "Automated support and resistance." The EasyLanguage code shown uses two functions, WRO and WSO, to provide the calculations for the support and resistance oscillator.
Before creating the support-resistance indicator, the WRO and WSO functions must first be created and verified in the Power Editor.



Type: Function, Name: WSO
Inputs:
Strength(Numeric),
Length(Numeric);
Vars:
SCalc(0);

Array: Support[100](0);
Condition1 = SwingLow(1, Low, Strength, Strength+1) <> -1;
IF Condition1 Then Begin
For value1 = 100 DownTo 2 Begin
Support[value1] = Support[value1-1];
End;
Support[1] = Low[Strength];
End;
IF Support[Length] <> 0 Then Begin
SCalc = 0;
For value1 = 1 To Length Begin
SCalc = SCalc + IntPortion(Support[value1] / Close);
End;
WSO = 100 * (1 - (SCalc / Length));
End Else
WSO = 0;





Type: Function, Name: WRO

Inputs:
Strength(Numeric),
Length(Numeric);
Vars:
RCalc(0);

Array: Resist[100](0);
Condition1 = SwingHigh(1, High, Strength, Strength+1) <> -1;
IF Condition1 Then Begin
For value1 = 100 DownTo 2 Begin
Resist[value1] = Resist[value1-1];
End;
Resist[1] = High[Strength];
End;
IF Resist[Length] <> 0 Then Begin
RCalc = 0;
For value1 = 1 To Length Begin
RCalc = RCalc + IntPortion(Resist[value1] / Close);
End;
WRO = 100 * (1 - (RCalc / Length));
WRO = 0;
end




The two functions that were created can also be used for the long system entries described by Widner. Below is the EasyLanguage code for the entries that are based on the position of the WSO and the WRO. The suggested stops for the entries described by Widner can all be set in the Stops tab.




Type: System, Name: Support-Resistance

Inputs:
Strength(4),
Length(6),
AvgLen(30),
BuyLen(4),
BuyLev(95);

IF MRO(WSO(Strength, Length)>Average(WSO(Strength, Length), AvgLen),
BuyLen, 1) <> -1 Then Buy This Bar on Close;
IF Average(WRO(Strength, Length), AvgLen) Crosses Above
BuyLev Then Buy This Bar on Close;






This EasyLanguage code is also available at Omega Research's Web site; the name of the file is "SuppRes.ela." Please note that all Traders' Tips and techniques that are posted at the site can be utilized by either TradeStation or SuperCharts. Whenever possible, the posted analysis techniques will include both QuickEditor and PowerEditor formats.
-- Gaston Sanchez, Omega Research 800 422-8587, 305 270-1095
Internet: http://www.omegaresearch.com

 

 



Code:

In our Traders' Tip this month, we'll focus on the support and resistance oscillators detailed by Mel Widner in "Automated support and resistance." The EasyLanguage code shown uses two functions, WRO and WSO, to provide the calculations for the support and resistance oscillator.
Before creating the support-resistance indicator, the WRO and WSO functions must first be created and verified in the Power Editor.



Type: Function, Name: WSO
Inputs:
Strength(Numeric),
Length(Numeric);
Vars:
SCalc(0);

Array: Support[100](0);
Condition1 = SwingLow(1, Low, Strength, Strength+1) <> -1;
IF Condition1 Then Begin
For value1 = 100 DownTo 2 Begin
Support[value1] = Support[value1-1];
End;
Support[1] = Low[Strength];
End;
IF Support[Length] <> 0 Then Begin
SCalc = 0;
For value1 = 1 To Length Begin
SCalc = SCalc + IntPortion(Support[value1] / Close);
End;
WSO = 100 * (1 - (SCalc / Length));
End Else
WSO = 0;





Type: Function, Name: WRO

Inputs:
Strength(Numeric),
Length(Numeric);
Vars:
RCalc(0);

Array: Resist[100](0);
Condition1 = SwingHigh(1, High, Strength, Strength+1) <> -1;
IF Condition1 Then Begin
For value1 = 100 DownTo 2 Begin
Resist[value1] = Resist[value1-1];
End;
Resist[1] = High[Strength];
End;
IF Resist[Length] <> 0 Then Begin
RCalc = 0;
For value1 = 1 To Length Begin
RCalc = RCalc + IntPortion(Resist[value1] / Close);
End;
WRO = 100 * (1 - (RCalc / Length));
WRO = 0;
end




The two functions that were created can also be used for the long system entries described by Widner. Below is the EasyLanguage code for the entries that are based on the position of the WSO and the WRO. The suggested stops for the entries described by Widner can all be set in the Stops tab.




Type: System, Name: Support-Resistance

Inputs:
Strength(4),
Length(6),
AvgLen(30),
BuyLen(4),
BuyLev(95);

IF MRO(WSO(Strength, Length)>Average(WSO(Strength, Length), AvgLen),
BuyLen, 1) <> -1 Then Buy This Bar on Close;
IF Average(WRO(Strength, Length), AvgLen) Crosses Above
BuyLev Then Buy This Bar on Close;






This EasyLanguage code is also available at Omega Research's Web site; the name of the file is "SuppRes.ela." Please note that all Traders' Tips and techniques that are posted at the site can be utilized by either TradeStation or SuperCharts. Whenever possible, the posted analysis techniques will include both QuickEditor and PowerEditor formats.
-- Gaston Sanchez, Omega Research 800 422-8587, 305 270-1095
Internet: http://www.omegaresearch.com


 






Author: Mel Widner
Source: http://www.traders.com

 

View similar:

Parabolic System
SystemB
Mov Avg X 2_20 System
Conner 19
Williams 19
DBS-B
Test IDNR4
HI LO Activator
New Market Paradigm
Finite Volume Element (FVE) System
...
 
 
all systems for TradeStation
all systems

 

 

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.
 
Privacy note | (c) copyrights systems4trading.com 2006-2012