Directional Frequency

Category: Indicators By: davidelaferla Created: June 3, 2024, 1:22 PM
June 3, 2024, 1:22 PM
Indicators
1 Comment

directional frequency is a very simple indicator, which visually shows when the price is in a bullish or bearish trend, comparing its position with the average of the close high and low calculated over the past period. It is possible to adjust the period parameter as desired to adapt it to your trading needs. In fact, it is set by default to 14, like the RSI, exclusively by convention.
Happy trading everyone!

period=14
///////highest close & lowest close calculation////////
hi=highest[period](close)
lo=lowest[period](close)
o=(hi+lo)/2
///////Signal///////
if close>o then
r=0
g=255
b=0
endif
if close<o then
r=255
g=0
b=0
endif
////print green and red candles if bullish or bearish///
DRAWCANDLE(open, high, low, close) coloured (r,g,b)

return hi as "hi", lo as "lo", o as "o"

 

Download
Filename: Directional-Frequency.itf
Downloads: 136
davidelaferla Average
I usually let my code do the talking, which explains why my bio is as empty as a newly created file. Bio to be initialized...
Author’s Profile

Comments

Logo Logo
Loading...