Differenze tra le pagine "PVI (Positive Volume Index)" e "TS Shark 32"
imported>Stefano Fanton |
imported>Stefano Fanton |
||
Riga 1: | Riga 1: | ||
− | + | '''''Trading System "TS Shark 32"''''' | |
− | + | Combining Statistical & Pattern Analysis(Technical Analysis of Stocks & Commodities 10/98) | |
− | + | Formula per Tradestation™: | |
− | + | INIZIO FORMULA | |
+ | |||
+ | Type : Function (TrueFalse), Name : sym_shark <br>input: symmetry(numericsimple);<br>vars: apex(0),<br>wb(0); | ||
+ | |||
+ | apex = (high + low) / 2;<br>wb = high[2] - low[2]; | ||
+ | |||
+ | if high < high[1] and low > low[1] and<br>high[1] < high[2] and low[1] > low[2] and<br>apex <= high[2] - (wb * symmetry) and<br>apex >= low[2] + (wb * symmetry) then<br>sym_shark = true<br>else sym_shark = false; | ||
+ | |||
+ | <br><br> | ||
+ | |||
+ | Type : Signal, Name : SHRK-32 System <br>input: symmetry(.28);<br>vars: cont(0),<br>revb(0),<br>revs(0); | ||
+ | |||
+ | if cont <> 0 and marketposition = 0 then begin<br>if close < high[3 + cont] and close > low[3 + cont] then cont = cont + 1;<br>if close > high[3 + cont] then begin<br>buy close;<br>revb = cont + 3;<br>cont = 0;<br>end;<br>if close < low[3 + cont] then begin<br>sell close;<br>revs = cont + 3;<br>cont = 0;<br>end;<br>end;<br>if revb <> 0 then begin<br>if close > low[revb] then revb = revb + 1<br>else if close < low[revb] then begin<br>sell close;<br>revb = 0;<br>end;<br>end;<br>if revs <> 0 then begin<br>if close < high[revs] then revs = revs + 1<br>else if close > high[revs] then begin<br>buy close;<br>revs = 0;<br>end;<br>end;<br>if sym_shark(symmetry)[1] = true then begin<br>if close > high[3] then buy close;<br>if close < low[3] then sell close;<br>cont = cont + 1;<br>end;<br>if sym_shark(symmetry) = true and marketposition <> 0 then begin<br>exitlong close;<br>exitshort close;<br>end;<br>if barssinceentry = 78 then begin<br>if marketposition = 1 then begin<br>exitlong close;<br>buy open;<br>end;<br>if marketposition = -1 then begin<br>exitshort close;<br>sell open;<br>end;<br>end;<br>if revb > 100 then revb = 0;<br>if revs > 100 then revs = 0;<br><br>FINE FORMULA | ||
− | |||
− | |||
− | |||
== Vedi anche: == | == Vedi anche: == | ||
− | *[[Indice sequenziale | + | *[[Indice sequenziale Trading System|Indice sequenziale Trading System]] |
− | [[Category: | + | [[Category:Formule_Trading_System]] |
Versione attuale delle 09:53, 22 mar 2012
Trading System "TS Shark 32"
Combining Statistical & Pattern Analysis(Technical Analysis of Stocks & Commodities 10/98)
Formula per Tradestation™:
INIZIO FORMULA
Type : Function (TrueFalse), Name : sym_shark
input: symmetry(numericsimple);
vars: apex(0),
wb(0);
apex = (high + low) / 2;
wb = high[2] - low[2];
if high < high[1] and low > low[1] and
high[1] < high[2] and low[1] > low[2] and
apex <= high[2] - (wb * symmetry) and
apex >= low[2] + (wb * symmetry) then
sym_shark = true
else sym_shark = false;
Type : Signal, Name : SHRK-32 System
input: symmetry(.28);
vars: cont(0),
revb(0),
revs(0);
if cont <> 0 and marketposition = 0 then begin
if close < high[3 + cont] and close > low[3 + cont] then cont = cont + 1;
if close > high[3 + cont] then begin
buy close;
revb = cont + 3;
cont = 0;
end;
if close < low[3 + cont] then begin
sell close;
revs = cont + 3;
cont = 0;
end;
end;
if revb <> 0 then begin
if close > low[revb] then revb = revb + 1
else if close < low[revb] then begin
sell close;
revb = 0;
end;
end;
if revs <> 0 then begin
if close < high[revs] then revs = revs + 1
else if close > high[revs] then begin
buy close;
revs = 0;
end;
end;
if sym_shark(symmetry)[1] = true then begin
if close > high[3] then buy close;
if close < low[3] then sell close;
cont = cont + 1;
end;
if sym_shark(symmetry) = true and marketposition <> 0 then begin
exitlong close;
exitshort close;
end;
if barssinceentry = 78 then begin
if marketposition = 1 then begin
exitlong close;
buy open;
end;
if marketposition = -1 then begin
exitshort close;
sell open;
end;
end;
if revb > 100 then revb = 0;
if revs > 100 then revs = 0;
FINE FORMULA