TradingView
racer8
2020년 7월 25일 오후 7시 48분

Average Force 

New Zealand Dollar/U.S. DollarFXCM

설명

Average Force is an oscillator that calculates sentiment, then smooths the result to produce a nice indicator for determining the trend.

릴리즈 노트

Indicator values are now multiplied by 100. Enjoy ;)

릴리즈 노트

Added short title: "AF"
Added name for parameter 1: "Period"
Added name for parameter 2: "Smooth"
Special thanks to midtownsk8rguy for suggesting these names.

릴리즈 노트

This new script is fool proof now thanks to midtownsk8rguy.
He told me in private chat how its possible for highest - lowest = 0 to occur.
This is bad because of the formula: (close - lowest)/(highest - lowest).
The denominator would equal 0...very bad indeed, so his new script he proposed to me fixes this problem.
코멘트
PineCoders
racer8
@PineCoders, thank you for your generous gifts 🙏
racer8
For those of you who can't understand my script but want to know the formula:

1. Force = 100*(current close - lowest price(n))/(highest price(n) - lowest price(n)) where n represents the lookback period
2. Average Force = Sma (Force, s) where s represents the length of the moving average of force.

Something you might want to note is that the formula in step 1 is the exact same formula for another indicator, Williams Percent Range (one of my favorite indicators of all time).
So essentially, this indicator is a moving average of Williams Percent Range, thus if the second parameter is set to 1, it will essentially become another W%R.
imagine5am
@racer8, Isn't the formula for averageForce = (current close - 0.5*(highest price(n) + lowest price(n))) / (highest price(n) - lowest price(n))? This is what I understood.
racer8
@imagine5am, the updated formula:

Force = { current close - lowest price (length) } / { highest price (length) - lowest price (length) } - 0.5

Avg Force = Sma (Force, smoothing length)
imagine5am
@racer8, I got the formula. Still, I simplified and wrote it so it is useful to others.
racer8
@imagine5am, your formula is wrong too, but yes, you are right that my formula was wrong. See my updated formula. Thank you for notifying me.
imagine5am
@racer8, Force = { current close - lowest price (length) } / { highest price (length) - lowest price (length) } - 0.5
Force = { current close - lowest price (length) - 0.5 * (highest price (length) - lowest price (length)) } / { highest price (length) - lowest price (length) }
Force = { current close - 0.5 * (highest price (length) + lowest price (length)) } / { highest price (length) - lowest price (length) }
See, its the same formula.
racer8
@imagine5am, ok you're right. Although, I like mine better because it's simplier and easier to understand. I find your formula to be unnecessarily complex. Presentation matters, especially when people are just learning how this indicator works.

In a nutshell, F = (C - L)/(H - L) - 0.5
더보기