커뮤니티

문의 드립니다!

프로필 이미지
유로파54
2024-09-30 13:56:22
809
글번호 183858
답변완료
안녕하세요! 아래수식에서 발생되는 가로선을 당일의 선이 아닌 전일에 발생된 선이 당일챠트 화면에 나타나도록 수정 부탁드립니다 * 참고로 이 선의 두께를 좀더 두껍게한다거나 다른 형태의 선으로 표시되게 할수는 없을까요? 감사합니다!! -------------------------------------------------------- input : N(30),색1(black),색2(black),굵기1(5),굵기2(5),형태1(1),형태2(1); input : 수직선색상(Black),수직선굵기(2); var : cnt(0),HH(0),LL(0),HTL1(0),LTL1(0),H1(0),L1(0),TL(0),vtl(0); Array : HTL[100](0),LTL[100](0),HV[100](0),LV[100](0); if Sdate != sDate[1] Then { value1 = sDate; Value2 = value1[1]; Value3 = sTime; Value4 = Value3[1]; For cnt = 1 to N { HV[cnt] = 0; LV[cnt] = 0; TL_Delete(HTL[cnt]); TL_Delete(LTL[cnt]); var1 = max(DayOpen(cnt),DayClose(cnt)); var2 = min(DayOpen(cnt),DayClose(cnt)); if cnt == 1 Then { HTL[cnt] = TL_New(sDate,sTime,var1,NextBarSdate,NextBarStime,var1); HV[cnt] = var1; TL_SetColor(HTL[cnt],색1); TL_SetSize(HTL[cnt],굵기1); TL_SetStyle(HTL[cnt],형태1); TL_SetExtRight(HTL[cnt],true); TL_SetDrawMode(HTL[cnt],0); HH = var1; LTL[cnt] = TL_New(sDate,sTime,var2,NextBarSdate,NextBarStime,var2); LV[cnt] = var2; TL_SetColor(LTL[cnt],색2); TL_SetSize(LTL[cnt],굵기2); TL_SetStyle(LTL[cnt],형태2); TL_SetExtRight(LTL[cnt],true); TL_SetDrawMode(LTL[cnt],0); LL = var2; } Else { if abs(var1-DayOpen(0)) < 10 and (var1 > HH or var1 < LL) Then { HTL[cnt] = TL_New(sDate,sTime,var1,NextBarSdate,NextBarStime,var1); HV[cnt] = var1; TL_SetColor(HTL[cnt],색1); TL_SetSize(HTL[cnt],굵기1); TL_SetStyle(HTL[cnt],형태1); TL_SetExtRight(HTL[cnt],true); TL_SetDrawMode(HTL[cnt],0); } if abs(Var2-DayOpen(0)) < 10 and (Var2 > HH or Var2 < LL) Then { LTL[cnt] = TL_New(sDate,sTime,Var2,NextBarSdate,NextBarStime,Var2); LV[cnt] = var2; TL_SetColor(LTL[cnt],색2); TL_SetSize(LTL[cnt],굵기2); TL_SetStyle(LTL[cnt],형태2); TL_SetExtRight(LTL[cnt],true); TL_SetDrawMode(LTL[cnt],0); } if var1 > HH and abs(var1-DayOpen(0)) < 10 Then HH = DayHigh(cnt); if Var2 < LL and abs(Var2-DayOpen(0)) < 10 Then LL = DayLow(cnt); } var3 = max(DayOpen(cnt+1),DayClose(cnt+1)); var4 = min(DayOpen(cnt+1),DayClose(cnt+1)); if cnt == 1 Then { HTL1 = TL_New(Value2,value4,var3,sDate[1],sTime[1],var3); TL_SetColor(HTL1,색1); TL_SetSize(HTL1,굵기1); TL_SetStyle(HTL1,형태1); TL_SetDrawMode(HTL1,0); H1 = var3; LTL1 = TL_New(Value2,Value3,var4,sDate[1],sTime[1],var4); TL_SetColor(LTL1,색2); TL_SetSize(LTL1,굵기2); TL_SetStyle(LTL1,형태2); TL_SetDrawMode(LTL1,0); L1 = var4; } Else { if abs(var3-DayOpen(1)) < 10 and (var3 > H1 or var3 < L1) Then { HTL1 = TL_New(Value2,value4,var3,sDate[1],sTime[1],var3); TL_SetColor(HTL1,색1); TL_SetSize(HTL1,굵기1); TL_SetStyle(HTL1,형태1); TL_SetDrawMode(HTL1,0); } if abs(Var4-DayOpen(1)) < 10 and (Var4 > H1 or Var4 < L1) Then { LTL1 = TL_New(Value2,Value3,var4,sDate[1],sTime[1],var4); TL_SetColor(LTL1,색2); TL_SetSize(LTL1,굵기2); TL_SetStyle(LTL1,형태2); TL_SetDrawMode(LTL1,0); } if var3 > H1 and abs(var3-DayOpen(1)) < 10 Then H1 = Var3; if Var2 < L1 and abs(Var2-DayOpen(0)) < 10 Then L1 = Var4; } } } For cnt = 1 to N { if HV[cnt] > 0 and ((H[0] >= HV[cnt]-PriceScale*3 and H[1] < HV[cnt]-PriceScale*3) or (L[0] <= HV[cnt]+PriceScale*3 and L[1] > HV[cnt]+PriceScale*3) or (H[0] >= LV[cnt]-PriceScale*3 and H[1] < LV[cnt]-PriceScale*3) or (L[0] <= LV[cnt]+PriceScale*3 and L[1] > LV[cnt]+PriceScale*3)) Then { vtl = TL_New(sDate,sTime,0,sDate,sTime,999999999); TL_SetColor(vtl,수직선색상); TL_SetSize(vTL,수직선굵기); TL_SetDrawMode(VTL,0); PlaySound("C:₩예스트레이더(X64)₩data₩Sound₩.wav"); } }
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2024-09-30 17:16:07

안녕하세요 예스스탁입니다. 기존수식에 이미 선의 형태나 굵기가 지정되게 되어 있습니다. 랭귀지 도움말에서 TL_SetSize함수, TL_SetStyle함수 설명 참고하시기 바랍니다. input : N(30),색1(black),색2(black),굵기1(5),굵기2(5),형태1(1),형태2(1); input : 수직선색상(Black),수직선굵기(2); var : cnt(0),HH(0),LL(0),HTL1(0),LTL1(0),H1(0),L1(0),TL(0),vtl(0); Array : HTL[100](0),LTL[100](0),HV[100](0),LV[100](0); if NextBarSdate != sDate Then { value1 = sDate; Value2 = value1[1]; Value3 = sTime; Value4 = Value3[1]; For cnt = 1 to N { HV[cnt] = 0; LV[cnt] = 0; TL_Delete(HTL[cnt]); TL_Delete(LTL[cnt]); var1 = max(DayOpen(cnt),DayClose(cnt)); var2 = min(DayOpen(cnt),DayClose(cnt)); if cnt == 1 Then { HTL[cnt] = TL_New(sDate,sTime,var1,NextBarSdate,NextBarStime,var1); HV[cnt] = var1; TL_SetColor(HTL[cnt],색1); TL_SetSize(HTL[cnt],굵기1); TL_SetStyle(HTL[cnt],형태1); TL_SetExtRight(HTL[cnt],true); TL_SetDrawMode(HTL[cnt],0); HH = var1; LTL[cnt] = TL_New(sDate,sTime,var2,NextBarSdate,NextBarStime,var2); LV[cnt] = var2; TL_SetColor(LTL[cnt],색2); TL_SetSize(LTL[cnt],굵기2); TL_SetStyle(LTL[cnt],형태2); TL_SetExtRight(LTL[cnt],true); TL_SetDrawMode(LTL[cnt],0); LL = var2; } Else { if abs(var1-DayOpen(0)) < 10 and (var1 > HH or var1 < LL) Then { HTL[cnt] = TL_New(sDate,sTime,var1,NextBarSdate,NextBarStime,var1); HV[cnt] = var1; TL_SetColor(HTL[cnt],색1); TL_SetSize(HTL[cnt],굵기1); TL_SetStyle(HTL[cnt],형태1); TL_SetExtRight(HTL[cnt],true); TL_SetDrawMode(HTL[cnt],0); } if abs(Var2-DayOpen(0)) < 10 and (Var2 > HH or Var2 < LL) Then { LTL[cnt] = TL_New(sDate,sTime,Var2,NextBarSdate,NextBarStime,Var2); LV[cnt] = var2; TL_SetColor(LTL[cnt],색2); TL_SetSize(LTL[cnt],굵기2); TL_SetStyle(LTL[cnt],형태2); TL_SetExtRight(LTL[cnt],true); TL_SetDrawMode(LTL[cnt],0); } if var1 > HH and abs(var1-DayOpen(0)) < 10 Then HH = DayHigh(cnt); if Var2 < LL and abs(Var2-DayOpen(0)) < 10 Then LL = DayLow(cnt); } var3 = max(DayOpen(cnt+1),DayClose(cnt+1)); var4 = min(DayOpen(cnt+1),DayClose(cnt+1)); if cnt == 1 Then { HTL1 = TL_New(Value2,value4,var3,sDate[1],sTime[1],var3); TL_SetColor(HTL1,색1); TL_SetSize(HTL1,굵기1); TL_SetStyle(HTL1,형태1); TL_SetDrawMode(HTL1,0); H1 = var3; LTL1 = TL_New(Value2,Value3,var4,sDate[1],sTime[1],var4); TL_SetColor(LTL1,색2); TL_SetSize(LTL1,굵기2); TL_SetStyle(LTL1,형태2); TL_SetDrawMode(LTL1,0); L1 = var4; } Else { if abs(var3-DayOpen(1)) < 10 and (var3 > H1 or var3 < L1) Then { HTL1 = TL_New(Value2,value4,var3,sDate[1],sTime[1],var3); TL_SetColor(HTL1,색1); TL_SetSize(HTL1,굵기1); TL_SetStyle(HTL1,형태1); TL_SetDrawMode(HTL1,0); } if abs(Var4-DayOpen(1)) < 10 and (Var4 > H1 or Var4 < L1) Then { LTL1 = TL_New(Value2,Value3,var4,sDate[1],sTime[1],var4); TL_SetColor(LTL1,색2); TL_SetSize(LTL1,굵기2); TL_SetStyle(LTL1,형태2); TL_SetDrawMode(LTL1,0); } if var3 > H1 and abs(var3-DayOpen(1)) < 10 Then H1 = Var3; if Var2 < L1 and abs(Var2-DayOpen(0)) < 10 Then L1 = Var4; } } } For cnt = 1 to N { if HV[cnt] > 0 and ((H[0] >= HV[cnt]-PriceScale*3 and H[1] < HV[cnt]-PriceScale*3) or (L[0] <= HV[cnt]+PriceScale*3 and L[1] > HV[cnt]+PriceScale*3) or (H[0] >= LV[cnt]-PriceScale*3 and H[1] < LV[cnt]-PriceScale*3) or (L[0] <= LV[cnt]+PriceScale*3 and L[1] > LV[cnt]+PriceScale*3)) Then { vtl = TL_New(sDate,sTime,0,sDate,sTime,999999999); TL_SetColor(vtl,수직선색상); TL_SetSize(vTL,수직선굵기); TL_SetDrawMode(VTL,0); PlaySound("C:₩예스트레이더(X64)₩data₩Sound₩.wav"); } } 즐거운 하루되세요 > 유로파54 님이 쓴 글입니다. > 제목 : 문의 드립니다! > 안녕하세요! 아래수식에서 발생되는 가로선을 당일의 선이 아닌 전일에 발생된 선이 당일챠트 화면에 나타나도록 수정 부탁드립니다 * 참고로 이 선의 두께를 좀더 두껍게한다거나 다른 형태의 선으로 표시되게 할수는 없을까요? 감사합니다!! -------------------------------------------------------- input : N(30),색1(black),색2(black),굵기1(5),굵기2(5),형태1(1),형태2(1); input : 수직선색상(Black),수직선굵기(2); var : cnt(0),HH(0),LL(0),HTL1(0),LTL1(0),H1(0),L1(0),TL(0),vtl(0); Array : HTL[100](0),LTL[100](0),HV[100](0),LV[100](0); if Sdate != sDate[1] Then { value1 = sDate; Value2 = value1[1]; Value3 = sTime; Value4 = Value3[1]; For cnt = 1 to N { HV[cnt] = 0; LV[cnt] = 0; TL_Delete(HTL[cnt]); TL_Delete(LTL[cnt]); var1 = max(DayOpen(cnt),DayClose(cnt)); var2 = min(DayOpen(cnt),DayClose(cnt)); if cnt == 1 Then { HTL[cnt] = TL_New(sDate,sTime,var1,NextBarSdate,NextBarStime,var1); HV[cnt] = var1; TL_SetColor(HTL[cnt],색1); TL_SetSize(HTL[cnt],굵기1); TL_SetStyle(HTL[cnt],형태1); TL_SetExtRight(HTL[cnt],true); TL_SetDrawMode(HTL[cnt],0); HH = var1; LTL[cnt] = TL_New(sDate,sTime,var2,NextBarSdate,NextBarStime,var2); LV[cnt] = var2; TL_SetColor(LTL[cnt],색2); TL_SetSize(LTL[cnt],굵기2); TL_SetStyle(LTL[cnt],형태2); TL_SetExtRight(LTL[cnt],true); TL_SetDrawMode(LTL[cnt],0); LL = var2; } Else { if abs(var1-DayOpen(0)) < 10 and (var1 > HH or var1 < LL) Then { HTL[cnt] = TL_New(sDate,sTime,var1,NextBarSdate,NextBarStime,var1); HV[cnt] = var1; TL_SetColor(HTL[cnt],색1); TL_SetSize(HTL[cnt],굵기1); TL_SetStyle(HTL[cnt],형태1); TL_SetExtRight(HTL[cnt],true); TL_SetDrawMode(HTL[cnt],0); } if abs(Var2-DayOpen(0)) < 10 and (Var2 > HH or Var2 < LL) Then { LTL[cnt] = TL_New(sDate,sTime,Var2,NextBarSdate,NextBarStime,Var2); LV[cnt] = var2; TL_SetColor(LTL[cnt],색2); TL_SetSize(LTL[cnt],굵기2); TL_SetStyle(LTL[cnt],형태2); TL_SetExtRight(LTL[cnt],true); TL_SetDrawMode(LTL[cnt],0); } if var1 > HH and abs(var1-DayOpen(0)) < 10 Then HH = DayHigh(cnt); if Var2 < LL and abs(Var2-DayOpen(0)) < 10 Then LL = DayLow(cnt); } var3 = max(DayOpen(cnt+1),DayClose(cnt+1)); var4 = min(DayOpen(cnt+1),DayClose(cnt+1)); if cnt == 1 Then { HTL1 = TL_New(Value2,value4,var3,sDate[1],sTime[1],var3); TL_SetColor(HTL1,색1); TL_SetSize(HTL1,굵기1); TL_SetStyle(HTL1,형태1); TL_SetDrawMode(HTL1,0); H1 = var3; LTL1 = TL_New(Value2,Value3,var4,sDate[1],sTime[1],var4); TL_SetColor(LTL1,색2); TL_SetSize(LTL1,굵기2); TL_SetStyle(LTL1,형태2); TL_SetDrawMode(LTL1,0); L1 = var4; } Else { if abs(var3-DayOpen(1)) < 10 and (var3 > H1 or var3 < L1) Then { HTL1 = TL_New(Value2,value4,var3,sDate[1],sTime[1],var3); TL_SetColor(HTL1,색1); TL_SetSize(HTL1,굵기1); TL_SetStyle(HTL1,형태1); TL_SetDrawMode(HTL1,0); } if abs(Var4-DayOpen(1)) < 10 and (Var4 > H1 or Var4 < L1) Then { LTL1 = TL_New(Value2,Value3,var4,sDate[1],sTime[1],var4); TL_SetColor(LTL1,색2); TL_SetSize(LTL1,굵기2); TL_SetStyle(LTL1,형태2); TL_SetDrawMode(LTL1,0); } if var3 > H1 and abs(var3-DayOpen(1)) < 10 Then H1 = Var3; if Var2 < L1 and abs(Var2-DayOpen(0)) < 10 Then L1 = Var4; } } } For cnt = 1 to N { if HV[cnt] > 0 and ((H[0] >= HV[cnt]-PriceScale*3 and H[1] < HV[cnt]-PriceScale*3) or (L[0] <= HV[cnt]+PriceScale*3 and L[1] > HV[cnt]+PriceScale*3) or (H[0] >= LV[cnt]-PriceScale*3 and H[1] < LV[cnt]-PriceScale*3) or (L[0] <= LV[cnt]+PriceScale*3 and L[1] > LV[cnt]+PriceScale*3)) Then { vtl = TL_New(sDate,sTime,0,sDate,sTime,999999999); TL_SetColor(vtl,수직선색상); TL_SetSize(vTL,수직선굵기); TL_SetDrawMode(VTL,0); PlaySound("C:₩예스트레이더(X64)₩data₩Sound₩.wav"); } }