奇狐社區論壇
在這個頁面顯示本主題全部的 3 個文章

奇狐社區論壇 (http://www.chiefox.com.tw/bbs/index.php)
- 問題交流 (http://www.chiefox.com.tw/bbs/forumdisplay.php?forumid=28)
-- 請問下列問題應如何寫 (http://www.chiefox.com.tw/bbs/showthread.php?threadid=7538)


由 ruhong0927 在 2007-04-17 21:50 發表:

請問下列問題應如何寫

我想在特定週期下(1分鐘~60分)
寫二種公式
1
開盤到當前時間所有量的加總
2
十字標到最後,量的加總

會的人請教我寫,先行感謝!


由 alpha 在 2007-04-18 00:13 發表:

(1)
plus:= day<>ref(day,1);
sum(V, barslast(plus) +1);

(2)

plus:= day<>ref(day,1);

A1:=ref( plus*barpos , barslast(plus));

B1:= SYSPARAM(1)>=A1 AND (SYSPARAM(1)-A1)<=barslast(plus);

V2:= if(barpos >= barssince(B1), sum(V, sum(B1,0)),0 );
V2:= if(barpos< lbound(V2),0,V2);

sum(V,barslast(plus)+1)*(B1<=0) + V2*(B1>0) ,volstick;

vertline(plus),colorcyan,linedot;
vertline(barpos=SYSPARAM(1)),coloryellow,linedot;



由 ruhong0927 在 2007-04-20 20:50 發表:

謝謝


全部時間均為台灣時間, 現在時間為09:18
在這個頁面顯示本主題全部的 3 個文章


Powered by: vBulletin Version 2.3.0 - Copyright©2000-, Jelsoft Enterprises Limited.

簡愛洋行 製作 Copyright 2003-. All Rights Reserved.