Percentage Trend
The Percentage Trend was described in the Russion Modern Trading magazine in 2001. It defines a trend while filtering corrections that do not exceed a certain level and switches direction only when the overall tendency changes. The user may change period and percent K values. This indicator’s definition is further expressed in the condensed code given in the calculation below.
How To Trade Using Percentage Trend
No trading signals are calculated for this indicator.
How To Access in MotiveWave
Go to the top menu, choose Study>Overlays>Percentage Trend
or go to the top menu, choose Add Study, start typing in this study name until you see it appear in the list, click on the study name, click OK.
Important Disclaimer: The information provided on this page is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security. Please see our Risk Disclosure and Performance Disclaimer Statement.
Calculation
//Max_per = max period, user defined, default is 20
//K = percent K, user defined, default is 15
//MT = more than, MOE = more or equal
//LT = less than, LOE = less or equal
C = close; Trend = C; Period = 0; prevC = C; for(int i = 1; i LT size(); i++) prevC = C; C = getClose(i); //SetUp Period When New Trend Begin if ( (prevC LOE Trend AND C MT Trend) OR (prevC MOE Trend AND C LT Trend) ) Period = 0; endIf if (Period LT Max_per ) //Counting UpTrends with dynamic period if (C MT Trend) Period = Period +1; high = C; for(int j = i-Period; j LOE i; j++) jclose = getClose(j); if (jclose MT high) high = jclose; endFor Trend = high*(1 - (K/100)); endIf //Counting DownTrends with dynamic period if (C LOE Trend) Period = Period + 1; ilow = C; for(int j = i-Period; j LOE i; j++) jclose = series.getClose(j); if (jclose MT low) low = jclose; endFor endIf Trend = ilow*(1 + (K/100)); else //Counting UpTrends with constant period if (C MT Trend) ihigh = C; for(int j = i-Max_per; j LOE i; j++) jclose = getClose(j); if (jclose MT high) high = jclose; endFor Trend = ihigh*(1 - (K/100)); endIf //Counting DownTrends with constant period if (C LOE Trend) ilow = C; for(int j = i-Max_per; j LOE i; j++) jclose = getClose(j); if (jclose LT low) low = jclose; endFor Trend = ilow*(1 + (K/100)); TP = Period;; Plot: Trend; endif endIf endFor