Differenze tra le pagine "TS Long Trends" e "TS Macd Momentum System"
imported>Stefano Fanton |
imported>Stefano Fanton |
||
Riga 1: | Riga 1: | ||
− | '''''Trading System " | + | '''''Trading System "Macd Momentum System"''''' |
+ | |||
+ | Codice per il MACD Momentum, creato da Barbara Star, pubblicato nel febbraio 1994 su Technical Analysis of Stocks and commodities. | ||
Formula per Tradestation™: | Formula per Tradestation™: | ||
Riga 5: | Riga 7: | ||
INIZIO FORMULA | INIZIO FORMULA | ||
− | Type : Signal, Name : | + | Type : Function, Name : McdMo <br>Inputs:<br>R(Numeric),<br>S(Numeric),<br>Q(NUmeric),<br>Dsp(Numeric),<br>Smth(Numeric); |
+ | |||
+ | Vars:<br>Mo(0),<br>Avg(0),<br>Diff(0); | ||
+ | |||
+ | Mo=MACD(C,R,S);<br>Avg=XAverage(MACD(C,R,S),Q);<br>Diff=Mo-Avg;<br>McdMo=Average(Diff-Diff[Dsp],Smth); | ||
+ | |||
+ | <br> | ||
+ | |||
+ | Type : Function, Name : MacdDiff <br>Inputs:<br>R(Numeric),<br>S(NUmeric),<br>Q(Numeric);<br>Vars: Mac(0),<br>Avg(0); | ||
+ | |||
+ | Mac=MACD(C,R,S);<br>Avg=Xaverage(MACD(C,R,S),Q);<br>MACDDiff=Mac-Avg; | ||
+ | |||
+ | <br> | ||
+ | |||
+ | <br>Type : Signal, Name : Macd Momentum <br>Input:<br>R(12),<br>S(26),<br>Q(9),<br>Dsp(10),<br>Smth(3); | ||
− | + | Vars:<br>Mcdif(0),<br>McdCr(0); | |
− | + | Mcdif=MacdDiff(R,S,Q);{Trigger}<br>McdCr=McdMo(R,S,Q,Dsp,Smth);{Filter} | |
− | + | Condition1=McdCr<0 and Mcdif crosses below 0;<br>Condition2=McdCr>0 and Mcdif crosses above 0;<br>Condition3=McdCr crosses above 0;<br>Condition4=mcdCr crosses below 0; | |
− | + | If Condition1 then sell 1 contract on close;<br>If Condition3 then exitshort 1 contract on close;<br>If Condition2 then buy 1 contract on close;<br>If Condition4 then exitlong 1 contract on close;<br><br>FINE FORMULA | |
== Vedi anche: == | == Vedi anche: == |
Versione attuale delle 09:50, 22 mar 2012
Trading System "Macd Momentum System"
Codice per il MACD Momentum, creato da Barbara Star, pubblicato nel febbraio 1994 su Technical Analysis of Stocks and commodities.
Formula per Tradestation™:
INIZIO FORMULA
Type : Function, Name : McdMo
Inputs:
R(Numeric),
S(Numeric),
Q(NUmeric),
Dsp(Numeric),
Smth(Numeric);
Vars:
Mo(0),
Avg(0),
Diff(0);
Mo=MACD(C,R,S);
Avg=XAverage(MACD(C,R,S),Q);
Diff=Mo-Avg;
McdMo=Average(Diff-Diff[Dsp],Smth);
Type : Function, Name : MacdDiff
Inputs:
R(Numeric),
S(NUmeric),
Q(Numeric);
Vars: Mac(0),
Avg(0);
Mac=MACD(C,R,S);
Avg=Xaverage(MACD(C,R,S),Q);
MACDDiff=Mac-Avg;
Type : Signal, Name : Macd Momentum
Input:
R(12),
S(26),
Q(9),
Dsp(10),
Smth(3);
Vars:
Mcdif(0),
McdCr(0);
Mcdif=MacdDiff(R,S,Q);{Trigger}
McdCr=McdMo(R,S,Q,Dsp,Smth);{Filter}
Condition1=McdCr<0 and Mcdif crosses below 0;
Condition2=McdCr>0 and Mcdif crosses above 0;
Condition3=McdCr crosses above 0;
Condition4=mcdCr crosses below 0;
If Condition1 then sell 1 contract on close;
If Condition3 then exitshort 1 contract on close;
If Condition2 then buy 1 contract on close;
If Condition4 then exitlong 1 contract on close;
FINE FORMULA