커뮤니티

수식변경요청

프로필 이미지
알리섬
2024-10-10 15:14:51
797
글번호 184135
답변완료
안녕하세요. 늘 도움 감사드립니다. 다름이 아니라 아래의 수식에서 고가 와 저가 사이에 파일에 첨부한 내용처럼 비율을 넣고 싶습니다. input : af(0.02), maxAF(0.2),추세선두께(1),추세선색1(YELLOW),추세선색2(CYAN),연장선두께(2),연장선색(gray); input : 텍스트출력(1); var : T(0),HH(0),LL(0),HD(0),HT(0),LD(0),LT(0); var : HH1(0),LL1(0),HD1(0),HT1(0),LD1(0),LT1(0); var : TL1(0),TL2(0),cnt(0),count(0); var : TL3(0),TL4(0),TL5(0),TL6(0),TL7(0); var : Tx3(0),Tx4(0),Tx5(0),Tx6(0),Tx7(0); Var : TL11(0),TL22(0); var1 = CSar(af,maxAF); plot1(var1); if crossup(c,var1) Then { T = 1; if C > O Then { HH = H; HD = sdate; HT = stime; } Else { HH = 0; HD = 0; HT = 0; } HH1 = HH[1]; HD1 = HD[1]; HT1 = HT[1]; if LL > 0 Then { #TL1 = TL_new(LD[1],LT[1],LL[1],HD,HT,HH); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); TL_Delete(TL6); TL_Delete(TL7); TL3 = TL_new(HD[1],HT[1],HH[1],sdate,stime,HH[1]); TL4 = TL_new(HD[1],HT[1],(HH[1]+LL)/2,sdate,stime,(HH[1]+LL)/2); TL5 = TL_new(HD[1],HT[1],LL,sdate,stime,LL); TL6 = TL_new(HD[1],HT[1],HH[1]+(HH[1]-LL)/2,sdate,stime,HH[1]+(HH[1]-LL)/2); TL7 = TL_new(HD[1],HT[1],LL-(HH[1]-LL)/2,sdate,stime,LL-(HH[1]-LL)/2); //추세선 오른쪽 연장설정 TL_SetExtRight(TL3,true); TL_SetExtRight(TL4,true); TL_SetExtRight(TL5,true); TL_SetExtRight(TL6,true); TL_SetExtRight(TL7,true); Text_Delete(TX3); Text_Delete(TX4); Text_Delete(TX5); Text_Delete(TX6); Text_Delete(TX7); value3 = HH[1]; value4 = (HH[1]+LL)/2; value5 = LL; value6 = HH[1]+(HH[1]-LL)/2; value7 = LL-(HH[1]-LL)/2; TX3 = Text_New(sDate,sTime,value3,NumToStr(value3,2)); TX4 = Text_New(sDate,sTime,value4,NumToStr(value4,2)); TX5 = Text_New(sDate,sTime,value5,NumToStr(value5,2)); TX6 = Text_New(sDate,sTime,value6,NumToStr(value6,2)); TX7 = Text_New(sDate,sTime,value7,NumToStr(value7,2)); /* if 텍스트출력 == 1 then { Tx11 = Text_New(HD1,HT1,HH1,NumToStr((HH1-LL1)/PriceScale,0)+NewLine+NumToStr(HH1,2)); Text_SetStyle(tx11,2,1); Text_Delete(tx1); Tx1 = Text_New(HD,HT,HH,NumToStr((HH-LL[1])/PriceScale,0)+NewLine+NumToStr(HH,2)); Text_SetStyle(tx1,2,1); }*/ } #TL11 = TL_New(HD1,HT1,HH1,HD,HT,HH); } if CrossDown(c,var1) Then { T = -1; LL = L; LD = sdate; LT = stime; LL1 = LL[1]; LD1 = LD[1]; LT1 = LT[1]; if HH > 0 Then { #TL2 = TL_new(HD[1],HT[1],HH[1],LD,LT,LL); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); TL_Delete(TL6); TL_Delete(TL7); TL3 = TL_new(LD[1],LT[1],HH,sdate,stime,HH); TL4 = TL_new(LD[1],LT[1],(HH+LL[1])/2,sdate,stime,(HH+LL[1])/2); TL5 = TL_new(LD[1],LT[1],LL[1],sdate,stime,LL[1]); TL6 = TL_new(LD[1],LT[1],LL[1]-(HH-LL[1])/2,sdate,stime,LL[1]-(HH-LL[1])/2); TL7 = TL_new(LD[1],LT[1],HH[1]+(HH-LL[1])/2,sdate,stime,HH[1]+(HH-LL[1])/2); //추세선 오른쪽 연장설정 TL_SetExtRight(TL3,true); TL_SetExtRight(TL4,true); TL_SetExtRight(TL5,true); TL_SetExtRight(TL6,true); TL_SetExtRight(TL7,true); Text_Delete(TX3); Text_Delete(TX4); Text_Delete(TX5); Text_Delete(TX6); Text_Delete(TX7); value3 = HH; value4 = (HH+LL[1])/2; value5 = LL[1]; value6 = HH+(HH-LL[1])/2; value7 = LL[1]-(HH-LL[1])/2; TX3 = Text_New(sDate,sTime,Value3,NumToStr(Value3,2)); TX4 = Text_New(sDate,sTime,Value4,NumToStr(Value4,2)); TX5 = Text_New(sDate,sTime,Value5,NumToStr(Value5,2)); TX6 = Text_New(sDate,sTime,Value6,NumToStr(Value6,2)); TX7 = Text_New(sDate,sTime,Value7,NumToStr(Value7,2)); /* if 텍스트출력 == 1 then { Tx22 = Text_New(LD1,LT1,LL1,NumToStr((HH1-LL1)/PriceScale,0)+NewLine+NumToStr(LL1,2)); Text_SetStyle(tx22,2,0); Text_Delete(tx2); Tx2 = Text_New(LD,LT,LL,NumToStr((HH[1]-LL)/PriceScale,0)+NewLine+NumToStr(LL,2)); Text_SetStyle(tx2,2,0); }*/ } #TL22 = TL_New(LD1,LT1,LL1,LD,LT,LL); } if T == 1 then { if C < O and (HH == 0 or (HH > 0 and H > HH)) Then { HH = H; HD = sdate; HT = stime; TL_SetEnd(TL1,HD,HT,HH); TL_SetEnd(TL11,HD,HT,HH); /* if 텍스트출력 == 1 then { Text_Delete(tx1); Tx1 = Text_New(HD,HT,HH,NumToStr((HH-LL[1])/PriceScale,0)+NewLine+NumToStr(HH,2)); Text_SetStyle(tx1,2,1); }*/ } } if T == -1 then { if C > O and (LL == 0 or (LL > 0 and L < LL)) Then { LL = L; LD = sdate; LT = stime; TL_SetEnd(TL2,LD,LT,LL); TL_SetEnd(TL22,LD,LT,LL); /* if 텍스트출력 == 1 then { Text_Delete(tx2); Tx2 = Text_New(LD,LT,LL,NumToStr((HH[1]-LL)/PriceScale,0)+NewLine+NumToStr(LL,2)); Text_SetStyle(tx2,2,0); }*/ } } #추세선 두께, 색상 TL_SetSize(TL1,추세선두께); TL_SetSize(TL11,추세선두께); TL_SetSize(TL2,추세선두께); TL_SetSize(TL22,추세선두께); TL_SetColor(TL1,추세선색1); TL_SetColor(TL11,추세선색1); TL_SetColor(TL2,추세선색2); TL_SetColor(TL22,추세선색2); #연장선 두께, 색상 TL_SetSize(TL3,연장선두께); TL_SetSize(TL4,연장선두께); TL_SetSize(TL5,연장선두께); TL_SetSize(TL6,연장선두께); TL_SetSize(TL7,연장선두께); TL_SetColor(TL3,연장선색); TL_SetColor(TL4,연장선색); TL_SetColor(TL5,연장선색); TL_SetColor(TL6,연장선색); TL_SetColor(TL7,연장선색); Text_SetLocation(TX3,sDate,sTime,value3); Text_SetLocation(TX4,sDate,sTime,Value4); Text_SetLocation(TX5,sDate,sTime,Value5); Text_SetLocation(TX6,sDate,sTime,Value6); Text_SetLocation(TX7,sDate,sTime,Value7); Text_SetStyle(TX3,0,1); Text_SetStyle(TX4,0,1); Text_SetStyle(TX5,0,1); Text_SetStyle(TX6,0,1); Text_SetStyle(TX7,0,1);
지표
답변 3
프로필 이미지

예스스탁 예스스탁 답변

2024-10-10 14:46:31

안녕하세요 예스스탁입니다. input : af(0.02), maxAF(0.2),추세선두께(1),추세선색1(YELLOW),추세선색2(CYAN),연장선두께(2),연장선색(gray); input : Per1(0),Per2(21.00),Per3(30.00),Per4(38.20),Per5(50.00),Per6(62.00),Per7(70.00),Per8(79.00),Per9(100.00); input : 텍스트출력(1); var : T(0),HH(0),LL(0),HD(0),HT(0),LD(0),LT(0); var : HH1(0),LL1(0),HD1(0),HT1(0),LD1(0),LT1(0); var : cnt(0),count(0); var : TL1(0),TL2(0),TL3(0),TL4(0),TL5(0),TL6(0),TL7(0),TL8(0),TL9(0); var : Tx1(0),Tx2(0),Tx3(0),Tx4(0),Tx5(0),Tx6(0),Tx7(0),Tx8(0),Tx9(0); Var : TL11(0),TL22(0); var1 = CSar(af,maxAF); plot1(var1); if crossup(c,var1) Then { T = 1; if C > O Then { HH = H; HD = sdate; HT = stime; } Else { HH = 0; HD = 0; HT = 0; } HH1 = HH[1]; HD1 = HD[1]; HT1 = HT[1]; if LL > 0 Then { var1 = abs(HH-LL[1]); value1 = LL[1]+var1*(Per9/100); value2 = LL[1]+var1*(Per8/100); value3 = LL[1]+var1*(Per7/100); value4 = LL[1]+var1*(Per6/100); value5 = LL[1]+var1*(Per5/100); value6 = LL[1]+var1*(Per4/100); value7 = LL[1]+var1*(Per3/100); value8 = LL[1]+var1*(Per2/100); value9 = LL[1]+var1*(Per1/100); TL_Delete(TL1); TL_Delete(TL2); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); TL_Delete(TL6); TL_Delete(TL7); TL_Delete(TL8); TL_Delete(TL9); TL1 = TL_new(HD[1],HT[1],value1,sdate,stime,value1); TL2 = TL_new(HD[1],HT[1],value2,sdate,stime,value2); TL3 = TL_new(HD[1],HT[1],value3,sdate,stime,value3); TL4 = TL_new(HD[1],HT[1],value4,sdate,stime,value4); TL5 = TL_new(HD[1],HT[1],value5,sdate,stime,value5); TL6 = TL_new(HD[1],HT[1],value6,sdate,stime,value6); TL7 = TL_new(HD[1],HT[1],value7,sdate,stime,value7); TL8 = TL_new(HD[1],HT[1],value8,sdate,stime,value8); TL9 = TL_new(HD[1],HT[1],value9,sdate,stime,value9); //추세선 오른쪽 연장설정 TL_SetExtRight(TL1,true); TL_SetExtRight(TL2,true); TL_SetExtRight(TL3,true); TL_SetExtRight(TL4,true); TL_SetExtRight(TL5,true); TL_SetExtRight(TL6,true); TL_SetExtRight(TL7,true); TL_SetExtRight(TL8,true); TL_SetExtRight(TL9,true); Text_Delete(TX1); Text_Delete(TX2); Text_Delete(TX3); Text_Delete(TX4); Text_Delete(TX5); Text_Delete(TX6); Text_Delete(TX7); Text_Delete(TX8); Text_Delete(TX9); TX1 = Text_New(HD[1],HT[1],value1,NumToStr(Per9,2)+"%("+NumToStr(value1,2)+")"); TX2 = Text_New(HD[1],HT[1],value2,NumToStr(Per8,2)+"%("+NumToStr(value2,2)+")"); TX3 = Text_New(HD[1],HT[1],value3,NumToStr(Per7,2)+"%("+NumToStr(value3,2)+")"); TX4 = Text_New(HD[1],HT[1],value4,NumToStr(Per6,2)+"%("+NumToStr(value4,2)+")"); TX5 = Text_New(HD[1],HT[1],value5,NumToStr(Per5,2)+"%("+NumToStr(value5,2)+")"); TX6 = Text_New(HD[1],HT[1],value6,NumToStr(Per4,2)+"%("+NumToStr(value6,2)+")"); TX7 = Text_New(HD[1],HT[1],value7,NumToStr(Per3,2)+"%("+NumToStr(value7,2)+")"); TX8 = Text_New(HD[1],HT[1],value8,NumToStr(Per2,2)+"%("+NumToStr(value8,2)+")"); TX9 = Text_New(HD[1],HT[1],value9,NumToStr(Per1,2)+"%("+NumToStr(value9,2)+")"); Text_SetStyle(TX1,2,1); Text_SetStyle(TX2,2,1); Text_SetStyle(TX3,2,1); Text_SetStyle(TX4,2,1); Text_SetStyle(TX5,2,1); Text_SetStyle(TX6,2,1); Text_SetStyle(TX7,2,1); Text_SetStyle(TX8,2,1); Text_SetStyle(TX9,2,1); } } if CrossDown(c,var1) Then { T = -1; LL = L; LD = sdate; LT = stime; LL1 = LL[1]; LD1 = LD[1]; LT1 = LT[1]; if HH > 0 Then { var1 = abs(HH[1]-LL); value1 = LL+var1*(Per9/100); value2 = LL+var1*(Per8/100); value3 = LL+var1*(Per7/100); value4 = LL+var1*(Per6/100); value5 = LL+var1*(Per5/100); value6 = LL+var1*(Per4/100); value7 = LL+var1*(Per3/100); value8 = LL+var1*(Per2/100); value9 = LL+var1*(Per1/100); TL_Delete(TL1); TL_Delete(TL2); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); TL_Delete(TL6); TL_Delete(TL7); TL_Delete(TL8); TL_Delete(TL9); TL1 = TL_new(LD[1],LT[1],value1,sdate,stime,value1); TL2 = TL_new(LD[1],LT[1],value2,sdate,stime,value2); TL3 = TL_new(LD[1],LT[1],value3,sdate,stime,value3); TL4 = TL_new(LD[1],LT[1],value4,sdate,stime,value4); TL5 = TL_new(LD[1],LT[1],value5,sdate,stime,value5); TL6 = TL_new(LD[1],LT[1],value6,sdate,stime,value6); TL7 = TL_new(LD[1],LT[1],value7,sdate,stime,value7); TL8 = TL_new(LD[1],LT[1],value8,sdate,stime,value8); TL9 = TL_new(LD[1],LT[1],value9,sdate,stime,value9); //추세선 오른쪽 연장설정 TL_SetExtRight(TL1,true); TL_SetExtRight(TL2,true); TL_SetExtRight(TL3,true); TL_SetExtRight(TL4,true); TL_SetExtRight(TL5,true); TL_SetExtRight(TL6,true); TL_SetExtRight(TL7,true); TL_SetExtRight(TL8,true); TL_SetExtRight(TL9,true); Text_Delete(TX1); Text_Delete(TX2); Text_Delete(TX3); Text_Delete(TX4); Text_Delete(TX5); Text_Delete(TX6); Text_Delete(TX7); Text_Delete(TX8); Text_Delete(TX9); TX1 = Text_New(LD[1],LT[1],value1,NumToStr(Per9,2)+"%("+NumToStr(value1,2)+")"); TX2 = Text_New(LD[1],LT[1],value2,NumToStr(Per8,2)+"%("+NumToStr(value2,2)+")"); TX3 = Text_New(LD[1],LT[1],value3,NumToStr(Per7,2)+"%("+NumToStr(value3,2)+")"); TX4 = Text_New(LD[1],LT[1],value4,NumToStr(Per6,2)+"%("+NumToStr(value4,2)+")"); TX5 = Text_New(LD[1],LT[1],value5,NumToStr(Per5,2)+"%("+NumToStr(value5,2)+")"); TX6 = Text_New(LD[1],LT[1],value6,NumToStr(Per4,2)+"%("+NumToStr(value6,2)+")"); TX7 = Text_New(LD[1],LT[1],value7,NumToStr(Per3,2)+"%("+NumToStr(value7,2)+")"); TX8 = Text_New(LD[1],LT[1],value8,NumToStr(Per2,2)+"%("+NumToStr(value8,2)+")"); TX9 = Text_New(LD[1],LT[1],value9,NumToStr(Per1,2)+"%("+NumToStr(value9,2)+")"); Text_SetStyle(TX1,2,1); Text_SetStyle(TX2,2,1); Text_SetStyle(TX3,2,1); Text_SetStyle(TX4,2,1); Text_SetStyle(TX5,2,1); Text_SetStyle(TX6,2,1); Text_SetStyle(TX7,2,1); Text_SetStyle(TX8,2,1); Text_SetStyle(TX9,2,1); } } if T == 1 then { if C < O and (HH == 0 or (HH > 0 and H > HH)) Then { HH = H; HD = sdate; HT = stime; } } if T == -1 then { if C > O and (LL == 0 or (LL > 0 and L < LL)) Then { LL = L; LD = sdate; LT = stime; TL_SetEnd(TL2,LD,LT,LL); TL_SetEnd(TL22,LD,LT,LL); } } #연장선 두께, 색상 TL_SetSize(TL1,연장선두께); TL_SetSize(TL2,연장선두께); TL_SetSize(TL3,연장선두께); TL_SetSize(TL4,연장선두께); TL_SetSize(TL5,연장선두께); TL_SetSize(TL6,연장선두께); TL_SetSize(TL7,연장선두께); TL_SetSize(TL8,연장선두께); TL_SetSize(TL9,연장선두께); TL_SetColor(TL1,연장선색); TL_SetColor(TL2,연장선색); TL_SetColor(TL3,연장선색); TL_SetColor(TL4,연장선색); TL_SetColor(TL5,연장선색); TL_SetColor(TL6,연장선색); TL_SetColor(TL7,연장선색); TL_SetColor(TL8,연장선색); TL_SetColor(TL9,연장선색); 즐거운 하루되세요 > 알리섬 님이 쓴 글입니다. > 제목 : 수식변경요청 > 안녕하세요. 늘 도움 감사드립니다. 다름이 아니라 아래의 수식에서 고가 와 저가 사이에 파일에 첨부한 내용처럼 비율을 넣고 싶습니다. input : af(0.02), maxAF(0.2),추세선두께(1),추세선색1(YELLOW),추세선색2(CYAN),연장선두께(2),연장선색(gray); input : 텍스트출력(1); var : T(0),HH(0),LL(0),HD(0),HT(0),LD(0),LT(0); var : HH1(0),LL1(0),HD1(0),HT1(0),LD1(0),LT1(0); var : TL1(0),TL2(0),cnt(0),count(0); var : TL3(0),TL4(0),TL5(0),TL6(0),TL7(0); var : Tx3(0),Tx4(0),Tx5(0),Tx6(0),Tx7(0); Var : TL11(0),TL22(0); var1 = CSar(af,maxAF); plot1(var1); if crossup(c,var1) Then { T = 1; if C > O Then { HH = H; HD = sdate; HT = stime; } Else { HH = 0; HD = 0; HT = 0; } HH1 = HH[1]; HD1 = HD[1]; HT1 = HT[1]; if LL > 0 Then { #TL1 = TL_new(LD[1],LT[1],LL[1],HD,HT,HH); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); TL_Delete(TL6); TL_Delete(TL7); TL3 = TL_new(HD[1],HT[1],HH[1],sdate,stime,HH[1]); TL4 = TL_new(HD[1],HT[1],(HH[1]+LL)/2,sdate,stime,(HH[1]+LL)/2); TL5 = TL_new(HD[1],HT[1],LL,sdate,stime,LL); TL6 = TL_new(HD[1],HT[1],HH[1]+(HH[1]-LL)/2,sdate,stime,HH[1]+(HH[1]-LL)/2); TL7 = TL_new(HD[1],HT[1],LL-(HH[1]-LL)/2,sdate,stime,LL-(HH[1]-LL)/2); //추세선 오른쪽 연장설정 TL_SetExtRight(TL3,true); TL_SetExtRight(TL4,true); TL_SetExtRight(TL5,true); TL_SetExtRight(TL6,true); TL_SetExtRight(TL7,true); Text_Delete(TX3); Text_Delete(TX4); Text_Delete(TX5); Text_Delete(TX6); Text_Delete(TX7); value3 = HH[1]; value4 = (HH[1]+LL)/2; value5 = LL; value6 = HH[1]+(HH[1]-LL)/2; value7 = LL-(HH[1]-LL)/2; TX3 = Text_New(sDate,sTime,value3,NumToStr(value3,2)); TX4 = Text_New(sDate,sTime,value4,NumToStr(value4,2)); TX5 = Text_New(sDate,sTime,value5,NumToStr(value5,2)); TX6 = Text_New(sDate,sTime,value6,NumToStr(value6,2)); TX7 = Text_New(sDate,sTime,value7,NumToStr(value7,2)); /* if 텍스트출력 == 1 then { Tx11 = Text_New(HD1,HT1,HH1,NumToStr((HH1-LL1)/PriceScale,0)+NewLine+NumToStr(HH1,2)); Text_SetStyle(tx11,2,1); Text_Delete(tx1); Tx1 = Text_New(HD,HT,HH,NumToStr((HH-LL[1])/PriceScale,0)+NewLine+NumToStr(HH,2)); Text_SetStyle(tx1,2,1); }*/ } #TL11 = TL_New(HD1,HT1,HH1,HD,HT,HH); } if CrossDown(c,var1) Then { T = -1; LL = L; LD = sdate; LT = stime; LL1 = LL[1]; LD1 = LD[1]; LT1 = LT[1]; if HH > 0 Then { #TL2 = TL_new(HD[1],HT[1],HH[1],LD,LT,LL); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); TL_Delete(TL6); TL_Delete(TL7); TL3 = TL_new(LD[1],LT[1],HH,sdate,stime,HH); TL4 = TL_new(LD[1],LT[1],(HH+LL[1])/2,sdate,stime,(HH+LL[1])/2); TL5 = TL_new(LD[1],LT[1],LL[1],sdate,stime,LL[1]); TL6 = TL_new(LD[1],LT[1],LL[1]-(HH-LL[1])/2,sdate,stime,LL[1]-(HH-LL[1])/2); TL7 = TL_new(LD[1],LT[1],HH[1]+(HH-LL[1])/2,sdate,stime,HH[1]+(HH-LL[1])/2); //추세선 오른쪽 연장설정 TL_SetExtRight(TL3,true); TL_SetExtRight(TL4,true); TL_SetExtRight(TL5,true); TL_SetExtRight(TL6,true); TL_SetExtRight(TL7,true); Text_Delete(TX3); Text_Delete(TX4); Text_Delete(TX5); Text_Delete(TX6); Text_Delete(TX7); value3 = HH; value4 = (HH+LL[1])/2; value5 = LL[1]; value6 = HH+(HH-LL[1])/2; value7 = LL[1]-(HH-LL[1])/2; TX3 = Text_New(sDate,sTime,Value3,NumToStr(Value3,2)); TX4 = Text_New(sDate,sTime,Value4,NumToStr(Value4,2)); TX5 = Text_New(sDate,sTime,Value5,NumToStr(Value5,2)); TX6 = Text_New(sDate,sTime,Value6,NumToStr(Value6,2)); TX7 = Text_New(sDate,sTime,Value7,NumToStr(Value7,2)); /* if 텍스트출력 == 1 then { Tx22 = Text_New(LD1,LT1,LL1,NumToStr((HH1-LL1)/PriceScale,0)+NewLine+NumToStr(LL1,2)); Text_SetStyle(tx22,2,0); Text_Delete(tx2); Tx2 = Text_New(LD,LT,LL,NumToStr((HH[1]-LL)/PriceScale,0)+NewLine+NumToStr(LL,2)); Text_SetStyle(tx2,2,0); }*/ } #TL22 = TL_New(LD1,LT1,LL1,LD,LT,LL); } if T == 1 then { if C < O and (HH == 0 or (HH > 0 and H > HH)) Then { HH = H; HD = sdate; HT = stime; TL_SetEnd(TL1,HD,HT,HH); TL_SetEnd(TL11,HD,HT,HH); /* if 텍스트출력 == 1 then { Text_Delete(tx1); Tx1 = Text_New(HD,HT,HH,NumToStr((HH-LL[1])/PriceScale,0)+NewLine+NumToStr(HH,2)); Text_SetStyle(tx1,2,1); }*/ } } if T == -1 then { if C > O and (LL == 0 or (LL > 0 and L < LL)) Then { LL = L; LD = sdate; LT = stime; TL_SetEnd(TL2,LD,LT,LL); TL_SetEnd(TL22,LD,LT,LL); /* if 텍스트출력 == 1 then { Text_Delete(tx2); Tx2 = Text_New(LD,LT,LL,NumToStr((HH[1]-LL)/PriceScale,0)+NewLine+NumToStr(LL,2)); Text_SetStyle(tx2,2,0); }*/ } } #추세선 두께, 색상 TL_SetSize(TL1,추세선두께); TL_SetSize(TL11,추세선두께); TL_SetSize(TL2,추세선두께); TL_SetSize(TL22,추세선두께); TL_SetColor(TL1,추세선색1); TL_SetColor(TL11,추세선색1); TL_SetColor(TL2,추세선색2); TL_SetColor(TL22,추세선색2); #연장선 두께, 색상 TL_SetSize(TL3,연장선두께); TL_SetSize(TL4,연장선두께); TL_SetSize(TL5,연장선두께); TL_SetSize(TL6,연장선두께); TL_SetSize(TL7,연장선두께); TL_SetColor(TL3,연장선색); TL_SetColor(TL4,연장선색); TL_SetColor(TL5,연장선색); TL_SetColor(TL6,연장선색); TL_SetColor(TL7,연장선색); Text_SetLocation(TX3,sDate,sTime,value3); Text_SetLocation(TX4,sDate,sTime,Value4); Text_SetLocation(TX5,sDate,sTime,Value5); Text_SetLocation(TX6,sDate,sTime,Value6); Text_SetLocation(TX7,sDate,sTime,Value7); Text_SetStyle(TX3,0,1); Text_SetStyle(TX4,0,1); Text_SetStyle(TX5,0,1); Text_SetStyle(TX6,0,1); Text_SetStyle(TX7,0,1);
프로필 이미지

알리섬

2024-10-10 15:35:43

알리섬 님에 의해 삭제된 답변입니다.
프로필 이미지

예스스탁 예스스탁 답변

2024-10-10 16:14:36

안녕하세요 예스스탁입니다. input : af(0.02), maxAF(0.2),추세선두께(1),추세선색1(YELLOW),추세선색2(CYAN),연장선두께(2),연장선색(gray); input : Per1(0),Per2(21.00),Per3(30.00),Per4(38.20),Per5(50.00),Per6(62.00),Per7(70.00),Per8(79.00),Per9(100.00); input : 텍스트출력(1); var : T(0),HH(0),LL(0),HD(0),HT(0),LD(0),LT(0); var : HH1(0),LL1(0),HD1(0),HT1(0),LD1(0),LT1(0); var : cnt(0),count(0); var : TL1(0),TL2(0),TL3(0),TL4(0),TL5(0),TL6(0),TL7(0),TL8(0),TL9(0); var : Tx1(0),Tx2(0),Tx3(0),Tx4(0),Tx5(0),Tx6(0),Tx7(0),Tx8(0),Tx9(0); Var : TL11(0),TL22(0); var1 = CSar(af,maxAF); plot1(var1); if crossup(c,var1) Then { T = 1; if C > O Then { HH = H; HD = sdate; HT = stime; } Else { HH = 0; HD = 0; HT = 0; } HH1 = HH[1]; HD1 = HD[1]; HT1 = HT[1]; if LL[1] > 0 Then { var1 = abs(HH-LL[1]); value1 = LL[1]+var1*(Per9/100); value2 = LL[1]+var1*(Per8/100); value3 = LL[1]+var1*(Per7/100); value4 = LL[1]+var1*(Per6/100); value5 = LL[1]+var1*(Per5/100); value6 = LL[1]+var1*(Per4/100); value7 = LL[1]+var1*(Per3/100); value8 = LL[1]+var1*(Per2/100); value9 = LL[1]+var1*(Per1/100); TL_Delete(TL1); TL_Delete(TL2); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); TL_Delete(TL6); TL_Delete(TL7); TL_Delete(TL8); TL_Delete(TL9); TL1 = TL_new(HD[1],HT[1],value1,sdate,stime,value1); TL2 = TL_new(HD[1],HT[1],value2,sdate,stime,value2); TL3 = TL_new(HD[1],HT[1],value3,sdate,stime,value3); TL4 = TL_new(HD[1],HT[1],value4,sdate,stime,value4); TL5 = TL_new(HD[1],HT[1],value5,sdate,stime,value5); TL6 = TL_new(HD[1],HT[1],value6,sdate,stime,value6); TL7 = TL_new(HD[1],HT[1],value7,sdate,stime,value7); TL8 = TL_new(HD[1],HT[1],value8,sdate,stime,value8); TL9 = TL_new(HD[1],HT[1],value9,sdate,stime,value9); //추세선 오른쪽 연장설정 TL_SetExtRight(TL1,true); TL_SetExtRight(TL2,true); TL_SetExtRight(TL3,true); TL_SetExtRight(TL4,true); TL_SetExtRight(TL5,true); TL_SetExtRight(TL6,true); TL_SetExtRight(TL7,true); TL_SetExtRight(TL8,true); TL_SetExtRight(TL9,true); Text_Delete(TX1); Text_Delete(TX2); Text_Delete(TX3); Text_Delete(TX4); Text_Delete(TX5); Text_Delete(TX6); Text_Delete(TX7); Text_Delete(TX8); Text_Delete(TX9); TX1 = Text_New(HD[1],HT[1],value1,NumToStr(Per9,2)+"%("+NumToStr(value1,2)+")"); TX2 = Text_New(HD[1],HT[1],value2,NumToStr(Per8,2)+"%("+NumToStr(value2,2)+")"); TX3 = Text_New(HD[1],HT[1],value3,NumToStr(Per7,2)+"%("+NumToStr(value3,2)+")"); TX4 = Text_New(HD[1],HT[1],value4,NumToStr(Per6,2)+"%("+NumToStr(value4,2)+")"); TX5 = Text_New(HD[1],HT[1],value5,NumToStr(Per5,2)+"%("+NumToStr(value5,2)+")"); TX6 = Text_New(HD[1],HT[1],value6,NumToStr(Per4,2)+"%("+NumToStr(value6,2)+")"); TX7 = Text_New(HD[1],HT[1],value7,NumToStr(Per3,2)+"%("+NumToStr(value7,2)+")"); TX8 = Text_New(HD[1],HT[1],value8,NumToStr(Per2,2)+"%("+NumToStr(value8,2)+")"); TX9 = Text_New(HD[1],HT[1],value9,NumToStr(Per1,2)+"%("+NumToStr(value9,2)+")"); Text_SetStyle(TX1,2,1); Text_SetStyle(TX2,2,1); Text_SetStyle(TX3,2,1); Text_SetStyle(TX4,2,1); Text_SetStyle(TX5,2,1); Text_SetStyle(TX6,2,1); Text_SetStyle(TX7,2,1); Text_SetStyle(TX8,2,1); Text_SetStyle(TX9,2,1); } } if CrossDown(c,var1) Then { T = -1; LL = L; LD = sdate; LT = stime; LL1 = LL[1]; LD1 = LD[1]; LT1 = LT[1]; if HH > 0 Then { var1 = abs(HH[1]-LL); value1 = LL+var1*(Per9/100); value2 = LL+var1*(Per8/100); value3 = LL+var1*(Per7/100); value4 = LL+var1*(Per6/100); value5 = LL+var1*(Per5/100); value6 = LL+var1*(Per4/100); value7 = LL+var1*(Per3/100); value8 = LL+var1*(Per2/100); value9 = LL+var1*(Per1/100); TL_Delete(TL1); TL_Delete(TL2); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); TL_Delete(TL6); TL_Delete(TL7); TL_Delete(TL8); TL_Delete(TL9); TL1 = TL_new(LD[1],LT[1],value1,sdate,stime,value1); TL2 = TL_new(LD[1],LT[1],value2,sdate,stime,value2); TL3 = TL_new(LD[1],LT[1],value3,sdate,stime,value3); TL4 = TL_new(LD[1],LT[1],value4,sdate,stime,value4); TL5 = TL_new(LD[1],LT[1],value5,sdate,stime,value5); TL6 = TL_new(LD[1],LT[1],value6,sdate,stime,value6); TL7 = TL_new(LD[1],LT[1],value7,sdate,stime,value7); TL8 = TL_new(LD[1],LT[1],value8,sdate,stime,value8); TL9 = TL_new(LD[1],LT[1],value9,sdate,stime,value9); //추세선 오른쪽 연장설정 TL_SetExtRight(TL1,true); TL_SetExtRight(TL2,true); TL_SetExtRight(TL3,true); TL_SetExtRight(TL4,true); TL_SetExtRight(TL5,true); TL_SetExtRight(TL6,true); TL_SetExtRight(TL7,true); TL_SetExtRight(TL8,true); TL_SetExtRight(TL9,true); Text_Delete(TX1); Text_Delete(TX2); Text_Delete(TX3); Text_Delete(TX4); Text_Delete(TX5); Text_Delete(TX6); Text_Delete(TX7); Text_Delete(TX8); Text_Delete(TX9); TX1 = Text_New(LD[1],LT[1],value1,NumToStr(Per9,2)+"%("+NumToStr(value1,2)+")"); TX2 = Text_New(LD[1],LT[1],value2,NumToStr(Per8,2)+"%("+NumToStr(value2,2)+")"); TX3 = Text_New(LD[1],LT[1],value3,NumToStr(Per7,2)+"%("+NumToStr(value3,2)+")"); TX4 = Text_New(LD[1],LT[1],value4,NumToStr(Per6,2)+"%("+NumToStr(value4,2)+")"); TX5 = Text_New(LD[1],LT[1],value5,NumToStr(Per5,2)+"%("+NumToStr(value5,2)+")"); TX6 = Text_New(LD[1],LT[1],value6,NumToStr(Per4,2)+"%("+NumToStr(value6,2)+")"); TX7 = Text_New(LD[1],LT[1],value7,NumToStr(Per3,2)+"%("+NumToStr(value7,2)+")"); TX8 = Text_New(LD[1],LT[1],value8,NumToStr(Per2,2)+"%("+NumToStr(value8,2)+")"); TX9 = Text_New(LD[1],LT[1],value9,NumToStr(Per1,2)+"%("+NumToStr(value9,2)+")"); Text_SetStyle(TX1,2,1); Text_SetStyle(TX2,2,1); Text_SetStyle(TX3,2,1); Text_SetStyle(TX4,2,1); Text_SetStyle(TX5,2,1); Text_SetStyle(TX6,2,1); Text_SetStyle(TX7,2,1); Text_SetStyle(TX8,2,1); Text_SetStyle(TX9,2,1); } } if T == 1 then { if C < O and (HH == 0 or (HH > 0 and H > HH)) Then { HH = H; HD = sdate; HT = stime; } } if T == -1 then { if C > O and (LL == 0 or (LL > 0 and L < LL)) Then { LL = L; LD = sdate; LT = stime; } } #연장선 두께, 색상 TL_SetSize(TL1,연장선두께); TL_SetSize(TL2,연장선두께); TL_SetSize(TL3,연장선두께); TL_SetSize(TL4,연장선두께); TL_SetSize(TL5,연장선두께); TL_SetSize(TL6,연장선두께); TL_SetSize(TL7,연장선두께); TL_SetSize(TL8,연장선두께); TL_SetSize(TL9,연장선두께); TL_SetColor(TL1,연장선색); TL_SetColor(TL2,연장선색); TL_SetColor(TL3,연장선색); TL_SetColor(TL4,연장선색); TL_SetColor(TL5,연장선색); TL_SetColor(TL6,연장선색); TL_SetColor(TL7,연장선색); TL_SetColor(TL8,연장선색); TL_SetColor(TL9,연장선색); 즐거운 하루되세요 > 알리섬 님이 쓴 글입니다. > 제목 : Re : Re : 수식오류 수정 요청 > 도움 갑사드립니다 파일 그림처럼 수식에 오류가 있습니다. 수정부탁드립니다. > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 수식변경요청 > 안녕하세요 예스스탁입니다. input : af(0.02), maxAF(0.2),추세선두께(1),추세선색1(YELLOW),추세선색2(CYAN),연장선두께(2),연장선색(gray); input : Per1(0),Per2(21.00),Per3(30.00),Per4(38.20),Per5(50.00),Per6(62.00),Per7(70.00),Per8(79.00),Per9(100.00); input : 텍스트출력(1); var : T(0),HH(0),LL(0),HD(0),HT(0),LD(0),LT(0); var : HH1(0),LL1(0),HD1(0),HT1(0),LD1(0),LT1(0); var : cnt(0),count(0); var : TL1(0),TL2(0),TL3(0),TL4(0),TL5(0),TL6(0),TL7(0),TL8(0),TL9(0); var : Tx1(0),Tx2(0),Tx3(0),Tx4(0),Tx5(0),Tx6(0),Tx7(0),Tx8(0),Tx9(0); Var : TL11(0),TL22(0); var1 = CSar(af,maxAF); plot1(var1); if crossup(c,var1) Then { T = 1; if C > O Then { HH = H; HD = sdate; HT = stime; } Else { HH = 0; HD = 0; HT = 0; } HH1 = HH[1]; HD1 = HD[1]; HT1 = HT[1]; if LL > 0 Then { var1 = abs(HH-LL[1]); value1 = LL[1]+var1*(Per9/100); value2 = LL[1]+var1*(Per8/100); value3 = LL[1]+var1*(Per7/100); value4 = LL[1]+var1*(Per6/100); value5 = LL[1]+var1*(Per5/100); value6 = LL[1]+var1*(Per4/100); value7 = LL[1]+var1*(Per3/100); value8 = LL[1]+var1*(Per2/100); value9 = LL[1]+var1*(Per1/100); TL_Delete(TL1); TL_Delete(TL2); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); TL_Delete(TL6); TL_Delete(TL7); TL_Delete(TL8); TL_Delete(TL9); TL1 = TL_new(HD[1],HT[1],value1,sdate,stime,value1); TL2 = TL_new(HD[1],HT[1],value2,sdate,stime,value2); TL3 = TL_new(HD[1],HT[1],value3,sdate,stime,value3); TL4 = TL_new(HD[1],HT[1],value4,sdate,stime,value4); TL5 = TL_new(HD[1],HT[1],value5,sdate,stime,value5); TL6 = TL_new(HD[1],HT[1],value6,sdate,stime,value6); TL7 = TL_new(HD[1],HT[1],value7,sdate,stime,value7); TL8 = TL_new(HD[1],HT[1],value8,sdate,stime,value8); TL9 = TL_new(HD[1],HT[1],value9,sdate,stime,value9); //추세선 오른쪽 연장설정 TL_SetExtRight(TL1,true); TL_SetExtRight(TL2,true); TL_SetExtRight(TL3,true); TL_SetExtRight(TL4,true); TL_SetExtRight(TL5,true); TL_SetExtRight(TL6,true); TL_SetExtRight(TL7,true); TL_SetExtRight(TL8,true); TL_SetExtRight(TL9,true); Text_Delete(TX1); Text_Delete(TX2); Text_Delete(TX3); Text_Delete(TX4); Text_Delete(TX5); Text_Delete(TX6); Text_Delete(TX7); Text_Delete(TX8); Text_Delete(TX9); TX1 = Text_New(HD[1],HT[1],value1,NumToStr(Per9,2)+"%("+NumToStr(value1,2)+")"); TX2 = Text_New(HD[1],HT[1],value2,NumToStr(Per8,2)+"%("+NumToStr(value2,2)+")"); TX3 = Text_New(HD[1],HT[1],value3,NumToStr(Per7,2)+"%("+NumToStr(value3,2)+")"); TX4 = Text_New(HD[1],HT[1],value4,NumToStr(Per6,2)+"%("+NumToStr(value4,2)+")"); TX5 = Text_New(HD[1],HT[1],value5,NumToStr(Per5,2)+"%("+NumToStr(value5,2)+")"); TX6 = Text_New(HD[1],HT[1],value6,NumToStr(Per4,2)+"%("+NumToStr(value6,2)+")"); TX7 = Text_New(HD[1],HT[1],value7,NumToStr(Per3,2)+"%("+NumToStr(value7,2)+")"); TX8 = Text_New(HD[1],HT[1],value8,NumToStr(Per2,2)+"%("+NumToStr(value8,2)+")"); TX9 = Text_New(HD[1],HT[1],value9,NumToStr(Per1,2)+"%("+NumToStr(value9,2)+")"); Text_SetStyle(TX1,2,1); Text_SetStyle(TX2,2,1); Text_SetStyle(TX3,2,1); Text_SetStyle(TX4,2,1); Text_SetStyle(TX5,2,1); Text_SetStyle(TX6,2,1); Text_SetStyle(TX7,2,1); Text_SetStyle(TX8,2,1); Text_SetStyle(TX9,2,1); } } if CrossDown(c,var1) Then { T = -1; LL = L; LD = sdate; LT = stime; LL1 = LL[1]; LD1 = LD[1]; LT1 = LT[1]; if HH > 0 Then { var1 = abs(HH[1]-LL); value1 = LL+var1*(Per9/100); value2 = LL+var1*(Per8/100); value3 = LL+var1*(Per7/100); value4 = LL+var1*(Per6/100); value5 = LL+var1*(Per5/100); value6 = LL+var1*(Per4/100); value7 = LL+var1*(Per3/100); value8 = LL+var1*(Per2/100); value9 = LL+var1*(Per1/100); TL_Delete(TL1); TL_Delete(TL2); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); TL_Delete(TL6); TL_Delete(TL7); TL_Delete(TL8); TL_Delete(TL9); TL1 = TL_new(LD[1],LT[1],value1,sdate,stime,value1); TL2 = TL_new(LD[1],LT[1],value2,sdate,stime,value2); TL3 = TL_new(LD[1],LT[1],value3,sdate,stime,value3); TL4 = TL_new(LD[1],LT[1],value4,sdate,stime,value4); TL5 = TL_new(LD[1],LT[1],value5,sdate,stime,value5); TL6 = TL_new(LD[1],LT[1],value6,sdate,stime,value6); TL7 = TL_new(LD[1],LT[1],value7,sdate,stime,value7); TL8 = TL_new(LD[1],LT[1],value8,sdate,stime,value8); TL9 = TL_new(LD[1],LT[1],value9,sdate,stime,value9); //추세선 오른쪽 연장설정 TL_SetExtRight(TL1,true); TL_SetExtRight(TL2,true); TL_SetExtRight(TL3,true); TL_SetExtRight(TL4,true); TL_SetExtRight(TL5,true); TL_SetExtRight(TL6,true); TL_SetExtRight(TL7,true); TL_SetExtRight(TL8,true); TL_SetExtRight(TL9,true); Text_Delete(TX1); Text_Delete(TX2); Text_Delete(TX3); Text_Delete(TX4); Text_Delete(TX5); Text_Delete(TX6); Text_Delete(TX7); Text_Delete(TX8); Text_Delete(TX9); TX1 = Text_New(LD[1],LT[1],value1,NumToStr(Per9,2)+"%("+NumToStr(value1,2)+")"); TX2 = Text_New(LD[1],LT[1],value2,NumToStr(Per8,2)+"%("+NumToStr(value2,2)+")"); TX3 = Text_New(LD[1],LT[1],value3,NumToStr(Per7,2)+"%("+NumToStr(value3,2)+")"); TX4 = Text_New(LD[1],LT[1],value4,NumToStr(Per6,2)+"%("+NumToStr(value4,2)+")"); TX5 = Text_New(LD[1],LT[1],value5,NumToStr(Per5,2)+"%("+NumToStr(value5,2)+")"); TX6 = Text_New(LD[1],LT[1],value6,NumToStr(Per4,2)+"%("+NumToStr(value6,2)+")"); TX7 = Text_New(LD[1],LT[1],value7,NumToStr(Per3,2)+"%("+NumToStr(value7,2)+")"); TX8 = Text_New(LD[1],LT[1],value8,NumToStr(Per2,2)+"%("+NumToStr(value8,2)+")"); TX9 = Text_New(LD[1],LT[1],value9,NumToStr(Per1,2)+"%("+NumToStr(value9,2)+")"); Text_SetStyle(TX1,2,1); Text_SetStyle(TX2,2,1); Text_SetStyle(TX3,2,1); Text_SetStyle(TX4,2,1); Text_SetStyle(TX5,2,1); Text_SetStyle(TX6,2,1); Text_SetStyle(TX7,2,1); Text_SetStyle(TX8,2,1); Text_SetStyle(TX9,2,1); } } if T == 1 then { if C < O and (HH == 0 or (HH > 0 and H > HH)) Then { HH = H; HD = sdate; HT = stime; } } if T == -1 then { if C > O and (LL == 0 or (LL > 0 and L < LL)) Then { LL = L; LD = sdate; LT = stime; TL_SetEnd(TL2,LD,LT,LL); TL_SetEnd(TL22,LD,LT,LL); } } #연장선 두께, 색상 TL_SetSize(TL1,연장선두께); TL_SetSize(TL2,연장선두께); TL_SetSize(TL3,연장선두께); TL_SetSize(TL4,연장선두께); TL_SetSize(TL5,연장선두께); TL_SetSize(TL6,연장선두께); TL_SetSize(TL7,연장선두께); TL_SetSize(TL8,연장선두께); TL_SetSize(TL9,연장선두께); TL_SetColor(TL1,연장선색); TL_SetColor(TL2,연장선색); TL_SetColor(TL3,연장선색); TL_SetColor(TL4,연장선색); TL_SetColor(TL5,연장선색); TL_SetColor(TL6,연장선색); TL_SetColor(TL7,연장선색); TL_SetColor(TL8,연장선색); TL_SetColor(TL9,연장선색); 즐거운 하루되세요 > 알리섬 님이 쓴 글입니다. > 제목 : 수식변경요청 > 안녕하세요. 늘 도움 감사드립니다. 다름이 아니라 아래의 수식에서 고가 와 저가 사이에 파일에 첨부한 내용처럼 비율을 넣고 싶습니다. input : af(0.02), maxAF(0.2),추세선두께(1),추세선색1(YELLOW),추세선색2(CYAN),연장선두께(2),연장선색(gray); input : 텍스트출력(1); var : T(0),HH(0),LL(0),HD(0),HT(0),LD(0),LT(0); var : HH1(0),LL1(0),HD1(0),HT1(0),LD1(0),LT1(0); var : TL1(0),TL2(0),cnt(0),count(0); var : TL3(0),TL4(0),TL5(0),TL6(0),TL7(0); var : Tx3(0),Tx4(0),Tx5(0),Tx6(0),Tx7(0); Var : TL11(0),TL22(0); var1 = CSar(af,maxAF); plot1(var1); if crossup(c,var1) Then { T = 1; if C > O Then { HH = H; HD = sdate; HT = stime; } Else { HH = 0; HD = 0; HT = 0; } HH1 = HH[1]; HD1 = HD[1]; HT1 = HT[1]; if LL > 0 Then { #TL1 = TL_new(LD[1],LT[1],LL[1],HD,HT,HH); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); TL_Delete(TL6); TL_Delete(TL7); TL3 = TL_new(HD[1],HT[1],HH[1],sdate,stime,HH[1]); TL4 = TL_new(HD[1],HT[1],(HH[1]+LL)/2,sdate,stime,(HH[1]+LL)/2); TL5 = TL_new(HD[1],HT[1],LL,sdate,stime,LL); TL6 = TL_new(HD[1],HT[1],HH[1]+(HH[1]-LL)/2,sdate,stime,HH[1]+(HH[1]-LL)/2); TL7 = TL_new(HD[1],HT[1],LL-(HH[1]-LL)/2,sdate,stime,LL-(HH[1]-LL)/2); //추세선 오른쪽 연장설정 TL_SetExtRight(TL3,true); TL_SetExtRight(TL4,true); TL_SetExtRight(TL5,true); TL_SetExtRight(TL6,true); TL_SetExtRight(TL7,true); Text_Delete(TX3); Text_Delete(TX4); Text_Delete(TX5); Text_Delete(TX6); Text_Delete(TX7); value3 = HH[1]; value4 = (HH[1]+LL)/2; value5 = LL; value6 = HH[1]+(HH[1]-LL)/2; value7 = LL-(HH[1]-LL)/2; TX3 = Text_New(sDate,sTime,value3,NumToStr(value3,2)); TX4 = Text_New(sDate,sTime,value4,NumToStr(value4,2)); TX5 = Text_New(sDate,sTime,value5,NumToStr(value5,2)); TX6 = Text_New(sDate,sTime,value6,NumToStr(value6,2)); TX7 = Text_New(sDate,sTime,value7,NumToStr(value7,2)); /* if 텍스트출력 == 1 then { Tx11 = Text_New(HD1,HT1,HH1,NumToStr((HH1-LL1)/PriceScale,0)+NewLine+NumToStr(HH1,2)); Text_SetStyle(tx11,2,1); Text_Delete(tx1); Tx1 = Text_New(HD,HT,HH,NumToStr((HH-LL[1])/PriceScale,0)+NewLine+NumToStr(HH,2)); Text_SetStyle(tx1,2,1); }*/ } #TL11 = TL_New(HD1,HT1,HH1,HD,HT,HH); } if CrossDown(c,var1) Then { T = -1; LL = L; LD = sdate; LT = stime; LL1 = LL[1]; LD1 = LD[1]; LT1 = LT[1]; if HH > 0 Then { #TL2 = TL_new(HD[1],HT[1],HH[1],LD,LT,LL); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); TL_Delete(TL6); TL_Delete(TL7); TL3 = TL_new(LD[1],LT[1],HH,sdate,stime,HH); TL4 = TL_new(LD[1],LT[1],(HH+LL[1])/2,sdate,stime,(HH+LL[1])/2); TL5 = TL_new(LD[1],LT[1],LL[1],sdate,stime,LL[1]); TL6 = TL_new(LD[1],LT[1],LL[1]-(HH-LL[1])/2,sdate,stime,LL[1]-(HH-LL[1])/2); TL7 = TL_new(LD[1],LT[1],HH[1]+(HH-LL[1])/2,sdate,stime,HH[1]+(HH-LL[1])/2); //추세선 오른쪽 연장설정 TL_SetExtRight(TL3,true); TL_SetExtRight(TL4,true); TL_SetExtRight(TL5,true); TL_SetExtRight(TL6,true); TL_SetExtRight(TL7,true); Text_Delete(TX3); Text_Delete(TX4); Text_Delete(TX5); Text_Delete(TX6); Text_Delete(TX7); value3 = HH; value4 = (HH+LL[1])/2; value5 = LL[1]; value6 = HH+(HH-LL[1])/2; value7 = LL[1]-(HH-LL[1])/2; TX3 = Text_New(sDate,sTime,Value3,NumToStr(Value3,2)); TX4 = Text_New(sDate,sTime,Value4,NumToStr(Value4,2)); TX5 = Text_New(sDate,sTime,Value5,NumToStr(Value5,2)); TX6 = Text_New(sDate,sTime,Value6,NumToStr(Value6,2)); TX7 = Text_New(sDate,sTime,Value7,NumToStr(Value7,2)); /* if 텍스트출력 == 1 then { Tx22 = Text_New(LD1,LT1,LL1,NumToStr((HH1-LL1)/PriceScale,0)+NewLine+NumToStr(LL1,2)); Text_SetStyle(tx22,2,0); Text_Delete(tx2); Tx2 = Text_New(LD,LT,LL,NumToStr((HH[1]-LL)/PriceScale,0)+NewLine+NumToStr(LL,2)); Text_SetStyle(tx2,2,0); }*/ } #TL22 = TL_New(LD1,LT1,LL1,LD,LT,LL); } if T == 1 then { if C < O and (HH == 0 or (HH > 0 and H > HH)) Then { HH = H; HD = sdate; HT = stime; TL_SetEnd(TL1,HD,HT,HH); TL_SetEnd(TL11,HD,HT,HH); /* if 텍스트출력 == 1 then { Text_Delete(tx1); Tx1 = Text_New(HD,HT,HH,NumToStr((HH-LL[1])/PriceScale,0)+NewLine+NumToStr(HH,2)); Text_SetStyle(tx1,2,1); }*/ } } if T == -1 then { if C > O and (LL == 0 or (LL > 0 and L < LL)) Then { LL = L; LD = sdate; LT = stime; TL_SetEnd(TL2,LD,LT,LL); TL_SetEnd(TL22,LD,LT,LL); /* if 텍스트출력 == 1 then { Text_Delete(tx2); Tx2 = Text_New(LD,LT,LL,NumToStr((HH[1]-LL)/PriceScale,0)+NewLine+NumToStr(LL,2)); Text_SetStyle(tx2,2,0); }*/ } } #추세선 두께, 색상 TL_SetSize(TL1,추세선두께); TL_SetSize(TL11,추세선두께); TL_SetSize(TL2,추세선두께); TL_SetSize(TL22,추세선두께); TL_SetColor(TL1,추세선색1); TL_SetColor(TL11,추세선색1); TL_SetColor(TL2,추세선색2); TL_SetColor(TL22,추세선색2); #연장선 두께, 색상 TL_SetSize(TL3,연장선두께); TL_SetSize(TL4,연장선두께); TL_SetSize(TL5,연장선두께); TL_SetSize(TL6,연장선두께); TL_SetSize(TL7,연장선두께); TL_SetColor(TL3,연장선색); TL_SetColor(TL4,연장선색); TL_SetColor(TL5,연장선색); TL_SetColor(TL6,연장선색); TL_SetColor(TL7,연장선색); Text_SetLocation(TX3,sDate,sTime,value3); Text_SetLocation(TX4,sDate,sTime,Value4); Text_SetLocation(TX5,sDate,sTime,Value5); Text_SetLocation(TX6,sDate,sTime,Value6); Text_SetLocation(TX7,sDate,sTime,Value7); Text_SetStyle(TX3,0,1); Text_SetStyle(TX4,0,1); Text_SetStyle(TX5,0,1); Text_SetStyle(TX6,0,1); Text_SetStyle(TX7,0,1);