예스스탁
예스스탁 답변
2022-07-29 15:43:40
안녕하세요
예스스탁입니다.
if CrossUp(c,CSarv) Then
{
box = Box_New_Self(sdate,sTime,100,NextBarSdate,NextBarStime,-100);
Box_SetColor(box,Red);
Box_SetFill(box,true);
}
else if CrossDown(c,CSarv) Then
{
box = Box_New_Self(sdate,sTime,100,NextBarSdate,NextBarStime,-100);
Box_SetColor(box,Blue);
Box_SetFill(box,true);
}
Else
{
Box_SetEnd(box,NextBarSdate,NextBarStime,-100);
}
1
수식에 하단의 위 내용을 보시면
Box_SetColor함수로 구간변 색상이 지정되어 있습니다.
해당 함수에서 색상예약어를 변경하셔서 색상을 변경해 주셔야 합니다.
색상별 예약어 명칭은 예스랭귀지 도움말에서 확인하시기 바랍니다.
2
박스의 내부색상은 기본적으로 약간 투명하게 기본셋팅이 되어 있습니다.
기본값이 50으로 지정되어 있습니다.
0~255까지 지정할 수 있는데 아래와 같이 255로 지정하면 가장 불투명한 값입니다.
0~255사이 값으로 투명도 조절하시면 됩니다.
if CrossUp(c,CSarv) Then
{
box = Box_New_Self(sdate,sTime,100,NextBarSdate,NextBarStime,-100);
Box_SetColor(box,Red);
Box_SetFill(box,true,255);
}
else if CrossDown(c,CSarv) Then
{
box = Box_New_Self(sdate,sTime,100,NextBarSdate,NextBarStime,-100);
Box_SetColor(box,Blue);
Box_SetFill(box,true,255);
}
Else
{
Box_SetEnd(box,NextBarSdate,NextBarStime,-100);
}
즐거운 하루되세요
> 고성 님이 쓴 글입니다.
> 제목 : 종가파라볼릭 박스색상 변경
> Input : AF(0.02), AFMAX(0.2);
Var : Direction(0), SAR_Value(Close), AF_Value(.02), HighValue(High), LowValue(Low), EP(0),CSarv(0);
var : box(0);
if Index == 0 or (Bdate != Bdate[1]) Then
{
Direction = 0;
SAR_Value = C;
AF_Value = 0.02;
HighValue = H;
LowValue = L;
EP = 0;
}
if EP != 0 Then
{
if Direction == 1 then
{
EP = HighValue;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if High > HighValue then
{
HighValue = High;
AF_Value = AF_Value + AF;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
if Close < SAR_Value then
{
Direction = -1;
SAR_Value = EP;
AF_Value = 0;
EP = 0;
LowValue = low;
}
}
else
{
EP = LowValue;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if Low < LowValue then
{
LowValue = Low;
AF_Value = AF_Value + Af;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
if Close > SAR_Value then
{
Direction = 1;
SAR_Value = EP;
AF_Value = 0;
EP = 0;
HighValue = High;
}
}
CSarv = SAR_Value;
}
else
{
if SAR_Value != 0 && EP == 0 then
{
if Direction == 1 then
{
EP = HighValue;
AF_Value = AF;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if High > HighValue then
{
HighValue = High;
AF_Value = AF_Value + AF;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
}
else
{
EP = LowValue;
AF_Value = Af;
SAR_Value = SAR_Value + AF_Value * (EP - SAR_Value);
if Low < LowValue then
{
LowValue = Low;
AF_Value = AF_Value + AF;
if AF_Value >= AFMAX then AF_Value = AFMAX;
}
}
CSarv = SAR_Value;
}
else
{
if Direction == 0 then
{
if Close > Close[1] then Direction = 1;
else
if Close < Close[1] then Direction = -1;
}
else
{
if Direction == 1 then
{
if Close < Close[1] then
{
Direction = -1;
SAR_Value = HighValue;
CSarv = SAR_Value;
}
}
if Direction == -1 then
{
if Close > Close[1] then
{
Direction = 1;
SAR_Value = LowValue;
CSarv = SAR_Value;
}
}
}
LowValue = min(Low, LowValue);
HighValue = max(High, HighValue);
}
}
if CrossUp(c,CSarv) Then
{
box = Box_New_Self(sdate,sTime,100,NextBarSdate,NextBarStime,-100);
Box_SetColor(box,Red);
Box_SetFill(box,true);
}
else if CrossDown(c,CSarv) Then
{
box = Box_New_Self(sdate,sTime,100,NextBarSdate,NextBarStime,-100);
Box_SetColor(box,Blue);
Box_SetFill(box,true);
}
Else
{
Box_SetEnd(box,NextBarSdate,NextBarStime,-100);
}
고맙습니다.
박스 색상 변경이 잘 안됩니다.