Indicator: Fractal Adaptive Moving Average (FRAMA)

FRAMA is a type of AMA that uses fractal geometry to dynamically adjust its smoothing period to suit the changing price action over time.

See more at:

Updated code to support new TV script engine:
Code published won't work, plz use the code from the above link.

Had to update the source again to support the latest script engine changes:
Here's the new code -

Appreciate any comments/feedback,
List of my free indicators:
List of my indicators at Appstore:


Hi LazyBear,
According to etfhq's article,

"We selected a modified FRAMA with a 'FC' of 4, a 'SC' of 300 and a 'FRAMA' period of 126 as being the most effective fast FRAMA although the settings for a standard FRAMA will also produce excellent results."


Your version has 2 parameters ("period of fractal", and "W") instead of the 3 which etfhq refers to. Could you explain how your params relate to what etfhq describes?

+4 Reply
Thanks for all your great indicators.
Would it be possible for you to update the FRAMA to use the new ETF HQ modified version that they say is a lot better.
+3 Reply
Sadly it seems this code doesn't seem to work anymore? Even when I load the chart which you posted with the indicator it doesn't load.
+2 Reply
Doesn't FRAMA have two indicators? An FC and SC?
+1 Reply
Hi, Lazybear, why the code has this error, can you help me? thanks,
Error: Undeclared identifier `frama`
+1 Reply
LazyBear echild
TradingView script engine has been updated/modified since I published this. Updated code:

Thanks for bringing this to my notice.
+4 Reply
ChartArt LazyBear
Ah, I didn't see your comment here. This code works. Thanks!
+1 Reply
I love these non-standard technical indicators, man. I showed off your 4MACD last night in the daily discussion of (giving you full credit). Keep it up.
+1 Reply
LazyBear grahvity
Thanks for the Reddit post :)

I have many more -- some finished, some half-way there -- indicators, will keep pushing them out. Expect to more unconventional ones :)
+3 Reply
LazyBear LazyBear
*see more
+2 Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Referred friends Coins My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out