커뮤니티

안녕하세요

프로필 이미지
물고기
2020-02-26 09:29:30
458
글번호 136334
답변완료
study("EIS", shorttitle="B") useCustomResolution=input(false, type=bool) customResolution=input("D", type=resolution) source = security(tickerid, useCustomResolution ? customResolution : period, close) showColorBars=input(false, type=bool) lengthEMA = input(13) fastLength = input(12, minval=1), slowLength=input(26,minval=1) signalLength=input(9,minval=1) calc_hist(source, fastLength, slowLength) => fastMA = ema(source, fastLength) slowMA = ema(source, slowLength) macd = fastMA - slowMA signal = sma(macd, signalLength) macd - signal get_color(emaSeries, macdHist) => g_f = (emaSeries > emaSeries[1]) and (macdHist > macdHist[1]) r_f = (emaSeries < emaSeries[1]) and (macdHist < macdHist[1]) g_f ? green : r_f ? red : blue b_color = get_color(ema(source, lengthEMA), calc_hist(source, fastLength, slowLength)) bgcolor(b_color, transp=0) barcolor(showColorBars ? b_color : na) 예스수식으로 변환 문의드립니다. 감사합니다.
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-02-26 14:31:38

안녕하세요 예스스탁입니다. 차트 바탕색 변경은 가능하지 않습니다. 강조식만 올려드립니다. input : useCustomResolution(false),customResolution("D"),showColorBars(true),lengthEMA(13),fastLength(12),slowLength(26),signalLength(9); var : source(0),emaSeries(0),macdHist(0),g_f(false),r_f(false),b_color(0); source = close; emaSeries = ema(C,lengthEMA); macdHist = MACD_OSC(fastLength, slowLength,signalLength); g_f = (emaSeries > emaSeries[1]) and (macdHist > macdHist[1]); r_f = (emaSeries < emaSeries[1]) and (macdHist < macdHist[1]); b_color = iff(g_f,green ,iff(r_f,red,blue)); if showColorBars == true Then PlotPaintBar(H,L,"강조",b_color); 즐거운 하루되세요 > 물고기 님이 쓴 글입니다. > 제목 : 안녕하세요 > study("EIS", shorttitle="B") useCustomResolution=input(false, type=bool) customResolution=input("D", type=resolution) source = security(tickerid, useCustomResolution ? customResolution : period, close) showColorBars=input(false, type=bool) lengthEMA = input(13) fastLength = input(12, minval=1), slowLength=input(26,minval=1) signalLength=input(9,minval=1) calc_hist(source, fastLength, slowLength) => fastMA = ema(source, fastLength) slowMA = ema(source, slowLength) macd = fastMA - slowMA signal = sma(macd, signalLength) macd - signal get_color(emaSeries, macdHist) => g_f = (emaSeries > emaSeries[1]) and (macdHist > macdHist[1]) r_f = (emaSeries < emaSeries[1]) and (macdHist < macdHist[1]) g_f ? green : r_f ? red : blue b_color = get_color(ema(source, lengthEMA), calc_hist(source, fastLength, slowLength)) bgcolor(b_color, transp=0) barcolor(showColorBars ? b_color : na) 예스수식으로 변환 문의드립니다. 감사합니다.