예스스탁
예스스탁 답변
2024-02-05 14:50:15
안녕하세요
예스스탁입니다.
iff(macdv<Lower && macdv>0,Green)
마지막 iff문에 조건만족하지 않을때 내용이 없습니다.
검정색으로 지정해 드립니다.
input : length(10),dev(1),fastLength(12),slowLength(26),signalLength(9);
var : fastma(0),slowma(0),macdv(0),stdv(0),Upper(0),Lower(0),mc(0);
fastMA = ema(close, fastLength);
slowMA = ema(close, slowLength);
macdv = fastMA - slowMA;
Stdv = std(macdv, length);
Upper = (Stdv * dev + (ma(macdv, length)));
Lower = ((ma(macdv, length)) - (Stdv * dev));
Plot1(Upper,"Upper",gray);
Plot2(Lower,"Lower",gray);
Plot3(macdv,"macdv",
IFf(macdv>Upper && macdv>0,Red,
IFf(macdv>Upper && macdv<0,Yellow,
iff(macdv<Lower && macdv<0,Blue,
iff(macdv<Lower && macdv>0,Green,Black)))),Def,4);
PlotBaseLine1(0);
즐거운 하루되세요
> 비정성시 님이 쓴 글입니다.
> 제목 : 지표 오류 수정 부탁드립니다.
> 항상 많은 도움 감사드립니다.
input : length(10),dev(1),fastLength(12),slowLength(26),signalLength(9);
var : fastma(0),slowma(0),macdv(0),stdv(0),Upper(0),Lower(0),mc(0);
fastMA = ema(close, fastLength);
slowMA = ema(close, slowLength);
macdv = fastMA - slowMA;
Stdv = std(macdv, length);
Upper = (Stdv * dev + (ma(macdv, length)));
Lower = ((ma(macdv, length)) - (Stdv * dev));
Plot1(Upper,"Upper",gray);
Plot2(Lower,"Lower",gray);
Plot3(macdv,"macdv",
IFf(macdv>Upper && macdv>0,Red,
IFf(macdv>Upper && macdv<0,Yellow,
iff(macdv<Lower && macdv<0,Blue,
iff(macdv<Lower && macdv>0,Green)))),Def,4);
PlotBaseLine1(0);
위와 같이 지표식을 작성했는데요 plot3에 조건별로 색깔을 지정하는 부분에서 오류가 납니다. 수정 부탁드립니다.