Skip to content

Instantly share code, notes, and snippets.

@DonHuskini
Created January 13, 2025 03:51
Show Gist options
  • Save DonHuskini/199322af45d5453632b1fdcfa530d655 to your computer and use it in GitHub Desktop.
Save DonHuskini/199322af45d5453632b1fdcfa530d655 to your computer and use it in GitHub Desktop.
PineScript EMAs
//@version=5
indicator("EMAs", shorttitle="EMA", overlay=true)
// Plot 100H4 EMA line
plot(request.security(syminfo.tickerid, '240', ta.ema(close, 100)), linewidth=1, color=color.gray, title='100H4', trackprice = true, show_last = 1)
// Plot 200H4 EMA
plot(request.security(syminfo.tickerid, '240', ta.ema(close, 200)), linewidth=1, color=color.gray, title='200H4', trackprice = true, show_last = 1)
// Plot 100D1 EMA
plot(request.security(syminfo.tickerid, '1440', ta.ema(close, 100)), linewidth=1, color=color.gray, title='100D', trackprice = true, show_last = 1)
// Plot 200D1 EMA
plot(request.security(syminfo.tickerid, '1440', ta.ema(close, 200)), linewidth=1, color=color.gray, title='200D', trackprice = true, show_last = 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment