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.
發布通知: Fixed error in code that did not allow user to change EMA length, added Offset setting.
發布通知: Minor improvements
發布通知: Minor improvements
發布通知: -
- Converted to Pine Script v4
- Added smoothing or stepped option
發布通知: -
- Changed offset default to zero
發布通知: -
- Changed lookahead to off.
- Removed offset.
發布通知: - Fixed repainting issue
開源腳本

秉持真正的TradingView精神,該腳本的作者將其開源發佈,因此交易者可以理解和驗證它。為作者加油!您可以免費使用它,但是在發佈中重複使用此程式碼受網站規則的約束。您可以把它加入到常用以在圖表上使用它。

想在圖表上使用此腳本?
My Resources Hub: https://theartoftrading.com
FREE YouTube Lessons: http://rebrand.ly/zyt
FREE Pine Script Basics Course: http://rebrand.ly/zpsbc
Pine Script MASTERY Course: http://rebrand.ly/zpsmc
My Indicators & Strategies: http://rebrand.ly/zmisc

評論

Thanks a lot! I really respect your contribution!
+4 回覆
@ujeenine, You're most welcome! Glad to be of service. Good luck with your trading :)
+2 回覆
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!
+2 回覆
@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 :)
+1 回覆
@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!
+1 回覆
Thanks a lot sir... solved my problem for working with higher and lower timeframes at the same time ...
+1 回覆
any idea why the "smoothing" leads to a gap in emas line?
回覆