- All Categories
- 2.3K StockCharts
- 387 SharpCharts
- 142 Other Charting Tools
- 67 Saved Charts and ChartLists
- 1.4K Scanning
- 70 Data Issues
- 172 Other StockCharts Questions
- 214 Technical Analysis
- 154 Using Technical Analysis
- 2 InterMarket and International
- 19 Market and Breadth Indicators
- 39 Market Analysis
- 105 Trading
- 105 Trading Strategies
- 164 S.C.A.N the StockCharts Answer Network forum
- 65 Using this StockCharts Answer Network forum
- 99 s.c.a.n. archives
- 17 Off-Topic
- 10 The Cogitation & Rumination Emporium
- 7 Forum Test Area

New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.

I'd like to calculate the absolute difference between's today's 9EMA and 20EMA then divide that result by the original 9EMA. Once that value has been determine, I want to test that it is less than 1%.

The formula I'm after is: (AbsVal(9EMA-20EMA)/(9EMA))<.01

I tried nesting the difference in EMA's with brackets (with & without the AbsVal operator), then used the "/" division component to divided that value by the 9EMA (also with brackets). However, I received a syntax error as it does not recognize the "/" operator.

What am I missing or is there another way to approach this calculation?

Thanks

The formula I'm after is: (AbsVal(9EMA-20EMA)/(9EMA))<.01

I tried nesting the difference in EMA's with brackets (with & without the AbsVal operator), then used the "/" division component to divided that value by the 9EMA (also with brackets). However, I received a syntax error as it does not recognize the "/" operator.

What am I missing or is there another way to approach this calculation?

Thanks

0

## Comments

so, you have to do it with or statements. The first or statement would account for the 9 above the 20, the second would account for the 20 above the nine. I'm not sure if want to account for the 9 equals the 20.

The MACD uses the EMA's. The MACD Line is the difference between the 1st 2 parameters in the MACD on a dollar or point value

MACD Line(12,26,1) The MACD line value is the difference between the 12EMA and the 26EMA in points. If the 12 is below the 26 the line value is negative, if the 12 is above the 26 the line value is positive.

PPO is exactly the same as MACD except PPO values are expressed as percentages. MACD is point values. So maybe just look for PPO line 9,20,1 is greater than or equal to -0.01 and less than or equal to 0.01 and see how that works for what you are seeking.