예스스탁
예스스탁 답변
2024-11-22 10:51:42
안녕하세요
예스스탁입니다.
var : Grid(0);
if Index == 0 Then
{
Grid = Grid_New(7, 6, 3,White, Gray, 1, Gray, 0);
Grid_Cell(Grid,0,0,"종목명",0,0,BLACK,Green);
Grid_Cell(Grid,1,0,"현재가",0,0,BLACK,Green);
Grid_Cell(Grid,2,0,"전일대비",0,0,BLACK,Green);
Grid_Cell(Grid,3,0,"등락율",0,0,BLACK,Green);
Grid_Cell(Grid,4,0,"거래량",0,0,BLACK,Green);
Grid_Cell(Grid,5,0,"거래대금",0,0,BLACK,Green);
Grid_Cell(Grid,0,1,SymbolName,0,0,BLACK,White);
Grid_Cell(Grid,1,1,NumToStr(c,2),0,0,BLACK,White);
Grid_Cell(Grid,2,1,NumToStr(c-DayClose(1),2),0,0,BLACK,White);
Grid_Cell(Grid,3,1,NumToStr((c-DayClose(1))/DayClose(1)*100,2),0,0,BLACK,White);
Grid_Cell(Grid,4,1,NumToStr(v,0),0,0,BLACK,White);
Grid_Cell(Grid,5,1,NumToStr(m,0),0,0,BLACK,White);
Grid_CellSetWidth(Grid,0,0,20);
Grid_CellSetWidth(Grid,1,0,15);
Grid_CellSetWidth(Grid,2,0,15);
Grid_CellSetWidth(Grid,3,0,15);
Grid_CellSetWidth(Grid,4,0,15);
Grid_CellSetWidth(Grid,5,0,20);
Grid_CellSetTextVAlign(Grid,0,0,2);
Grid_CellSetTextVAlign(Grid,1,0,2);
Grid_CellSetTextVAlign(Grid,2,0,2);
Grid_CellSetTextVAlign(Grid,3,0,2);
Grid_CellSetTextVAlign(Grid,4,0,2);
Grid_CellSetTextVAlign(Grid,5,0,2);
Grid_CellSetTextVAlign(Grid,0,1,2);
Grid_CellSetTextVAlign(Grid,1,1,2);
Grid_CellSetTextVAlign(Grid,2,1,2);
Grid_CellSetTextVAlign(Grid,3,1,2);
Grid_CellSetTextVAlign(Grid,4,1,2);
Grid_CellSetTextVAlign(Grid,5,1,2);
Grid_CellSetTextHAlign(Grid,0,0,2);
Grid_CellSetTextHAlign(Grid,1,0,2);
Grid_CellSetTextHAlign(Grid,2,0,2);
Grid_CellSetTextHAlign(Grid,3,0,2);
Grid_CellSetTextHAlign(Grid,4,0,2);
Grid_CellSetTextHAlign(Grid,5,0,2);
Grid_CellSetTextHAlign(Grid,0,1,2);
Grid_CellSetTextHAlign(Grid,1,1,2);
Grid_CellSetTextHAlign(Grid,2,1,2);
Grid_CellSetTextHAlign(Grid,3,1,2);
Grid_CellSetTextHAlign(Grid,4,1,2);
Grid_CellSetTextHAlign(Grid,5,1,2);
Grid_CellSetTextColor(Grid,2,1,IFf(C>DayClose(1),Red,IFf(C<DayClose(1),Blue,Green)));
Grid_CellSetTextColor(Grid,3,1,IFf(C>DayClose(1),Red,IFf(C<DayClose(1),Blue,Green)));
}
var : cnt(0),m1(""),m2(""),ml1(0),ml2(0);
if LastBarOnChart == 1 Then
{
Grid_Cell(Grid,0,1,SymbolName,0,0,BLACK,White);
Grid_Cell(Grid,1,1,NumToStr(c,2),0,0,BLACK,White);
Grid_Cell(Grid,2,1,NumToStr(c-DayClose(1),2),0,0,BLACK,White);
Grid_Cell(Grid,3,1,NumToStr((c-DayClose(1))/DayClose(1)*100,2)+"%",0,0,BLACK,White);
Grid_Cell(Grid,4,1,NToStr(v,0),0,0,BLACK,White); //분봉이하에서 당일거래량이면 NumToStr(dayvolume(0),0)
Grid_Cell(Grid,5,1,NToStr(m,0),0,0,BLACK,White); //분봉이하에서 당일거래대금이면 NumToStr(daymoney(0),0)
Grid_CellSetTextColor(Grid,2,1,IFf(C>DayClose(1),Red,IFf(C<DayClose(1),Blue,Green)));
Grid_CellSetTextColor(Grid,3,1,IFf(C>DayClose(1),Red,IFf(C<DayClose(1),Blue,Green)));
}
즐거운 하루되세요
> 안산개미 님이 쓴 글입니다.
> 제목 : 90089 추가 요청드립니다.
> 안녕하세요. 답변주신것 잘 적용됩니다. 감사합니다.
추가로 요청드립니다.
1. 현재가,거래량, 거래대금 수치 나타날때 천자리 쉼표로 표시되게 부탁드립니다.
2. 전일대비, 등락율 수치는 상승일때는 적색으로, 하락일때는 파란색으로 표시
3. 등락율 수치에 "%" 단위도 나타나게 부탁드립니다.
감사합니다.