예스스탁
예스스탁 답변
2020-05-21 11:30:10
안녕하세요
예스스탁입니다.
input : Length(10),Smoothing(5),SingleColor(false),bgcol(true);
var : ln(0),diff(0),pfetmp(0),pfe(0),col(0);
// Calcs
ln = Length - 1;
diff = close - close[ln];
pfetmp = 100 * sqrt(pow(diff,2) + pow(Length,2)) / AccumN(sqrt(1 + pow(close - close[1],2)), Length - 1);
pfe = ema(iff(diff > 0 , pfetmp , -pfetmp), Smoothing);
// Plots
col = iff(pfe > 50 or pfe < -50 ,red,blue);
plot1(pfe,"pfe",col);
plot2(50,"50",GRAY);
plot3(-50,"-50",GRAY);
plot4(0,"0",GRAY);
즐거운 하루되세요
> thegin 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> Length = input(10)
Smoothing = input(5)
SingleColor = input(false, title="Single Color?")
bgcol = input(true, title="Color Background?")
// Calcs
ln = Length - 1
diff = close - close[ln]
pfetmp = 100 * sqrt(pow(diff,2) + pow(Length,2)) / sum(sqrt(1 + pow(close - close[1],2)), Length - 1)
pfe = ema( diff > 0 ? pfetmp : -pfetmp, Smoothing)
// Plots
col = pfe > 50 or pfe < -50 ? #FF8D6F : #FFD9CF
plot(pfe, color=SingleColor ? #FFD9CF : col,linewidth=1)
hline(50, color=#FFD105, linestyle=dotted)
hline(-50, color=#FFD105, linestyle=dotted)
hline(0, color=#FFD105, linestyle=dotted)
도움주셔서 감사드립니다.