2008年9月4日 星期四

Lucky day 程式交易幸運日




  今天算是 Lucky Day,早上急拉沒有被騙線,下跌又能空在相對好的價位 6517,這張圖是 12:34:02 擷取的畫面 (右下角),目前價位6400 (右邊白色底) 還未平倉


2008年9月3日 星期三

SP500 & 台指期 Trading System 實戰交易系統




inputs: tim(945),timend(1050), pnt(.9), ptgt(2.3), brs(2), bepnt(15), timex(1005), rng(5), x(35), y(0);
{y input is an extra input for testing}
vars: eq(0), eqcum(0), hi(0), lo(0);

value3 = average(truerange,rng);
value4 = pnt * value3;

if date <> date[1] then begin
eq = netprofit + openpositionprofit;
hi = h;
lo = l;
end;

if h > hi then hi = h;
if l < lo then lo = l; eqcum = netprofit + openpositionprofit; condition2 = eq = eqcum; {turns on window and sets stops} if time = tim then begin value1 = h + value4{ points}; value2 = l - value4{ points}; condition1 = true; end; {close window of entry} if time = timend then begin condition1 = false; end; if condition1 = true and condition2 = true then begin if marketposition <> 1 then begin
buy at value1 stop;
end;

if marketposition <> -1 then begin
sell at value2 stop;
end;

end;

{stop at other side}
if marketposition = 1 then exitlong("lstop") at value2 stop;
if marketposition = -1 then exitshort("sstop") at value1 stop;

{one or two more bars for reversal}
if time = tim + barinterval or time = tim + (2*barinterval) then begin
if marketposition = -1 then begin
buy("revL") at value1 stop;
end;

if marketposition = 1 then begin
sell("revS") at value2 stop;
end;

end;

if marketposition = 1 then exitlong("ptgtL") at entryprice + (ptgt * value3) {ptgt points} limit;
if marketposition = -1 then exitshort("ptgtS") at entryprice - (ptgt * value3){ ptgt points} limit;

{bag trade after certain amount of time}
if time >= timex and barssinceentry > brs then begin

if marketposition = 1 then exitlong("belong") at entryprice + bepnt points limit;
if marketposition = -1 then exitshort("beshort") at entryprice - bepnt points limit;

end;

{new hi/lo exit}
if marketposition = 1 then sell("hiloXL") at lo - x points stop;
if marketposition = -1 then buy("hiloXS") at hi + x points stop;

2008年9月1日 星期一

Wealth-lab 使用 GlobalServer 當即時資料源




  Tradestation 2000i 可能是目前最多人使用的自動交易軟體,那大家的資料應該也都存放在 GlobalServer 裡面了,有了這個即時資料的接口,要拿來測試系統或是即時自動下單都可以。

  這個檔案是由一位俄羅斯 Barbarian 所寫的,原始下載處已經找不到了,網路上好像也搜尋不著,Wealth-lab 真的是很強的軟體,希望大家有了這個即時資料源,能弄出好的系統來。

如果你是 Wealth-lab Developer 3.0 可以直接安裝,下載位置 WLD 3.0 安裝檔案
如果是其他版本,不能直接安裝,要下載這個 WLP 其他的版本 然後解壓縮到你 Wealth-lab 的安裝檔案夾裡面

..寫到這裡肚子痛,未完待續