tusa 發表於 15-1-31 12:52

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

請問各位那裡可找到詳細的運算方式?
如: MA( P, Periods ) 詳細運算等如: ma = Sum(C,Period)/period;
很想像Multicharts內建的Functions, 便知CCI, SAR等等的相關計法...{:4_160:}

takashi888 發表於 15-1-31 13:25

孤狗大神什麼都會跟你說~

soumont 發表於 15-1-31 18:06

Multicharts內建的公式可以看語法
PTT股版精華區
不然google你要查的公式就有了

mead 發表於 15-1-31 20:30

http://justdata.yuanta.com.tw/z/analyst/analyst1.htm
這邊有您要的

Acer2266 發表於 15-2-1 10:05

http://help.tradestation.com/09_00/tradestationhelp/tradestationhelp.htm

上面的可以滿足你 MC 應該和 TS 是一樣的

joshsmi 發表於 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
function cMA( array, maperiod ) {
    // set null values at the beginning of the array
    for ( i = 0; i < maPeriod - 1 && i < BarCount; i++ )
      myMa = Null;
    // calculate the average for each bar
    for ( i = maPeriod - 1; i < BarCount; i++ ) {
      // clear temporary result
      tempSum = 0;
      // inner loop to sum bar data
      for ( j = 0; j < maPeriod; j++ )
            tempSum += array;
      // save calculated value to result array element
      myMa = tempSum / maPeriod;
    }
    // returning result
    return myMa;
}

P = ParamField( "Price field", -1 );
Periods = Param( "Periods", 15, 2, 1000, 1, 10 );
Plot( cMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
Plot( MA( P, Periods ), "Built-in MA", ColorRed, styleLine );



joshsmi 發表於 15-2-2 00:47

本帖最後由 joshsmi 於 15-2-2 00:48 編輯

Another way using Ref

function cMA( array, maperiod ) {
    total = 0;
    for ( n = 0; n < maperiod && n < BarCount; n++ ) {
      total += Ref( array, -n );
    }
    return total / maperiod;   
}
P = ParamField( "Price field", -1 );
Periods = Param( "Periods", 15, 2, 1000, 1, 10 );
Plot( cMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
Plot( MA( P, Periods ), "Built-in MA", ColorRed, styleLine );

joshsmi 發表於 15-2-2 00:59

built-in RSi calculation
http://www.amibroker.com/guide/afl/rsi.html


joshsmi 發表於 15-2-2 01:30

To calculate other indicators see stockcharts.com

http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:commodity_channel_index_cci
http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:parabolic_sar
etc.

tusa 發表於 15-2-2 14:04

謝謝大家幫忙. ^^
我正用MC, 但覺得AB任何功能也比MC較適合我...
只是AB編程較複雜, 努力學習中.

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 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.

tusa 發表於 15-2-3 11:01

joshsmi 發表於 15-2-3 01:05 static/image/common/back.gif
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圖像化.
...唯有繼續摸索, 可以的話, 那裡有常用的指標公式作學習?請指導. {:4_160:}
頁: [1]
查看完整版本: 請問那裡可找到各指標詳細的運算方式?