예스스탁
예스스탁 답변
2025-04-03 13:06:01
안녕하세요
예스스탁입니다.
var1 = ma(c,5) ;
var2 = ma(c,20) ;
##===================================================================================================================
##===================================================================================================================
var : box(0);
var : dd1(0),cnt2(0);
var : TL11(0),TL2(0),TX1(0),TX2(0);
var : DD(0),TT(0),HH(0),LL(0),FF(0);
var : L1(0),L2(0),L3(0),L4(0),L5(0);
if CrossUp( var1 ,var2 ) Then
{
box = Box_New(sDate,sTime,h,NextBarSdate,NextBarStime,l);
Box_SetColor(box,Rgb(255,150,0));
Box_SetFill(box,true);
Box_SetExtFill(box,true);
Box_SetSize(box,5);
value1 = H;
Value2 = L;
// TL11 = TL_New(sDate,sTime,value1,NextBarSdate,NextBarStime,value1);
// TL2 = TL_New(sDate,sTime,value2,NextBarSdate,NextBarStime,value2);
TL_SetColor(TL11,Rgb(255,0,0));
TL_SetColor(TL2,Rgb(255,0,0));
TL_SetSize(TL11,5);
TL_SetSize(TL2,5);
// TX1 = Text_New(NextBarSdate,NextBarStime,value1,NumToStr(value1,2));
// TX2 = Text_New(NextBarSdate,NextBarStime,value2,NumToStr(Value2,2));
Text_SetStyle(TX1,0,2);
Text_SetStyle(TX2,0,2);
Text_SetSize(TX1,15);
Text_SetSize(TX2,15);
//PlaySound("C:₩CyberOrO₩Wav₩3₩last30.wav");
DD = sDate;
TT = sTime;
HH = h;
LL = L;
FF = HH-LL;
L1 = TL_New(DD,TT,HH,NextBarSdate,NextBarStime,HH);
L2 = TL_New(DD,TT,HH-DD*0.25,NextBarSdate,NextBarStime,HH-DD*0.25);
L3 = TL_New(DD,TT,HH-DD*0.50,NextBarSdate,NextBarStime,HH-DD*0.50);
L4 = TL_New(DD,TT,HH-DD*0.75,NextBarSdate,NextBarStime,HH-DD*0.75);
L5 = TL_New(DD,TT,LL,NextBarSdate,NextBarStime,LL);
}
else
## 하락 음봉
if CrossDown( var1 ,var2 ) Then
{
box = Box_New(sDate,sTime,h,NextBarSdate,NextBarStime,l);
Box_SetColor(box,Rgb(0,255,255) );
Box_SetFill(box,true);
Box_SetExtFill(box,true);
Box_SetSize(box,5);
value1 = H;
Value2 = L;
// TL11 = TL_New(sDate,sTime,value1,NextBarSdate,NextBarStime,value1);
// TL2 = TL_New(sDate,sTime,value2,NextBarSdate,NextBarStime,value2);
TL_SetColor(TL11,Rgb(0,0,0) );
TL_SetColor(TL2,Rgb(0,0,0) );
TL_SetSize(TL11,5);
TL_SetSize(TL2,1);
// TX1 = Text_New(NextBarSdate,NextBarStime,value1,NumToStr(value1,2));
// TX2 = Text_New(NextBarSdate,NextBarStime,value2,NumToStr(Value2,2));
Text_SetStyle(TX1,0,0);
Text_SetStyle(TX2,0,0);
Text_SetSize(TX1,13);
Text_SetSize(TX2,13);
Text_SetBold(TX1,15);
Text_SetBold(TX2,15);
//PlaySound("C:₩CyberOrO₩Wav₩3₩last60.wav");
DD = sDate;
TT = sTime;
HH = h;
LL = L;
FF = HH-LL;
L1 = TL_New(DD,TT,HH,NextBarSdate,NextBarStime,HH);
L2 = TL_New(DD,TT,HH-FF*0.25,NextBarSdate,NextBarStime,HH-FF*0.25);
L3 = TL_New(DD,TT,HH-FF*0.50,NextBarSdate,NextBarStime,HH-FF*0.50);
L4 = TL_New(DD,TT,HH-FF*0.75,NextBarSdate,NextBarStime,HH-FF*0.75);
L5 = TL_New(DD,TT,LL,NextBarSdate,NextBarStime,LL);
}
Else
{
Box_SetEnd(box,NextBarSdate,NextBarStime,l);
TL_SetEnd(TL11,NextBarSdate,NextBarStime,value1);
TL_SetEnd(TL2,NextBarSdate,NextBarStime,value2);
Text_SetLocation(TX1,NextBarSdate,NextBarStime,value1);
Text_SetLocation(TX2,NextBarSdate,NextBarStime,value2);
Text_SetBold(TX1,0);
Text_SetBold(TX2,0);
if H > HH Then
HH = H;
if L < LL Then
LL = L;
FF = HH-LL;
TL_SetBegin(L1,DD,TT,HH);
TL_SetBegin(L2,DD,TT,HH-FF*0.25);
TL_SetBegin(L3,DD,TT,HH-FF*0.50);
TL_SetBegin(L4,DD,TT,HH-FF*0.75);
TL_SetBegin(L5,DD,TT,LL);
TL_SetEnd(L1,NextBarSdate,NextBarStime,HH);
TL_SetEnd(L2,NextBarSdate,NextBarStime,HH-FF*0.25);
TL_SetEnd(L3,NextBarSdate,NextBarStime,HH-FF*0.50);
TL_SetEnd(L4,NextBarSdate,NextBarStime,HH-FF*0.75);
TL_SetEnd(L5,NextBarSdate,NextBarStime,LL);
}
TL_SetColor(L1,Red);
TL_SetColor(L2,Magenta);
TL_SetColor(L3,Green);
TL_SetColor(L4,Cyan);
TL_SetColor(L5,Blue);
즐거운 하루되세요
> 요타 님이 쓴 글입니다.
> 제목 : 수식 요청 좀 드림니다.
> * 항상 많은 도움에 고맙습니다.
* 아래 수식에서 바탕박스 색상이 구분되는데
* 박스 색상이 맞게 4등분선 좀 요청 드림니다.
* 최고선, 최저선, 중간선, 하중간선, 상중간선, 5줄 입니다(그림참고)
## 수식
var1 = ma(c,5) ;
var2 = ma(c,20) ;
##===================================================================================================================
##===================================================================================================================
var : box(0);
var : dd1(0),cnt2(0);
var : TL11(0),TL2(0),TX1(0),TX2(0);
if CrossUp( var1 ,var2 ) Then
{
box = Box_New(sDate,sTime,h,NextBarSdate,NextBarStime,l);
Box_SetColor(box,Rgb(255,150,0));
Box_SetFill(box,true);
Box_SetExtFill(box,true);
Box_SetSize(box,5);
value1 = H;
Value2 = L;
// TL11 = TL_New(sDate,sTime,value1,NextBarSdate,NextBarStime,value1);
// TL2 = TL_New(sDate,sTime,value2,NextBarSdate,NextBarStime,value2);
TL_SetColor(TL11,Rgb(255,0,0));
TL_SetColor(TL2,Rgb(255,0,0));
TL_SetSize(TL11,5);
TL_SetSize(TL2,5);
// TX1 = Text_New(NextBarSdate,NextBarStime,value1,NumToStr(value1,2));
// TX2 = Text_New(NextBarSdate,NextBarStime,value2,NumToStr(Value2,2));
Text_SetStyle(TX1,0,2);
Text_SetStyle(TX2,0,2);
Text_SetSize(TX1,15);
Text_SetSize(TX2,15);
//PlaySound("C:₩CyberOrO₩Wav₩3₩last30.wav");
}
else
## 하락 음봉
if CrossDown( var1 ,var2 ) Then
{
box = Box_New(sDate,sTime,h,NextBarSdate,NextBarStime,l);
Box_SetColor(box,Rgb(0,255,255) );
Box_SetFill(box,true);
Box_SetExtFill(box,true);
Box_SetSize(box,5);
value1 = H;
Value2 = L;
// TL11 = TL_New(sDate,sTime,value1,NextBarSdate,NextBarStime,value1);
// TL2 = TL_New(sDate,sTime,value2,NextBarSdate,NextBarStime,value2);
TL_SetColor(TL11,Rgb(0,0,0) );
TL_SetColor(TL2,Rgb(0,0,0) );
TL_SetSize(TL11,5);
TL_SetSize(TL2,1);
// TX1 = Text_New(NextBarSdate,NextBarStime,value1,NumToStr(value1,2));
// TX2 = Text_New(NextBarSdate,NextBarStime,value2,NumToStr(Value2,2));
Text_SetStyle(TX1,0,0);
Text_SetStyle(TX2,0,0);
Text_SetSize(TX1,13);
Text_SetSize(TX2,13);
Text_SetBold(TX1,15);
Text_SetBold(TX2,15);
//PlaySound("C:₩CyberOrO₩Wav₩3₩last60.wav");
}
Else
{
Box_SetEnd(box,NextBarSdate,NextBarStime,l);
TL_SetEnd(TL11,NextBarSdate,NextBarStime,value1);
TL_SetEnd(TL2,NextBarSdate,NextBarStime,value2);
Text_SetLocation(TX1,NextBarSdate,NextBarStime,value1);
Text_SetLocation(TX2,NextBarSdate,NextBarStime,value2);
Text_SetBold(TX1,0);
Text_SetBold(TX2,0);
}
* 감사 합니다.