나만의 지표와 전략차트 위에 바로
몇 줄의 스크립트로 그리고, 지난 시세로 확인해요
빠른 선이 느린 선을 뚫으면 사고 다시 내려가면 팔아요
EMA 크로스
//@version=2
// 빠른 선이 느린 선을 뚫으면 사고 다시 내려가면 팔아요
indicator({ name: 'EMA cross strategy', overlay: true })
const fastLen = input.int('Fast length', 12, { min: 2, max: 100 })
const slowLen = input.int('Slow length', 26, { min: 3, max: 300 })
const fast = ta.ema(close, fastLen)
const slow = ta.ema(close, slowLen)
plot('Fast EMA', fast, { color: color.orange })
plot('Slow EMA', slow, { color: color.purple })
strategy({ long: ta.crossover(fast, slow), longExit: ta.crossunder(fast, slow) })