Type/to search

Smaller Fractals (+ Transparency)

Williams
1
Follow
1781
Followers

Smaller Fractals (+ Transparency)

I find that fractals are super useful, but can visually clutter up the chart pretty quickly. Their opaqueness and just overall bigness can become a bit much.

As such, these are just like regular fractals, only smaller (pine script'ssize.tiny instead of the default size.small).

Also, you can set a transparency level to these little guys (default is 50%).

Simple, more polite, and hopefully more useful fractals for those wnting a cleaner looking chart.

backtest

img

Source
Pine
/*backtest
start: 2022-05-03 00:00:00
end: 2022-05-09 23:59:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
indicator("(Smaller) Williams Fractals", shorttitle="Tiny Fractals", format=format.price, precision=0, overlay=true)
// Define "n" as the number of periods and keep a minimum value of 2 for error handling.
n = input.int(title="Periods", defval=2, minval=2)
Strategy parameters
Strategy parameters
Periods
Fractal Transparency
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)