TS Support and Resistance System

Da traderpedia.
Jump to navigation Jump to search

Trading System "Support and Resistance System"

Formula per Tradestation™:

INIZIO FORMULA

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



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;


FINE FORMULA

Vedi anche: