程式先須 判斷 日周月的位置 最後由60分分鐘線做出訊號 因為必須要用到日周月的數據 只能用data4 呢?
EX if 月K>D and 周 K>D and 日K>D and 60Kcross over 60D then buy ("buy") 1 shares next bar at market;
除了多周期外 還有其他簡單的方法嗎 謝謝
其他方法比較難,DATAN 是最簡單的方法
其他的方法有
1. 使用變數去存值,另寫KD計算公式來算
2.使用ADE,存放不同週期的KD值
在請教語法的問題 如下
[intrabarordergeneration=true]
if getsymbolname of data1 = "TW60" then begin
if K60M cross over D60M then buy("buy") 1 shares next bar at market; setstoploss(140*bigpointvalue) ;
end;
if getsymbolname of data2 = "TW1day" then begin
if Kday > Dday then........? <== 條件日K大於日D 再去執行 data1 的程式語法 該怎麼寫呢?? 謝謝 end;
感覺上您似乎用了太多你還不了解的功能
IOG + 60K + 日K ,基本上算是很詭異的用法
程式碼請去掉IOG 或是 說明IOG對你的交易的用途為何? 或是直接說明你的需求
不然很難猜出你希望得到的結果
我先猜一下你大概希望出現的程式碼好了,但也可能不是你要的 XD
vK = K值函數 of data2;
vD = D值函數 of data2;
if vK > vD then begin
if K60M cross over D60M then buy("buy") 1 shares next bar at market;
setstoploss(140*bigpointvalue) ;