![]() |
總頁數 (2): « 1 [2] 在這個頁面顯示本主題全部的 23 個文章 |
奇狐社區論壇 (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=4116)
互相 互相啦
希望能加減有所幫助
條件句咱沒法
哪位改善吧
感恩唷
__________________
至誠能勝天下至偽
至拙能勝天下至巧
引用:
最初由 cgjj 發表
原碼:
a:MA(CLOSE,10)COLORGREEN;
b:MA(CLOSE,30)COLORBLUE;
金叉:IF(CROSS(a,b),CLOSE,0);
前金叉:ref(金叉,ref(BARSLAST(金叉),1)+1) LINETHICK0;
後金叉:c*0;
for NPos=lbound(金叉) to ubound(金叉) do begin
if 金叉[NPos]>1 then begin
for ZPos=NPos+1 to ubound(金叉) do begin
if 金叉[ZPos]>0 then begin
for S=NPos to ZPos-1 do begin
後金叉[S]:=金叉[ZPos];
end;
break;
end;
end;
end;
end;
再次煩請
cgjj 總版主幫忙一下
謝謝
且學習一下總版主的循環
a:MA(CLOSE,10)COLORwhite;
b:MA(CLOSE,30)COLORyellow;
金叉:IF(CROSS(a,b),barpos,0),linethick0;
前金叉:ref(金叉,ref(BARSLAST(金叉),1)+1) LINETHICK0;
後金叉:c*0,linethick0;
for NPos=lbound(金叉) to ubound(金叉) do begin
if 金叉[NPos]>1 then begin
for ZPos=NPos+1 to ubound(金叉) do begin
if 金叉[ZPos]>0 then begin
for S=NPos to ZPos-1 do begin
後金叉[S]:=金叉[ZPos];
end;
break;
end;
end;
end;
end;
vertline(cross(a,b));
ba:=barslast(cross(a,b)),linethick0,colorwhite;
n:=if(後金叉=0,0,ref((後金叉-金叉)*(ba=0),barslast((後金叉-金叉)*(ba=0))));
x:if(後金叉=0,0,if(ba=0,0,n-ba)),linethick0,colorwhite;
感謝K 大的解答
vertline(cross(a,b));
ba:=barslast(cross(a,b)),linethick0,colorwhite;
n:=if(後金叉=0,0,ref((後金叉-金叉)*(ba=0),barslast((後金叉-金叉)*(ba=0))));
x:if(後金叉=0,0,if(ba=0,0,n-ba)),linethick0,colorwhite;
奇狐內建函數就差這函數
簡單的幾句
解答了用奇狐來的多年困惑
您真是強
不輸專業人員
謝謝
a:MA(CLOSE,10)COLORGREEN;
b:MA(CLOSE,30)COLORBLUE;
金叉:IF(CROSS(a,b),CLOSE,0);
前金叉:ref(金叉,ref(BARSLAST(金叉),1)+1) LINETHICK0;
後金叉:c*0;
for NPos=lbound(金叉) to ubound(金叉) do begin
if 金叉[NPos]>1 then begin
for ZPos=NPos+1 to ubound(金叉) do begin
if 金叉[ZPos]>0 then begin
for S=NPos to ZPos-1 do begin
後金叉[S]:=金叉[ZPos];
end;
break;
end;
end;
end;
end;
請問奇狐
把未來成立的數據拿到當下位置用
除了這方法外
有沒其他運算較快的寫法
感謝
?????
!!!!!
方法是人想出來的, 我相信有!
就是要多動腦啦
全部時間均為台灣時間, 現在時間為17:51 | 總頁數 (2): « 1 [2] 在這個頁面顯示本主題全部的 23 個文章 |
Powered by: vBulletin Version 2.3.0 - Copyright©2000-, Jelsoft Enterprises Limited.
簡愛洋行 製作 Copyright 2003-. All Rights Reserved.