COCO研究院

 找回密碼
 註冊
搜索
查看: 2642|回復: 11

請問那裡可找到各指標詳細的運算方式?

[複製鏈接]
發表於 15-1-31 12:52 | 顯示全部樓層 |閱讀模式
請問各位那裡可找到詳細的運算方式?
如: MA( P, Periods ) 詳細運算等如: ma = Sum(C,Period)/period;
很想像Multicharts內建的Functions, 便知CCI, SAR等等的相關計法...
發表於 15-1-31 13:25 | 顯示全部樓層
孤狗大神什麼都會跟你說~
發表於 15-1-31 18:06 | 顯示全部樓層
Multicharts內建的公式可以看語法
PTT股版精華區
不然google你要查的公式就有了
發表於 15-1-31 20:30 | 顯示全部樓層
發表於 15-2-1 10:05 | 顯示全部樓層
http://help.tradestation.com/09_ ... radestationhelp.htm

上面的可以滿足你 MC 應該和 TS 是一樣的
發表於 15-2-2 00:41 | 顯示全部樓層
本帖最後由 joshsmi 於 15-2-2 00:44 編輯

Guys, what's all that easy language junk gotta do with AB?

MA calculation using loop compared to built-in MA
  1. function cMA( array, maperiod ) {
  2.     // set null values at the beginning of the array
  3.     for ( i = 0; i < maPeriod - 1 && i < BarCount; i++ )
  4.         myMa[i] = Null;
  5.     // calculate the average for each bar
  6.     for ( i = maPeriod - 1; i < BarCount; i++ ) {
  7.         // clear temporary result
  8.         tempSum = 0;
  9.         // inner loop to sum bar data  
  10.         for ( j = 0; j < maPeriod; j++ )
  11.             tempSum += array[i - j];
  12.         // save calculated value to result array element
  13.         myMa[i] = tempSum / maPeriod;
  14.     }
  15.     // returning result
  16.     return myMa;
  17. }

  18. P = ParamField( "Price field", -1 );
  19. Periods = Param( "Periods", 15, 2, 1000, 1, 10 );
  20. Plot( cMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
  21. Plot( MA( P, Periods ), "Built-in MA", ColorRed, styleLine );
複製代碼



發表於 15-2-2 00:47 | 顯示全部樓層
本帖最後由 joshsmi 於 15-2-2 00:48 編輯

Another way using Ref

  1. function cMA( array, maperiod ) {
  2.     total = 0;
  3.     for ( n = 0; n < maperiod && n < BarCount; n++ ) {
  4.         total += Ref( array, -n );
  5.     }
  6.     return total / maperiod;   
  7. }
  8. P = ParamField( "Price field", -1 );
  9. Periods = Param( "Periods", 15, 2, 1000, 1, 10 );
  10. Plot( cMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
  11. Plot( MA( P, Periods ), "Built-in MA", ColorRed, styleLine );
複製代碼


發表於 15-2-2 00:59 | 顯示全部樓層
built-in RSi calculation
http://www.amibroker.com/guide/afl/rsi.html


發表於 15-2-2 01:30 | 顯示全部樓層
 樓主| 發表於 15-2-2 14:04 | 顯示全部樓層
謝謝大家幫忙. ^^
我正用MC, 但覺得AB任何功能也比MC較適合我...
只是AB編程較複雜, 努力學習中.
發表於 15-2-3 01:05 | 顯示全部樓層
If you find it complex than you haven't had any programming experience at all so far.

It is as simple as going from one side of the street to the other side a street on a day where there is no traffic at all.

Yes, AB is more powerful than MC. And yes, MC developers are amateurs who can't even get simple mathematical operations done right being taught in elementary school.
 樓主| 發表於 15-2-3 11:01 | 顯示全部樓層
joshsmi 發表於 15-2-3 01:05
If you find it complex than you haven't had any programming experience at all so far.

It is as simp ...

多謝大大的教導.  對, 我編程經驗很淺.  但又不想只用已內建起的指標, 因想可隨時像MC修改自己參數.
MC簡單在已有各指標的運算公式,......但AB沒有 T_T...

不過AB好像各運算公式也多用FUNCTION這個而得出各日線棒的數值, 再把它PLOT圖像化.
...唯有繼續摸索, 可以的話, 那裡有常用的指標公式作學習?  請指導.
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

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

GMT+8, 24-5-4 06:48

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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