ZenAndTheArtOfTrading

Higher Timeframe EMA

This script plots a higher timeframe EMA to your chart.

You can specify the timeframe and the length of the EMA in the settings.

This chart demonstrates the 5-minute 50EMA (black) combined with the 1-hour 50EMA (colored) on the 1 minute timeframe.
Release Notes: Fixed error in code that did not allow user to change EMA length, added Offset setting.
Release Notes: Minor improvements
Release Notes: Minor improvements
Release Notes: -
- Converted to Pine Script v4
- Added smoothing or stepped option
Release Notes: -
- Changed offset default to zero
Release Notes: -
- Changed lookahead to off.
- Removed offset.
Release Notes: - Fixed repainting issue
Remove from Favorite Scripts Add to Favorite Scripts
Follow @TradeWisdom on Twitter for Daily inspiration from the best trading wizards, psychologists and philosophers.

Go to http://www.zenandtheartoftrading.com for articles on forex trading, trading psychology, trading resources, Pine Script lessons and more!

Comments

Thanks a lot! I really respect your contribution!
+1 Reply
@ujeenine, You're most welcome! Glad to be of service. Good luck with your trading :)
Reply
I am using V4 and your 7th line keeps giving me the error: Undeclared identifier 'resolution';

Is there a new way to write this in V4? Since yours says V3.

Thanks!
+1 Reply
@Charles_Trades, Hey Charles! Yes, in v4 that line of code must be changed to say this: type=input.resolution

Let me know if that doesn't work. Good luck with your trading :)
Reply
@Charles_Trades, I actually just released a small update for the script. I converted it to v4 and added a "stepped" or smoothed option for the EMA on lower timeframes :) have fun!
Reply
Thanks a lot sir... solved my problem for working with higher and lower timeframes at the same time ...
+1 Reply
any idea why the "smoothing" leads to a gap in emas line?
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