COCO研究院

 找回密碼
 註冊
搜索
查看: 7156|回復: 4

請教參數問題:Numeric,NumericSimple,NumericRef,NumericSeries

[複製鏈接]
發表於 14-5-31 09:00 | 顯示全部樓層 |閱讀模式
請教參數問題:
input:VarA(Numeric);
input:VarB(NumericSimple);
input:VarC(NumericRef);
input:VarD(NumericSeries);

以上參數用法有何不同? 謝謝!
(如果舉例說明更佳)


發表於 14-5-31 10:04 | 顯示全部樓層
MC客服的回答
Numeric  數字型態  自動切換 常數或時序

NumericSimple  數字型態  常數  不可取歷史值

NumericSeries  數字型態  時序   可取歷史值

NumericRef  數字型態  傳址   可回傳

評分

參與人數 2金錢 +7 收起 理由
comewish + 5 按一個讚
googleandy + 2 感謝分享

查看全部評分

發表於 14-5-31 11:04 | 顯示全部樓層
Powerlanguage程式交易語法大全
找到一個範例

內建的快速總和函數SummationFC
  1. inputs:
  2.         PriceValue( numericseries ),
  3.         Len( numericsimple ) ;                                         

  4. variables:
  5.         var0( 0 ) ;

  6. if CurrentBar = 1 then
  7.         begin
  8.         for Value1 = 0 to Len - 1
  9.                 begin
  10.                 var0 = var0 + PriceValue[Value1] ;
  11.                 end ;
  12.         end
  13. else
  14.         var0 = var0[1] + PriceValue - PriceValue[Len] ;

  15. SummationFC = var0 ;
複製代碼
PriceValue是要加總的數列
Len是要加總的長度(個數)
腳本中的陳述式,都可以直接用參數名稱來取用參數的值

僅供參考

評分

參與人數 1金錢 +2 收起 理由
googleandy + 2 太強了,感恩!

查看全部評分

 樓主| 發表於 14-5-31 12:31 | 顯示全部樓層
f29825604 發表於 14-5-31 11:04
Powerlanguage程式交易語法大全
找到一個範例

這個舉例,有幫助,謝謝!

評分

參與人數 1金錢 +1 收起 理由
f29825604 + 1 別客氣

查看全部評分

發表於 14-6-1 21:07 | 顯示全部樓層
好多熱心的人 ! 這是ㄧ個好地方 !

您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

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

GMT+8, 24-5-4 15:11

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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