請選擇 進入手機版 | 繼續訪問電腦版

COCO研究院

 找回密碼
 註冊
搜索
查看: 2146|回復: 2

結算日下一日

[複製鏈接]
發表於 13-1-23 12:41 | 顯示全部樓層 |閱讀模式
小弟想寫結算日下2日


小弟參考
凱衛官網結算日範例程式
vars: pPosition(0), pMP(0), pEndTime(0);
array: pCDate[2](0);
pMP = marketposition;
if date <> date[1] then begin //Set CloseDate
pCDate[1] = pCDate[0];
if date >= _closedate() and pCDate[0] = 0 then begin
  pCDate[0] = 1;
end else if Month(date) <> Month(date[1]) then begin
  pCDate[0] = 0;
end;
if date >= 1081201 then pEndTime = 1330 else pEndTime = 1345;
end;
if pCDate[1] = 0 and pCDate[0] = 1 then begin //Day Bar CloseDate
setexitonclose;
pPosition = pMP;
if bartype = 1 then begin //Intra-Day
  if time >= pEndTime then begin
   sell("CloseDate(B)") this bar on Close;
   buytocover("CloseDate(S)") this bar on Close;
   pPosition = pMP;
  end;
end else if bartype = 2 then begin //Day
  if pPosition = 1 then begin
   buy("B(D)") next bar at market;
  end else if pPosition = -1 then begin
   sellshort("S(D)") next bar at market;
  end;
end;
end;

之後
仍然沒有頭緒..

請高手幫忙.
感恩


發表於 13-1-24 19:30 | 顯示全部樓層
 樓主| 發表於 13-1-25 07:41 | 顯示全部樓層
mewmi 大 感恩感恩感恩感恩
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

手機版|Archiver|站長信箱|廣告洽詢|COCO研究院

GMT+8, 24-3-29 13:51

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回復 返回頂部 返回列表
理財討論網站 | AI繪圖AI超擬真美女AI beauty AI Stable DiffusionAI正妹AI Lookbook