Differenze tra le pagine "TS Macd RS Ratio" e "TS Moving average with resistance and support system"

Da traderpedia.
(Differenze fra le pagine)
Jump to navigation Jump to search
imported>Stefano Fanton
 
imported>Stefano Fanton
 
Riga 1: Riga 1:
'''''Trading System "Macd RS Ratio"'''''  
+
'''''Trading System "Moving average with resistance and support system"'''''  
  
Macd Relative Strength Ratio pubblicato da Gilbert Raff nel novembre 1994 su Technical Analysis of Stocks and Commodities.  
+
Combinazione di una semplice media mobile con supporti e resistenze, presentato da Dennis Tilley nel suo articole "Moving averages with resistance and support."
  
 
Formula per Tradestation™:  
 
Formula per Tradestation™:  
Riga 7: Riga 7:
 
INIZIO FORMULA  
 
INIZIO FORMULA  
  
Type : Signal, Name : Macd RS Ratio <br>Inputs:<br>R(12),<br>S(26),<br>Q(9),<br>Price(close of data1/close of data2);
+
Type: System, Name: Mov Avg--Supp/Res <br>Inputs: Price(Close), Length(10), F(8);<br>Vars: AvgVal(0), S(0), R(0), SC(0), RC(0);
  
Vars:<br>Mo(0),<br>Avg(0);
+
AvgVal = Average(Price, Length);<br>RC = RC + 1;<br>SC = SC + 1;
  
Mo=MACD(Price,R,S);<br>Avg=Xaverage(MACD(Price,R,S),Q);<br>Condition1=Mo crosses above 0;<br>Condition2=Mo crosses below 0;<br>Condition3=Mo&gt;0;<br>Condition4=Mo&lt;0;
+
IF CurrentBar &gt; 1 Then Begin<br>IF Close Crosses Below AvgVal AND Close &gt; S* (1+(F/100)) AND R &lt;&gt; 0 Then Begin<br>Sell Next Bar at Market;<br>S = Low;<br>SC = 0;<br>End<br>Else Begin<br>IF Close Crosses Below S AND R &lt;&gt; 0 Then Begin<br>Sell Next Bar at Market;<br>S = Low;<br>SC = 0;<br>End;<br>End;
  
If Condition1 then buy 1 contract on close;<br>If Condition2 then sell 1 contract on close;<br><br>FINE FORMULA  
+
IF Close Crosses Above AvgVal AND Close &lt; R / (1+(F/100)) AND S &lt;&gt; 0 Then Begin<br>Buy Next Bar at Market;<br>R = High;<br>RC = 0;<br>End<br>Else Begin<br>IF Close Crosses Above R AND S &lt;&gt; 0 Then Begin<br>Buy Next Bar at Market;<br>R = High;<br>RC = 0;<br>End;<br>End;<br>IF Close &gt; AvgVal Then Begin<br>IF High &gt;= R Then Begin<br>R = High;<br>RC = 0;<br>End;<br>End;
 +
 
 +
IF Close &lt; AvgVal Then Begin<br>IF Low &lt;= S OR S = -1 Then Begin<br>S = Low;<br>SC = 0;<br>End;<br>End;<br>End;<br><br>FINE FORMULA  
  
 
== Vedi anche:  ==
 
== Vedi anche:  ==

Versione attuale delle 09:51, 22 mar 2012

Trading System "Moving average with resistance and support system"

Combinazione di una semplice media mobile con supporti e resistenze, presentato da Dennis Tilley nel suo articole "Moving averages with resistance and support."

Formula per Tradestation™:

INIZIO FORMULA

Type: System, Name: Mov Avg--Supp/Res
Inputs: Price(Close), Length(10), F(8);
Vars: AvgVal(0), S(0), R(0), SC(0), RC(0);

AvgVal = Average(Price, Length);
RC = RC + 1;
SC = SC + 1;

IF CurrentBar > 1 Then Begin
IF Close Crosses Below AvgVal AND Close > S* (1+(F/100)) AND R <> 0 Then Begin
Sell Next Bar at Market;
S = Low;
SC = 0;
End
Else Begin
IF Close Crosses Below S AND R <> 0 Then Begin
Sell Next Bar at Market;
S = Low;
SC = 0;
End;
End;

IF Close Crosses Above AvgVal AND Close < R / (1+(F/100)) AND S <> 0 Then Begin
Buy Next Bar at Market;
R = High;
RC = 0;
End
Else Begin
IF Close Crosses Above R AND S <> 0 Then Begin
Buy Next Bar at Market;
R = High;
RC = 0;
End;
End;
IF Close > AvgVal Then Begin
IF High >= R Then Begin
R = High;
RC = 0;
End;
End;

IF Close < AvgVal Then Begin
IF Low <= S OR S = -1 Then Begin
S = Low;
SC = 0;
End;
End;
End;

FINE FORMULA

Vedi anche: