예스스탁
예스스탁 답변
2025-03-27 15:33:57
안녕하세요
예스스탁입니다.
var : v1(0),v2(0),atm(0),cnt(0),value(0);
Array : TL[20](0),TX[20](0);
var : TL1(0),TL2(0),TL3(0),TL4(0);
var : TX1(0),TX2(0),TX3(0),TX4(0);
if NextBarBdate != Bdate Then
{
v1 = Floor(NextBarOpen/2.5)*2.5;
v2 = C-v1;
if v2 > 2.5/2 Then
atm = v1+2.5;
Else
atm = v1;
value = ATM-2.5*5;
For cnt = 0 to 20
{
TL_Delete(TL[cnt]);
TL[cnt] = TL_New(sDate,sTime,value+1.25*cnt,NextBarSdate,NextBarStime,value+1.25*cnt);
TL_SetExtLeft(TL[cnt],true);
TL_SetExtRight(TL[cnt],true);
TL_SetColor(TL[cnt],IFf(cnt%2==0,Black,Gray));
TL_SetSize(TL[cnt],IFf(cnt%2==0,1,0));
TL_SetStyle(TL[cnt],IFf(cnt%2==0,1,3));
Text_Delete(TX[cnt]);
TX[cnt] = Text_New(NextBarSdate,NextBarStime,value+1.25*cnt," "+NumToStr(value+1.25*cnt,2));
Text_SetStyle(TX[cnt],0,1);
}
var1 = dayopen;
var2 = DayHigh;
var3 = DayLow;
var4 = DayClose;
TL_Delete(TL1);
TL_Delete(TL2);
TL_Delete(TL3);
TL_Delete(TL4);
TL1 = TL_New(sdate,sTime,var1,NextBarSdate,NextBarStime,var1);
TL2 = TL_New(sdate,sTime,var2,NextBarSdate,NextBarStime,var2);
TL3 = TL_New(sdate,sTime,var3,NextBarSdate,NextBarStime,var3);
TL4 = TL_New(sdate,sTime,var4,NextBarSdate,NextBarStime,var4);
TL_SetExtLeft(TL1,true);
TL_SetExtLeft(TL2,true);
TL_SetExtLeft(TL3,true);
TL_SetExtLeft(TL4,true);
TL_SetExtRight(TL1,true);
TL_SetExtRight(TL2,true);
TL_SetExtRight(TL3,true);
TL_SetExtRight(TL4,true);
TL_SetColor(TL1,Black);
TL_SetColor(TL2,Black);
TL_SetColor(TL3,Black);
TL_SetColor(TL4,Black);
TL_SetSize(TL1,0);
TL_SetSize(TL2,0);
TL_SetSize(TL3,0);
TL_SetSize(TL4,0);
TL_SetStyle(TL1,0);
TL_SetStyle(TL2,0);
TL_SetStyle(TL3,0);
TL_SetStyle(TL4,0);
Text_Delete(TX1);
Text_Delete(TX2);
Text_Delete(TX3);
Text_Delete(TX4);
TX1 = Text_New(NextBarSdate,NextBarStime,var1," 전일시가:"+NumToStr(var1,2));
TX2 = Text_New(NextBarSdate,NextBarStime,var2," 전일고가:"+NumToStr(var2,2));
TX3 = Text_New(NextBarSdate,NextBarStime,var3," 전일저가:"+NumToStr(var3,2));
TX4 = Text_New(NextBarSdate,NextBarStime,var4," 전일종가:"+NumToStr(var4,2));
Text_SetStyle(tx1,0,1);
Text_SetStyle(tx2,0,1);
Text_SetStyle(tx3,0,1);
Text_SetStyle(tx4,0,1);
}
Else
{
For cnt = 0 to 20
{
Text_SetLocation(TX[cnt],NextBarSdate,NextBarStime,value+1.25*cnt);
}
Text_SetLocation(TX1,NextBarSdate,NextBarStime,var1);
Text_SetLocation(TX2,NextBarSdate,NextBarStime,var2);
Text_SetLocation(TX3,NextBarSdate,NextBarStime,var3);
Text_SetLocation(TX4,NextBarSdate,NextBarStime,var4);
}
var : GridID(0), 출력값("");
GridID = Grid_New(7, 1, 1, White, White, 1, White, 1);
if( LastBarOnChart() == 1 ) Then
{
출력값 = "당일진폭:"+NumToStr(DayHigh-DayLow,2);
Grid_Cell(GridID,0,0,출력값,0,0,Black,Black);
Grid_CellSetTextHAlign(GridID,0,0, 2);
Grid_CellSetTextVAlign(GridID,0,0, 2);
}
즐거운 하루되세요
> qha71 님이 쓴 글입니다.
> 제목 : 수식 수정 의뢰 드립니다.
> 안녕하세요!
아래 수식은 지난번에 만들어 주셔서 잘 사용하고 있습니다.
아래 수식에 전일 고가, 저가, 종가, 시가를 선으로 나타나도록 수식을 수정해 주시길 요청드립니다.
또한 당일 진폭값을 수치로 우측 하단쪽에 나타나도록 수정해 주시길 요청드립니다.
감사합니다.
var : v1(0),v2(0),atm(0),cnt(0),value(0);
Array : TL[20](0),TX[20](0);
if NextBarBdate != Bdate Then
{
v1 = Floor(NextBarOpen/2.5)*2.5;
v2 = C-v1;
if v2 > 2.5/2 Then
atm = v1+2.5;
Else
atm = v1;
value = ATM-2.5*5;
For cnt = 0 to 20
{
TL_Delete(TL[cnt]);
TL[cnt] = TL_New(sDate,sTime,value+1.25*cnt,NextBarSdate,NextBarStime,value+1.25*cnt);
TL_SetExtLeft(TL[cnt],true);
TL_SetExtRight(TL[cnt],true);
TL_SetColor(TL[cnt],IFf(cnt%2==0,Black,Gray));
TL_SetSize(TL[cnt],IFf(cnt%2==0,1,0));
TL_SetStyle(TL[cnt],IFf(cnt%2==0,1,3));
Text_Delete(TX[cnt]);
TX[cnt] = Text_New(NextBarSdate,NextBarStime,value+1.25*cnt," "+NumToStr(value+1.25*cnt,2));
Text_SetStyle(TX[cnt],0,1);
}
}
Else
{
For cnt = 0 to 20
{
Text_SetLocation(TX[cnt],NextBarSdate,NextBarStime,value+1.25*cnt);
}
}