커뮤니티
지표 수정
2019-06-26 10:11:30
281
글번호 129767
아래의 지표식은 변곡점에서 위,아래을 나타내주는식입니다.
문제는 나타나는구간이 예를 들어 하방에서 상방로 바뀔때
계속 방으로 표시가 나오다가 밑을 찍으면 바로 상방표시가 나와주어야되는데
찍고 한참을 올라가다가 갑자기 하방에서 상방으로 표시가 나옵니다
밑을 찍자마자 실시간으로표시가 바뀌면 좋겠으나 안된다면 바로 바뀌진 않아도 바로표시가 바뀌수 있게 부탁드립니다
또한가지 부탁드릴것은 선굵기를 조절 할수있게 해주시고
●표시와 상방,하방이라는 글자는 없에주셨으면 합니다
Input:chRate(1);
Var:j(0),upTr(100),dnTr(-100),upRate(0),dnRate(0),trnd(0),TL(0),
date11(0),date12(0),time11(0),time12(0),TL1(0),
date21(0),date22(0),time21(0),time22(0),TL2(0),
date31(0),date32(0),time31(0),time32(0),TL3(0);
Array:hiVal[10](0),loVal[10](0),hiBar[10](0),loBar[10](0);
var : TL13(0),TL14(0),color(0),Tx1(0),Tx2(0),tx3(0),tx4(0),tx11(0),tx22(0),cnt(0);
upRate = 1 + (chRate/100);
dnRate = 1 - (chRate/100);
for j = 1 to 1 {
loBar[j] = loBar[j] + 1;
hiBar[j] = hiBar[j] + 1;
}
if hiVal[0] <= H or hiVal[0] == 0 then {
hiVal[0] = H;
hiBar[0] = 0;
}
else {
hiBar[0] = hiBar[0] + 1;
}
if loVal[0] >= L or loVal[0] == 0 then {
loVal[0] = L;
loBar[0] = 0;
}
else {
loBar[0] = loBar[0] + 1;
}
if trnd != dnTr && hiVal[0] > H && hiVal[0] * dnRate > L then trnd = dnTr;
else if trnd != upTr && loVal[0] < L && loVal[0] * upRate < H then trnd = upTr;
if trnd[1] == upTr and trnd == dnTr then {
for j = 8 downto 1 {
hiVal[j+1] = hiVal[j];
hiBar[j+1] = hiBar[j];
}
hiVal[1] = hiVal[0];
hiBar[1] = hiBar[0];
hiVal[0] = H;
hiBar[0] = 0;
loVal[0] = L;
loBar[0] = 0;
date11 = date[loBar[1]];
time11 = stime[loBar[1]];
Value11 = loVal[1];
date12 = date[hiBar[1]];
time12 = stime[hiBar[1]];
Value12 = hiVal[1];
}
if trnd[1] == dnTr and trnd == dnTr and
hiVal[1] < hiVal[0] and
hiVal[0] * dnRate > L then {
hiVal[1] = hiVal[0];
hiBar[1] = hiBar[0];
hiVal[0] = H;
hiBar[0] = 0;
loVal[0] = L;
loBar[0] = 0;
date12 = date[hiBar[1]];
time12 = stime[hiBar[1]];
Value12 = hiVal[1];
TL_SetEnd(TL1, date12,time12,Value12);
}
if trnd[1] == dnTr and trnd == upTr then {
for j = 8 downto 1 {
loVal[j+1] = loVal[j];
loBar[j+1] = loBar[j];
}
loVal[1] = loVal[0];
loBar[1] = loBar[0];
loVal[0] = L;
loBar[0] = 0;
hiVal[0] = H;
hiBar[0] = 0;
date11 = date[hiBar[1]];
time11 = stime[hiBar[1]];
Value11 = hiVal[1];
date12 = date[loBar[1]];
time12 = stime[loBar[1]];
Value12 = loVal[1];
}
if trnd[1] == upTr and trnd == upTr and
loVal[1] > loVal[0] and
loVal[0] * upRate < H then {
loVal[1] = loVal[0];
loBar[1] = loBar[0];
loVal[0] = L;
loBar[0] = 0;
hiVal[0] = H;
hiBar[0] = 0;
date12 = date[loBar[1]];
time12 = stime[loBar[1]];
Value12 = loVal[1];
TL_SetEnd(TL1, date12,time12,Value12);
}
if trnd == upTr and loVal[2] > loVal[1] then{
TL_SetColor(TL1,BLUE);
color = blue;
}
else if trnd == dnTr and hiVal[2] < hiVal[1] then{
TL_SetColor(TL1,RED);
color = RED;
}
else{
TL_SetColor(TL1,BLACK);
color = BLACK;
}
TL_SetSize(TL1,2);
TL_SetColor(TL2,RED);
TL_SetColor(TL3,BLUE);
if var1 <= 0 and Trnd == uptr and Trnd != Trnd[1] Then{
var1 = 1;
value1 = loval[1];
TL_SetColor(TL,RED);
TL_SetSize(TL,2);
for cnt = 1 to Lobar[1]
{
TX1 = Text_New(sdate[cnt],stime[cnt],value1-PriceScale*2,"●");
Text_SetStyle(TX1,2,2);
Text_SetColor(TX1,RED);
Text_Delete(Tx22[cnt]);
}
TX2= Text_New(sdate[lobar[1]],stime[lobar[1]],L,"상승");
Text_SetColor(TX2,RED);
TL13 = TL_New(date11,time11,Value11,date12,time12,Value11);
TL14 = TL_New(date12,time12,Value11,date12,time12,Value12);
TL_SetColor(TL13,color);
TL_SetColor(TL14,color);
}
if var1 >= 0 and Trnd == dntr and Trnd != Trnd[1] then{
var1 = -1;
value1 = hival[1];
TL_SetColor(TL,BLUE);
TL_SetSize(TL,2);
for cnt = 1 to hibar[1]
{
TX3 = Text_New(sdate[cnt],stime[cnt],value1+PriceScale*2,"●");
Text_SetStyle(TX3,2,2);
Text_SetColor(TX3,BLUE);
Text_Delete(Tx11[cnt]);
}
TX4= Text_New(sdate[hibar[1]],stime[hibar[1]],H,"하락");
Text_SetColor(TX4,BLUE);
TL13 = TL_New(date11,time11,Value11,date12,time12,Value11);
TL14 = TL_New(date12,time12,Value11,date12,time12,Value12);
TL_SetColor(TL13,color);
TL_SetColor(TL14,color);
}
if var1 == 1 then
{
Tx11 = Text_New(sdate,stime,value1-PriceScale*2,"●");
Text_SetStyle(TX11,2,2);
Text_SetColor(TX11,RED);
}
if var1 == -1 then
{
Tx22 = Text_New(sdate,stime,value1+PriceScale*2,"●");
Text_SetStyle(TX22,2,2);
Text_SetColor(TX22,BLUE);
}
답변 1
예스스탁 예스스탁 답변
2019-06-26 14:37:20
안녕하세요
예스스탁입니다.
문의하신 내용은 가능하지 않습니다.
표시는 제거하고 굵기 조절가능하게만 변경해 드립니다.
Input:chRate(1),굵기(2);
Var:j(0),upTr(100),dnTr(-100),upRate(0),dnRate(0),trnd(0),TL(0),
date11(0),date12(0),time11(0),time12(0),TL1(0),
date21(0),date22(0),time21(0),time22(0),TL2(0),
date31(0),date32(0),time31(0),time32(0),TL3(0);
Array:hiVal[10](0),loVal[10](0),hiBar[10](0),loBar[10](0);
var : TL13(0),TL14(0),color(0),Tx1(0),Tx2(0),tx3(0),tx4(0),tx11(0),tx22(0),cnt(0);
upRate = 1 + (chRate/100);
dnRate = 1 - (chRate/100);
for j = 1 to 1 {
loBar[j] = loBar[j] + 1;
hiBar[j] = hiBar[j] + 1;
}
if hiVal[0] <= H or hiVal[0] == 0 then {
hiVal[0] = H;
hiBar[0] = 0;
}
else {
hiBar[0] = hiBar[0] + 1;
}
if loVal[0] >= L or loVal[0] == 0 then {
loVal[0] = L;
loBar[0] = 0;
}
else {
loBar[0] = loBar[0] + 1;
}
if trnd != dnTr && hiVal[0] > H && hiVal[0] * dnRate > L then trnd = dnTr;
else if trnd != upTr && loVal[0] < L && loVal[0] * upRate < H then trnd = upTr;
if trnd[1] == upTr and trnd == dnTr then {
for j = 8 downto 1 {
hiVal[j+1] = hiVal[j];
hiBar[j+1] = hiBar[j];
}
hiVal[1] = hiVal[0];
hiBar[1] = hiBar[0];
hiVal[0] = H;
hiBar[0] = 0;
loVal[0] = L;
loBar[0] = 0;
date11 = date[loBar[1]];
time11 = stime[loBar[1]];
Value11 = loVal[1];
date12 = date[hiBar[1]];
time12 = stime[hiBar[1]];
Value12 = hiVal[1];
}
if trnd[1] == dnTr and trnd == dnTr and
hiVal[1] < hiVal[0] and
hiVal[0] * dnRate > L then {
hiVal[1] = hiVal[0];
hiBar[1] = hiBar[0];
hiVal[0] = H;
hiBar[0] = 0;
loVal[0] = L;
loBar[0] = 0;
date12 = date[hiBar[1]];
time12 = stime[hiBar[1]];
Value12 = hiVal[1];
TL_SetEnd(TL1, date12,time12,Value12);
}
if trnd[1] == dnTr and trnd == upTr then {
for j = 8 downto 1 {
loVal[j+1] = loVal[j];
loBar[j+1] = loBar[j];
}
loVal[1] = loVal[0];
loBar[1] = loBar[0];
loVal[0] = L;
loBar[0] = 0;
hiVal[0] = H;
hiBar[0] = 0;
date11 = date[hiBar[1]];
time11 = stime[hiBar[1]];
Value11 = hiVal[1];
date12 = date[loBar[1]];
time12 = stime[loBar[1]];
Value12 = loVal[1];
}
if trnd[1] == upTr and trnd == upTr and
loVal[1] > loVal[0] and
loVal[0] * upRate < H then {
loVal[1] = loVal[0];
loBar[1] = loBar[0];
loVal[0] = L;
loBar[0] = 0;
hiVal[0] = H;
hiBar[0] = 0;
date12 = date[loBar[1]];
time12 = stime[loBar[1]];
Value12 = loVal[1];
TL_SetEnd(TL1, date12,time12,Value12);
}
if trnd == upTr and loVal[2] > loVal[1] then{
TL_SetColor(TL1,BLUE);
color = blue;
}
else if trnd == dnTr and hiVal[2] < hiVal[1] then{
TL_SetColor(TL1,RED);
color = RED;
}
else{
TL_SetColor(TL1,BLACK);
color = BLACK;
}
TL_SetSize(TL1,굵기);
TL_SetColor(TL2,RED);
TL_SetColor(TL3,BLUE);
if var1 <= 0 and Trnd == uptr and Trnd != Trnd[1] Then{
var1 = 1;
value1 = loval[1];
TL_SetColor(TL,RED);
TL_SetSize(TL,굵기);
TL13 = TL_New(date11,time11,Value11,date12,time12,Value11);
TL14 = TL_New(date12,time12,Value11,date12,time12,Value12);
TL_SetColor(TL13,color);
TL_SetColor(TL14,color);
TL_SetSize(TL13,굵기);
TL_SetSize(TL14,굵기);
}
if var1 >= 0 and Trnd == dntr and Trnd != Trnd[1] then{
var1 = -1;
value1 = hival[1];
TL_SetColor(TL,BLUE);
TL_SetSize(TL,굵기);
TL13 = TL_New(date11,time11,Value11,date12,time12,Value11);
TL14 = TL_New(date12,time12,Value11,date12,time12,Value12);
TL_SetColor(TL13,color);
TL_SetColor(TL14,color);
TL_SetSize(TL13,굵기);
TL_SetSize(TL14,굵기);
}
즐거운 하루되세요
> 브리아나금 님이 쓴 글입니다.
> 제목 : 지표 수정
> 아래의 지표식은 변곡점에서 위,아래을 나타내주는식입니다.
문제는 나타나는구간이 예를 들어 하방에서 상방로 바뀔때
계속 방으로 표시가 나오다가 밑을 찍으면 바로 상방표시가 나와주어야되는데
찍고 한참을 올라가다가 갑자기 하방에서 상방으로 표시가 나옵니다
밑을 찍자마자 실시간으로표시가 바뀌면 좋겠으나 안된다면 바로 바뀌진 않아도 바로표시가 바뀌수 있게 부탁드립니다
또한가지 부탁드릴것은 선굵기를 조절 할수있게 해주시고
●표시와 상방,하방이라는 글자는 없에주셨으면 합니다
Input:chRate(1);
Var:j(0),upTr(100),dnTr(-100),upRate(0),dnRate(0),trnd(0),TL(0),
date11(0),date12(0),time11(0),time12(0),TL1(0),
date21(0),date22(0),time21(0),time22(0),TL2(0),
date31(0),date32(0),time31(0),time32(0),TL3(0);
Array:hiVal[10](0),loVal[10](0),hiBar[10](0),loBar[10](0);
var : TL13(0),TL14(0),color(0),Tx1(0),Tx2(0),tx3(0),tx4(0),tx11(0),tx22(0),cnt(0);
upRate = 1 + (chRate/100);
dnRate = 1 - (chRate/100);
for j = 1 to 1 {
loBar[j] = loBar[j] + 1;
hiBar[j] = hiBar[j] + 1;
}
if hiVal[0] <= H or hiVal[0] == 0 then {
hiVal[0] = H;
hiBar[0] = 0;
}
else {
hiBar[0] = hiBar[0] + 1;
}
if loVal[0] >= L or loVal[0] == 0 then {
loVal[0] = L;
loBar[0] = 0;
}
else {
loBar[0] = loBar[0] + 1;
}
if trnd != dnTr && hiVal[0] > H && hiVal[0] * dnRate > L then trnd = dnTr;
else if trnd != upTr && loVal[0] < L && loVal[0] * upRate < H then trnd = upTr;
if trnd[1] == upTr and trnd == dnTr then {
for j = 8 downto 1 {
hiVal[j+1] = hiVal[j];
hiBar[j+1] = hiBar[j];
}
hiVal[1] = hiVal[0];
hiBar[1] = hiBar[0];
hiVal[0] = H;
hiBar[0] = 0;
loVal[0] = L;
loBar[0] = 0;
date11 = date[loBar[1]];
time11 = stime[loBar[1]];
Value11 = loVal[1];
date12 = date[hiBar[1]];
time12 = stime[hiBar[1]];
Value12 = hiVal[1];
}
if trnd[1] == dnTr and trnd == dnTr and
hiVal[1] < hiVal[0] and
hiVal[0] * dnRate > L then {
hiVal[1] = hiVal[0];
hiBar[1] = hiBar[0];
hiVal[0] = H;
hiBar[0] = 0;
loVal[0] = L;
loBar[0] = 0;
date12 = date[hiBar[1]];
time12 = stime[hiBar[1]];
Value12 = hiVal[1];
TL_SetEnd(TL1, date12,time12,Value12);
}
if trnd[1] == dnTr and trnd == upTr then {
for j = 8 downto 1 {
loVal[j+1] = loVal[j];
loBar[j+1] = loBar[j];
}
loVal[1] = loVal[0];
loBar[1] = loBar[0];
loVal[0] = L;
loBar[0] = 0;
hiVal[0] = H;
hiBar[0] = 0;
date11 = date[hiBar[1]];
time11 = stime[hiBar[1]];
Value11 = hiVal[1];
date12 = date[loBar[1]];
time12 = stime[loBar[1]];
Value12 = loVal[1];
}
if trnd[1] == upTr and trnd == upTr and
loVal[1] > loVal[0] and
loVal[0] * upRate < H then {
loVal[1] = loVal[0];
loBar[1] = loBar[0];
loVal[0] = L;
loBar[0] = 0;
hiVal[0] = H;
hiBar[0] = 0;
date12 = date[loBar[1]];
time12 = stime[loBar[1]];
Value12 = loVal[1];
TL_SetEnd(TL1, date12,time12,Value12);
}
if trnd == upTr and loVal[2] > loVal[1] then{
TL_SetColor(TL1,BLUE);
color = blue;
}
else if trnd == dnTr and hiVal[2] < hiVal[1] then{
TL_SetColor(TL1,RED);
color = RED;
}
else{
TL_SetColor(TL1,BLACK);
color = BLACK;
}
TL_SetSize(TL1,2);
TL_SetColor(TL2,RED);
TL_SetColor(TL3,BLUE);
if var1 <= 0 and Trnd == uptr and Trnd != Trnd[1] Then{
var1 = 1;
value1 = loval[1];
TL_SetColor(TL,RED);
TL_SetSize(TL,2);
for cnt = 1 to Lobar[1]
{
TX1 = Text_New(sdate[cnt],stime[cnt],value1-PriceScale*2,"●");
Text_SetStyle(TX1,2,2);
Text_SetColor(TX1,RED);
Text_Delete(Tx22[cnt]);
}
TX2= Text_New(sdate[lobar[1]],stime[lobar[1]],L,"상승");
Text_SetColor(TX2,RED);
TL13 = TL_New(date11,time11,Value11,date12,time12,Value11);
TL14 = TL_New(date12,time12,Value11,date12,time12,Value12);
TL_SetColor(TL13,color);
TL_SetColor(TL14,color);
}
if var1 >= 0 and Trnd == dntr and Trnd != Trnd[1] then{
var1 = -1;
value1 = hival[1];
TL_SetColor(TL,BLUE);
TL_SetSize(TL,2);
for cnt = 1 to hibar[1]
{
TX3 = Text_New(sdate[cnt],stime[cnt],value1+PriceScale*2,"●");
Text_SetStyle(TX3,2,2);
Text_SetColor(TX3,BLUE);
Text_Delete(Tx11[cnt]);
}
TX4= Text_New(sdate[hibar[1]],stime[hibar[1]],H,"하락");
Text_SetColor(TX4,BLUE);
TL13 = TL_New(date11,time11,Value11,date12,time12,Value11);
TL14 = TL_New(date12,time12,Value11,date12,time12,Value12);
TL_SetColor(TL13,color);
TL_SetColor(TL14,color);
}
if var1 == 1 then
{
Tx11 = Text_New(sdate,stime,value1-PriceScale*2,"●");
Text_SetStyle(TX11,2,2);
Text_SetColor(TX11,RED);
}
if var1 == -1 then
{
Tx22 = Text_New(sdate,stime,value1+PriceScale*2,"●");
Text_SetStyle(TX22,2,2);
Text_SetColor(TX22,BLUE);
}
다음글
이전글