예스스탁
예스스탁 답변
2024-12-23 13:43:03
안녕하세요
예스스탁입니다.
1
수식에서는 해당 내용 처리를 할 수 없습니다.
해당 내용은 속성에서 그래프 종류를 선그래프가 아닌 일자그래프로 지정하셔야 합니다.
2
텍스트출력에 별도의 글자박스는 그려지지 않습니다.
각 텍스트별 색상등은 함수로 수식안에서 지정하셔야 합니다.
추가된 수식 내용 참고하시기 바랍니다.
Input : AF(0.02), AFMAX(0.2);
Var : Direction(0), SAR_Value(Close), AF_Value(.02), HighValue(High), LowValue(Low), EP(0),CSarv(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);
}
}
var : t(0),hh(0),hl(0),lh(0),ll(0);
var : hh1(0),hl1(0),lh1(0),ll1(0);
var : hh2(0),hl2(0),lh2(0),ll2(0);
if CrossUp(C,CSarv) Then
{
t = 1;
hh = h;
hl = l;
hh1 = hh[1];
hl1 = hl[1];
var1 = hh1*2-ll;
Var2 = hh1;
Var3 = ll;
Var7 = ll*2-hh1;
Var9 = CSarv;
}
if CrossDown(C,CSarv) Then
{
t = -1;
lh = h;
ll = l;
lh1 = lh[1];
ll1 = ll[1];
var4 = ll1*2-hh;
Var5 = ll1;
Var6 = hh;
Var8 = hh*2-ll1;
Var10= CSarv;
}
if t == 1 Then
{
if h > hh Then
hh = h;
if l < hl Then
hl = h;
}
if t == -1 Then
{
if h > lh Then
lh = h;
if l < ll Then
ll = l;
}
Plot1(var1,"상승목표");
Plot2(var2,"HH1");
Plot3(var3,"LL");
Plot4(var4,"하락목표"); #녹밴 하락대칭
Plot5(var5,"LL1");
Plot6(var6,"HH");
Plot7(var7,"하락목표1");
Plot8(var8,"상승목표1");
Plot9(var1+PriceScale,"상승목표+");
Plot10(var8+PriceScale,"상승목표1+");
Plot11(var4-PriceScale,"하락목표-");
Plot12(var7-PriceScale,"하락목표1-");
var : tx1(0),tx2(0),tx3(0),tx4(0);
var : tx5(0),tx6(0),tx7(0),tx8(0);
var : tx9(0),tx10(0),tx11(0),tx12(0);
if var1 != var1[1] Then
{
tx1 = text_new(sDate,sTime,var1,"■");
Text_SetStyle(tx1,0,1);
Text_SetColor(tx1,Black);
Text_SetSize(tx1,12);
}
Else
Text_SetLocation(tx1,sDate,sTime,var1);
if var2 != var2[1] Then
{
tx2 = text_new(sDate,NextBarStime,var2,NumToStr(var2,2));
Text_SetStyle(tx2,0,1);
Text_SetColor(tx2,Black);
Text_SetSize(tx2,12);
}
Else
Text_SetLocation(tx2,sDate,sTime,var2);
if var3 != var3[1] Then
{
tx3 = text_new(sDate,NextBarStime,var3,NumToStr(var3,2));
Text_SetStyle(tx3,0,1);
Text_SetColor(tx3,Black);
Text_SetSize(tx3,12);
}
Else
Text_SetLocation(tx3,sDate,sTime,var3);
if var4 != var4[1] Then
{
tx4 = text_new(sDate,NextBarStime,var4,NumToStr(var4,2));
Text_SetStyle(tx4,0,1);
Text_SetColor(tx4,Black);
Text_SetSize(tx4,12);
}
Else
Text_SetLocation(tx4,sDate,sTime,var4);
if var5 != var5[1] Then
{
tx5 = text_new(sDate,NextBarStime,var5,NumToStr(var5,2));
Text_SetStyle(tx5,0,1);
Text_SetColor(tx5,Black);
Text_SetSize(tx5,12);
}
Else
Text_SetLocation(tx5,sDate,sTime,var5);
if var6 != var6[1] Then
{
tx6 = text_new(sDate,NextBarStime,var6,NumToStr(var6,2));
Text_SetStyle(tx6,0,1);
Text_SetColor(tx6,Black);
Text_SetSize(tx6,12);
}
Else
Text_SetLocation(tx6,sDate,sTime,var6);
if var7 != var7[1] Then
{
tx7 = text_new(sDate,NextBarStime,var7,NumToStr(var7,2));
Text_SetStyle(tx7,0,1);
Text_SetColor(tx7,Black);
Text_SetSize(tx7,12);
}
Else
Text_SetLocation(tx7,sDate,sTime,var7);
if var8 != var8[1] Then
{
tx8 = text_new(sDate,NextBarStime,var8,NumToStr(var8,2));
Text_SetStyle(tx8,0,1);
Text_SetColor(tx8,Black);
Text_SetSize(tx8,12);
}
Else
Text_SetLocation(tx8,sDate,sTime,var8);
if var1 != var1[1] Then
{
tx9 = text_new(sDate,NextBarStime,var1+PriceScale,NumToStr(var1+PriceScale,2));
Text_SetStyle(tx9,0,1);
Text_SetColor(tx9,Black);
Text_SetSize(tx9,12);
}
Else
Text_SetLocation(tx9,sDate,sTime,var1+PriceScale);
if var8 != var8[1] Then
{
tx10 = text_new(sDate,NextBarStime,var8+PriceScale,NumToStr(var8+PriceScale,2));
Text_SetStyle(tx10,0,1);
Text_SetColor(tx10,Black);
Text_SetSize(tx10,12);
}
Else
Text_SetLocation(tx10,sDate,sTime,var8+PriceScale);
if var4 != var4[1] Then
{
tx11 = text_new(sDate,NextBarStime,var4-PriceScale,NumToStr(var4-PriceScale,2));
Text_SetStyle(tx11,0,1);
Text_SetColor(tx11,Black);
Text_SetSize(tx11,12);
}
Else
Text_SetLocation(tx11,sDate,sTime,var4-PriceScale);
if var7 != var7[1] Then
{
tx12 = text_new(sDate,NextBarStime,var7-PriceScale,NumToStr(var7-PriceScale,2));
Text_SetStyle(tx12,0,1);
Text_SetColor(tx12,Black);
Text_SetSize(tx12,12);
}
Else
Text_SetLocation(tx12,sDate,sTime,var7-PriceScale);
3
Input : AF(0.02), AFMAX(0.2);
Var : Direction(0), SAR_Value(Close), AF_Value(.02), HighValue(High), LowValue(Low), EP(0),CSarv(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);
}
}
var : t(0),hh(0),hl(0),lh(0),ll(0);
var : hh1(0),hl1(0),lh1(0),ll1(0);
var : hh2(0),hl2(0),lh2(0),ll2(0);
if CrossUp(C,CSarv) Then
{
t = 1;
hh = h;
hl = l;
hh1 = hh[1];
hl1 = hl[1];
var1 = hh1*2-ll;
Var2 = hh1;
Var3 = ll;
Var7 = ll*2-hh1;
Var9 = CSarv;
}
if CrossDown(C,CSarv) Then
{
t = -1;
lh = h;
ll = l;
lh1 = lh[1];
ll1 = ll[1];
var4 = ll1*2-hh;
Var5 = ll1;
Var6 = hh;
Var8 = hh*2-ll1;
Var10= CSarv;
}
if t == 1 Then
{
if h > hh Then
hh = h;
if l < hl Then
hl = h;
}
if t == -1 Then
{
if h > lh Then
lh = h;
if l < ll Then
ll = l;
}
Plot1(var1,"상승목표");
Plot2(var2,"HH1");
Plot3(var3,"LL");
Plot4(var4,"하락목표"); #녹밴 하락대칭
Plot5(var5,"LL1");
Plot6(var6,"HH");
Plot7(var7,"하락목표1");
Plot8(var8,"상승목표1");
Plot9(var1+PriceScale,"상승목표+");
Plot10(var8+PriceScale,"상승목표1+");
Plot11(var4-PriceScale,"하락목표-");
Plot12(var7-PriceScale,"하락목표1-");
var : tx1(0),tx2(0),tx3(0),tx4(0);
var : tx5(0),tx6(0),tx7(0),tx8(0);
var : tx9(0),tx10(0),tx11(0),tx12(0);
if var1 != var1[1] Then
{
tx1 = text_new(sDate,sTime,var1,"■");
Text_SetStyle(tx1,0,0);
Text_SetColor(tx1,Black);
Text_SetSize(tx1,12);
}
Else
Text_SetLocation(tx1,sDate,sTime,var1);
if var2 != var2[1] Then
{
tx2 = text_new(sDate,NextBarStime,var2,"■");
Text_SetStyle(tx2,0,0);
Text_SetColor(tx2,Black);
Text_SetSize(tx2,12);
}
Else
Text_SetLocation(tx2,sDate,sTime,var2);
if var3 != var3[1] Then
{
tx3 = text_new(sDate,NextBarStime,var3,"■");
Text_SetStyle(tx3,0,0);
Text_SetColor(tx3,Black);
Text_SetSize(tx3,12);
}
Else
Text_SetLocation(tx3,sDate,sTime,var3);
if var4 != var4[1] Then
{
tx4 = text_new(sDate,NextBarStime,var4,"■");
Text_SetStyle(tx4,0,0);
Text_SetColor(tx4,Black);
Text_SetSize(tx4,12);
}
Else
Text_SetLocation(tx4,sDate,sTime,var4);
if var5 != var5[1] Then
{
tx5 = text_new(sDate,NextBarStime,var5,"■");
Text_SetStyle(tx5,0,0);
Text_SetColor(tx5,Black);
Text_SetSize(tx5,12);
}
Else
Text_SetLocation(tx5,sDate,sTime,var5);
if var6 != var6[1] Then
{
tx6 = text_new(sDate,NextBarStime,var6,"■");
Text_SetStyle(tx6,0,0);
Text_SetColor(tx6,Black);
Text_SetSize(tx6,12);
}
Else
Text_SetLocation(tx6,sDate,sTime,var6);
if var7 != var7[1] Then
{
tx7 = text_new(sDate,NextBarStime,var7,"■");
Text_SetStyle(tx7,0,0);
Text_SetColor(tx7,Black);
Text_SetSize(tx7,12);
}
Else
Text_SetLocation(tx7,sDate,sTime,var7);
if var8 != var8[1] Then
{
tx8 = text_new(sDate,NextBarStime,var8,"■");
Text_SetStyle(tx8,0,0);
Text_SetColor(tx8,Black);
Text_SetSize(tx8,12);
}
Else
Text_SetLocation(tx8,sDate,sTime,var8);
if var1 != var1[1] Then
{
tx9 = text_new(sDate,NextBarStime,var1+PriceScale,"■");
Text_SetStyle(tx9,0,0);
Text_SetColor(tx9,Black);
Text_SetSize(tx9,12);
}
Else
Text_SetLocation(tx9,sDate,sTime,var1+PriceScale);
if var8 != var8[1] Then
{
tx10 = text_new(sDate,NextBarStime,var8+PriceScale,"■");
Text_SetStyle(tx10,0,0);
Text_SetColor(tx10,Black);
Text_SetSize(tx10,12);
}
Else
Text_SetLocation(tx10,sDate,sTime,var8+PriceScale);
if var4 != var4[1] Then
{
tx11 = text_new(sDate,NextBarStime,var4-PriceScale,"■");
Text_SetStyle(tx11,0,0);
Text_SetColor(tx11,Black);
Text_SetSize(tx11,12);
}
Else
Text_SetLocation(tx11,sDate,sTime,var4-PriceScale);
if var7 != var7[1] Then
{
tx12 = text_new(sDate,NextBarStime,var7-PriceScale,"■");
Text_SetStyle(tx12,0,0);
Text_SetColor(tx12,Black);
Text_SetSize(tx12,12);
}
Else
Text_SetLocation(tx12,sDate,sTime,var7-PriceScale);
즐거운 하루되세요
> 아이덜 님이 쓴 글입니다.
> 제목 : 부탁드려용 ㅎㅎ
> 1. 가로선만 나오게 이어지는 세로 줄좀 삭제해주세요.
2. 새로생성되는 가로선마다 텍스트(갱신) 나오게 선 오른쪽으로 나오게 해주세요.
(글자크기,굵기,글자박스,색상변경가능)
---------------------------------------------------------------------------
별도식-1번공통)
3. 새로생성되는 가로선마다, 선 아래쪽으로 박스모양 텍스트 나오게 해주세요.
(좌우상하,굵기,박스색상변경,이동가능하게설정)
---------------------------------------------------------------------------
Input : AF(0.02), AFMAX(0.2);
Var : Direction(0), SAR_Value(Close), AF_Value(.02), HighValue(High), LowValue(Low), EP(0),CSarv(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);
}
}
var : t(0),hh(0),hl(0),lh(0),ll(0);
var : hh1(0),hl1(0),lh1(0),ll1(0);
var : hh2(0),hl2(0),lh2(0),ll2(0);
if CrossUp(C,CSarv) Then
{
t = 1;
hh = h;
hl = l;
hh1 = hh[1];
hl1 = hl[1];
var1 = hh1*2-ll;
Var2 = hh1;
Var3 = ll;
Var7 = ll*2-hh1;
Var9 = CSarv;
}
if CrossDown(C,CSarv) Then
{
t = -1;
lh = h;
ll = l;
lh1 = lh[1];
ll1 = ll[1];
var4 = ll1*2-hh;
Var5 = ll1;
Var6 = hh;
Var8 = hh*2-ll1;
Var10= CSarv;
}
if t == 1 Then
{
if h > hh Then
hh = h;
if l < hl Then
hl = h;
}
if t == -1 Then
{
if h > lh Then
lh = h;
if l < ll Then
ll = l;
}
Plot1(var1,"상승목표");
Plot2(var2,"HH1");
Plot3(var3,"LL");
Plot4(var4,"하락목표"); #녹밴 하락대칭
Plot5(var5,"LL1");
Plot6(var6,"HH");
Plot7(var7,"하락목표1");
Plot8(var8,"상승목표1");
Plot9(var1+PriceScale,"상승목표+");
Plot10(var8+PriceScale,"상승목표1+");
Plot11(var4-PriceScale,"하락목표-");
Plot12(var7-PriceScale,"하락목표1-");