COCO研究院

 找回密碼
 註冊
搜索
查看: 25389|回復: 5

TS2000i語法求助,謝謝先!

[複製鏈接]
發表於 12-6-28 01:00 | 顯示全部樓層 |閱讀模式
對一個趨勢指標有興趣,但不知道其中一些函數的意義,如下面紅色部分,求教了!

ASCTrend2

Inputs: RISK(3), MONYRISK(2.0);

If CurrentBar = 1 then begin
vars: value2(1), value3(18), value10(10000), value19(0);
value19 = MONYRISK*Average(Range, 10)*BigPointValue;
value2 = Risk;
value3 = 18 + 3*value2;
End;

value11 = Average(C, 9);
value12 = Average(C, value3);
value13 = Average(Range, 10);
value4 = JESSD( High, Low, H[value2], L[value2], C[value2] );
If MRO (value4 > value4[1] and value4[1] < value4[2], 2, 1) > -1 and L[1] > value4[1] then
value5 = value4[1] - value13 ;
If MRO (value4 < value4[1] and value4[1] > value4[2], 2, 1) > -1 and H[1] < value4[1] then
value6 = value4[1] + value13 ;
If value11[1] < value12[1] and value11 > value12 then value5 = TrueLow -value13;
If value11[1] > value12[1] and value11 < value12 then value5 = TrueHigh + value13;
If AbsValue( O - C[1] ) >= 1.618*value13 then begin
If value11 > value12 then value5 = Low - value13;
If value11 < value12 then value14 = High + value13;
End;

value7 = BS105(L, 2.40, value13, value9 );
value8 = SS105(H, 2.40, value13, value10 );
value9 = BS0(L, 60, value7, Risk, value19);
value10 = SS0(H, 60, value8, Risk, value19);
If L - value9 > value19/BigPointValue then value9 = L - (1.50 + 0.1*Risk)*value13;
If value10 - H > value19/BigPointValue then value10 = H + (1.50 + 0.1*Risk)*value13;
If value11 >= value12 and value5 >= value9 then value9 = value5;
If value11 <= value12 and value6 <= value10 then value10 = value6;
If value11 <= value12 and value5 <= value9 then value9 = value5;
If value11 >= value12 and value6 >= value10 then value10 = value6;
If MRO(value11 >= value12, 2, 2) > -1 and value9 <= value9[1] then value9 = value9[1] ;
If MRO(value11 <= value12, 2, 2) > -1 and value10 >= value10[1] then value10 = value10[1] ;
If value9 > 0 and value11 >= value12 and value9 <= H then Plot1 (value9, "BuyStop2");
If value10 > 0 and value10 < 1000000000 and value11 <= value12 and value10 >= L then Plot2 (value10, "SellStop2");

請問這几個函數的意思是什麽?
BigPointValue :
JESSD :
BS105 :
SS105 :
BS0:
SS0 :



發表於 12-6-28 07:11 | 顯示全部樓層
這是應該是另一個函數~
發表於 12-6-28 10:12 | 顯示全部樓層
BigPointValue -> 每一大點的價值金額,如台指期每跳一檔就是一點,金額是200
                          不是所有商品都是跳一檔就是一大點
                          看Global Server 的商品設定中的Setting 標籤就看的到
                            圖片 1.png
pricescale : 1/100
Min.Movement : 5.0
以上表示0.05 一跳
Point Value : 4000.0 表示一大點是4000元
跳動一檔的金額就是0.05*4000 = 200
其他都是使用者自定函數
如果是以sigal or strategy 匯入,應該會將函數一併匯入,除非沒勾選匯入Function 選項
如果有匯入,在函數名稱點選右鍵,選Open function 可看到函數內容,除非被設定保護
以上參考

評分

參與人數 1金錢 +8 收起 理由
cthlj + 8 很棒的文章,感恩!

查看全部評分

 樓主| 發表於 12-6-29 23:29 | 顯示全部樓層
raytheon 發表於 12-6-28 10:12
BigPointValue -> 每一大點的價值金額,如台指期每跳一檔就是一點,金額是200
                           ...

非常感謝,確實是自定義函數!出差,回複遲了,見諒!
 樓主| 發表於 12-6-30 18:48 | 顯示全部樓層
自定义函数如下:
JESSD:
Inputs : High0(NumericSimple), Low0(NumericSimple), HighN(NumericSimple), LowN(NumericSimple),
CloseN(NumericSimple);
value4 = ( High0 + Low0 ) / 2.0;
value5 = 2*value4 - LowN;
value6 = 2*value4 - HighN;
If CloseN < value4 then JESSD = value5 else JESSD = value6;

BS105:
Inputs: price(numeric), const(numeric), avg(numeric), val(numeric);
if (price-const*avg < val) then begin
  BS105=val;
  end
else BS105=price-const*avg;

SS105:
Inputs: price(numeric), const(numeric), avg(numeric), val(numeric);
if (price-const*avg < val) then begin
  BS105=val;
  end
else BS105=price-const*avg;

BS0:
Inputs: Price(numeric), const(numeric), val(numeric), Risk(numeric), MonyRisk(numeric);
vars: ii(0);
ii=val;
BS0=ii;

SS0:
Inputs: Price(numeric), const(numeric), val(numeric), Risk(numeric), MonyRisk(numeric);
vars: ii(0);
ii=val;
SS0=ii;
 樓主| 發表於 12-6-30 19:35 | 顯示全部樓層
另外一些問題,首先一個
value7 = BS105(L, 2.40, value13, value9 );
BS105的定義
Inputs: price(numeric), const(numeric), avg(numeric), val(numeric);
if (price-const*avg < val) then begin
  BS105=val;
  end
else BS105=price-const*avg;

value9應該對應于val(numeric),它的初始值是什麽,第一次出現?

第二個問題:
value9 = BS0(L, 60, value7, Risk, value19);
BS0定義Inputs: Price(numeric), const(numeric), val(numeric), Risk(numeric), MonyRisk(numeric); vars: ii(0); ii=val;BS0=ii;

這不就相當於下面這一句嗎?value9:=value7;
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

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

GMT+8, 24-11-20 09:22

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回復 返回頂部 返回列表
理財討論網站 |