Weak in coding, keen in googling.
I found this one. FWIW.
Period = Param( "Period", 20, 1, 50, 1 );
mov = 0;
UDIDSRI = 0;
for( i = 1; i < BarCount; i++ )
{
diff[i] = C[ i ] - C[ i - 1 ];
if( diff[i] > 0 )
mov[i] = 1;
if( diff[i] < 0 )
mov[i] = -1;
movement[i] = mov[i] * ( ( 1 + abs( C[i] / C[i - 1] - 1 ) ) ^ 5 );
}
result = Sum( movement, period ) / Sum( movement, 50 );
Plot( result, _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle( "Style" ) );
Thanks very much Larry and all.
Here's the code:
x = ROC(C,1);
m = IIf(x>0,1,-1);
a = m*(1+ABS(x))^5;
b = Sum(a,20);
UDIDSRI = PercentRank(b,50);
Plot(UDIDSRI ,"",colorBlack);
Posted by: reinsley <reinsley@yahoo.fr>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (12) |
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
EmoticonEmoticon