Amibroker SIROC Indicator Conversion
- This topic has 7 replies, 2 voices, and was last updated 6 years ago by .
Viewing 8 posts - 1 through 8 (of 8 total)
Viewing 8 posts - 1 through 8 (of 8 total)
Similar topics:
Forums › ProRealTime English forum › ProBuilder support › Amibroker SIROC Indicator Conversion
Can anybody help with the conversion of the below Amibroker indicator.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
_SECTION_BEGIN("SIROC"); prd1 = Param("First period",36,5,300,1); prd2 = Param("Second period",8,1,100,1); prdCrs = Param("Crossover",3,1,300,1); prd2 = prd2*2-1; Src= EMA((C-EMA(C,30)) /(Ref(EMA(C,30),-30)+0.000001),prd1); SIROC =100-100/(1+IIf(EMA(IIf(Src-Ref(Src,-1)<0,-(Src-Ref(Src,-1)),0),prd2)==0,1000000,EMA(IIf (Src-Ref(Src,-1)>0,Src-Ref(Src,-1),0),prd2)/(EMA(IIf(Src-Ref(Src,-1)< 0,-(Src-Ref(Src,-1)),0),prd2)+0.000001))); DTrigger = EMA(SIROC,prdCrs); Plot(siroc,"siroc",colorBlue,1); Plot(dtrigger,"trigger",colorBrown,1); Plot(90,"90",colorGrey40,1); Plot(10,"10",colorGrey40,1); GraphXSpace = 5; //--- end --- // _SECTION_END(); |
Hi, please next time follow these simple rules to post a query for a code conversion: Ask for a free code conversion
This code looks a bit different, but is it related to this SIROC indicator? : Alexander Elder SIROC momentum
If it’s not what you need, I will do the conversion.
I recoded it from scratch, easier for me, here is the code:
|
1 2 3 4 5 6 7 8 9 10 |
n1 = 36 n2 = 8 RSIp = 3 ema1 = average[n1,1](close) tmp1 = (close-ema1)/ema1[n1] ema2 = average[n2,1](tmp1) siroc = rsi[RSIp](ema2) return siroc |
The SIROC is an oscillator ranging between 0 and 100. It is computed as an n3-period RSI of an n2-period EMA of the normalized residuals of an n1-period EMA of the price.
Find exclusive trading pro-tools on