예스스탁
예스스탁 답변
2021-03-23 13:51:51
안녕하세요
예스스탁입니다.
Input : TH(100);
Input : TL(100);
Input : NH(50);
Input : NL(50);
input : ntime(60);
var : tx1(0),tx2(0),tx3(0),tx4(0),tx5(0),count(0);
var : S1(0),D1(0),TM(0),TF(0),color(0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF = TM%ntime;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and ntime > 1 and TM >= TM[1]+ntime) or
(Bdate == Bdate[1] and ntime == 1 and TM > TM[1]) Then
{
var1 = O;
var11 = var1[1];
color = YELLOW;
if var11 > 0 and var1 >= var11+PriceScale*10 Then
color = RED;
if var11 > 0 and var1 <= var11-PriceScale*10 Then
color = BLUE;
if color != color[1] Then
count = 0;
count = count+1;
}
}
if var1 > 0 Then
{
Plot1(var1+PriceScale*TH,"1L",color,DEF,1);
Plot2(var1+PriceScale*NH,"2L",color,DEF,1);
Plot3(var1,"OL",color,DEF,1);
Plot4(var1-PriceScale*NL,"3L",color,DEF,1);
Plot5(var1-PriceScale*TL,"4L",color,DEF,1);
Text_Delete(tx1);
Text_Delete(tx2);
Text_Delete(tx3);
Text_Delete(tx4);
Text_Delete(tx5);
tx1 = Text_New(sdate,stime,var1,NumToStr(var1,2)+NewLine+NumToStr(count,0));
tx2 = Text_New(sdate,stime,var1+PriceScale*TH,NumToStr(var1+PriceScale*TH,2));
tx3 = Text_New(sdate,stime,var1-PriceScale*TL,NumToStr(var1-PriceScale*TL,2));
tx4 = Text_New(sdate,stime,var1+PriceScale*NH,NumToStr(var1+PriceScale*NH,2));
tx5 = Text_New(sdate,stime,var1-PriceScale*NL,NumToStr(var1-PriceScale*NL,2));
Text_SetStyle(tx1, 0, 1);
Text_SetStyle(tx2, 0, 1);
Text_SetStyle(tx3, 0, 1);
Text_SetStyle(tx4, 0, 1);
Text_SetStyle(tx5, 0, 1);
Text_SetColor(tx1, color);
Text_SetColor(tx2, BLACK);
Text_SetColor(tx3, BLACK);
Text_SetColor(tx4, BLACK);
Text_SetColor(tx5, BLACK);
Text_SetSize(tx1,11);
Text_SetBold(tx1,1);
Text_SetSize(tx2,11);
Text_SetBold(tx2,1);
Text_SetSize(tx3,11);
Text_SetBold(tx3,1);
Text_SetSize(tx4,11);
Text_SetBold(tx4,1);
Text_SetSize(tx5,11);
Text_SetBold(tx5,1);
}
즐거운 하루되세요
> 스오어스 님이 쓴 글입니다.
> 제목 : 질문 입니다.
> Input : TH(100);
Input : TL(100);
Input : NH(50);
Input : NL(50);
input : ntime(60);
var : tx1(0),tx2(0),tx3(0),tx4(0),tx5(0);
var : S1(0),D1(0),TM(0),TF(0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF = TM%ntime;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and ntime > 1 and TM >= TM[1]+ntime) or
(Bdate == Bdate[1] and ntime == 1 and TM > TM[1]) Then
{
var1 = O;
}
}
Plot1(var1+PriceScale*TH,"1L",RGB(255,255,0),DEF,1);
Plot2(var1+PriceScale*NH,"2L",RGB(255,255,0),DEF,1);
Plot3(var1,"OL",RGB(255,0,0),DEF,1);
Plot4(var1-PriceScale*NL,"3L",RGB(255,255,0),DEF,1);
Plot5(var1-PriceScale*TL,"4L",RGB(255,255,0),DEF,1);
Text_Delete(tx1);
Text_Delete(tx2);
Text_Delete(tx3);
Text_Delete(tx4);
Text_Delete(tx5);
tx1 = Text_New(sdate,stime,var1,NumToStr(var1,2));
tx2 = Text_New(sdate,stime,var1+PriceScale*TH,NumToStr(var1+PriceScale*TH,2));
tx3 = Text_New(sdate,stime,var1-PriceScale*TL,NumToStr(var1-PriceScale*TL,2));
tx4 = Text_New(sdate,stime,var1+PriceScale*NH,NumToStr(var1+PriceScale*NH,2));
tx5 = Text_New(sdate,stime,var1-PriceScale*NL,NumToStr(var1-PriceScale*NL,2));
Text_SetStyle(tx1, 0, 1);
Text_SetStyle(tx2, 0, 1);
Text_SetStyle(tx3, 0, 1);
Text_SetStyle(tx4, 0, 1);
Text_SetStyle(tx5, 0, 1);
Text_SetColor(tx1, RED);
Text_SetColor(tx2, BLACK);
Text_SetColor(tx3, BLACK);
Text_SetColor(tx4, BLACK);
Text_SetColor(tx5, BLACK);
Text_SetSize(tx1,11);
Text_SetBold(tx1,1);
Text_SetSize(tx2,11);
Text_SetBold(tx2,1);
Text_SetSize(tx3,11);
Text_SetBold(tx3,1);
Text_SetSize(tx4,11);
Text_SetBold(tx4,1);
Text_SetSize(tx5,11);
Text_SetBold(tx5,1);
=========================================
안녕하세요. 여러가지 도움 감사드립니다.
이 수식에서
시가선이 전일 시가보다 10틱 이상 높아지면 시가선 색깔이 변하는 수식이 될까요?
예를 들면
6시시가 시작하는데 5시 시가 보다 10틱 이상 높혀서 시가 시작하면 빨간색이 되고
7시 시가 시작하는데 6시 시가 보다 10틱 이상 높혀서 시가 또 시작하면 또 빨간색이 되는 수식입니다.
반대로 6시 시가가 시작하는데 5시 시가 보다 10틱 이상 낮아지면서 시가 시작하면 파란색이 되고
7시 시가 시작하는데 6시 시가 보다 더 낮게 시가 또 시작해도 파란색이 되는 겁니다
또 6시 시가가 시작하는데 5시 시가보다 10틱 이하 이면 노란색이 되고
7시 시가 시작하는데 6시 시가보다 10틱 이상 되면 빨간색되고, 10틱 이하이면 파란색이 되는 것입니다.
그리고 마지막 추가로 시가선 오른쪽 시가 수치값 아래에 빨간색,파란색,노란색 출현 횟수 표시 가능할 수 있을까요? (예를 들면 빨간색 연속적이면 1, 2, 3, 4, 5... 가다가 다시 파란색이면 다시 초기화 해서 1,2,3... 이런식이에요. 노란색도 10틱 이하 연속이면 1, 2, 3,... 이런식으로 표시 되고요.)
감사합니다. 주말 잘 보내세요.