커뮤니티

시스템문의

프로필 이미지
성공예견
2025-03-06 07:28:50
291
글번호 188843
답변완료
1.아래 지표를 시스템으로 좀 수정 해주세요 #=================#=======================================# Input : signal(5),굵기2(1),굵기3(1),굵기4(1); #=================#=======================================# Var : CC9(0),CC91(0); #=================# CC9 =data7(C); #=================# #=================# CC91 = data4(C); #=================# #===================# Var : MACDV(0) , MACDS(0),T(0); var : HIV(0),HID(0),HIT(0),HIV1(0),HID1(0),HIT1(0),HI(0),HI1(0); var : HPV(0),HPD(0),HPT(0),HPV1(0),HPD1(0),HPT1(0); var : LIV(0),LID(0),LIT(0),LIV1(0),LID1(0),LIT1(0),LI(0),LI1(0); var : LPV(0),LPD(0),LPT(0),LPV1(0),LPD1(0),LPT1(0); var : TL1(0),TL2(0),TX1(0),TX2(0),TX3(0); var : TL3(0),TL4(0),TL5(0),i1(0),i2(0); MACDV = CC9; MACDS = ema(MACDV,signal); if (MACDV >= MACDV[1] and MACDV[1] >= MACDV[2]) Then { T = 1; HIV = MACDV; HID = sdate; HIT = stime; HI = Index; HIV1 = HIV[1]; HID1 = HID[1]; HIT1 = HIT[1]; HPV = H; HPD = sdate; HPT = stime; HI1 = HI[1]; HPV1 = HPV[1]; HPD1 = HPD[1]; HPT1 = HPT[1]; Condition1 = false; } if (MACDV <= MACDV[1] and MACDV[1] <= MACDV[2] ) Then { T = -1; LIV = MACDV; LID = sdate; LIT = stime; LI = Index; LIV1 = LIV[1]; LID1 = LID[1]; LIT1 = LIT[1]; LPV = L; LPD = sdate; LPT = stime; LI1 = LI[1]; LPV1 = LPV[1]; LPD1 = LPD[1]; LPT1 = LPT[1]; Condition2 = false; } if T == 1 Then { if MACDV > HIV Then { HIV = MACDV; HID = sdate; HIT = stime; } if H > HPV Then { HPV = H; HPD = sdate; HPT = stime; } if Condition1 == false and HPV1 > 0 and HPV > HPV1 and HIV < HIV1 and HI <= HI1+30 Then { TL1 = TL_New(HPD1,HPT1,HPV1,HPD,HPT,HPV); TL2 = TL_New_Self(HID1,HIT1,HIV1,HID,HIT,HIV); TL_SetColor(TL1,MAGENTA); TL_SetColor(TL2,MAGENTA); TL_SetSize(TL1,굵기2); TL_SetSize(TL2,굵기2); //tx1 = Text_New(HPD1,HPT1,HPV1,NumToStr(HPV1,2)); //tx2 = Text_New(HPD,HPT,HPV,NumToStr(HPV,2)); //tx3 = Text_New(HPD,HPT,(HPV1+HPV)/2,NumToStr((HPV1+HPV)/2,2)); Text_SetStyle(tx1,2,1); Text_SetStyle(tx2,2,1); //TL3 = TL_New(HPD1,HPT1,HPV1,sdate,stime,HPV1); //TL4 = TL_New(HPD1,HPT1,HPV,HPD,HPT,HPV); //TL5 = TL_New(HPD1,HPT1,(HPV1+HPV)/2,HPD,HPT,(HPV1+HPV)/2); Condition1 = true; } if Condition1 == true then { if HPV > HPV1 and HIV < HIV1 then { TL_SetEnd(TL1,HPD,HPT,HPV); TL_SetEnd(TL2,HID,HIT,HIV); Text_SetLocation(tx2,HPD,HPT,HPV); Text_SetString(tx2,NumToStr(HPV,2)); i1 = index; } Else { TL_Delete(TL1); TL_Delete(TL2); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); Text_Delete(tx1); Text_Delete(tx2); } } } if T == -1 Then { if MACDV < LIV Then { LIV = MACDV; LID = sdate; LIT = stime; } if L < LPV Then { LPV = L; LPD = sdate; LPT = stime; } if Condition2 == false and LPV1 > 0 and LPV < LPV1 and LIV > LIV1 and LI <= LI1+30 Then { TL1 = TL_New(LPD1,LPT1,LPV1,LPD,LPT,LPV); TL2 = TL_New_Self(LID1,LIT1,LIV1,LID,LIT,LIV); TL_SetColor(TL1,WHITE); TL_SetColor(TL2,WHITE); TL_SetSize(TL1,굵기2); TL_SetSize(TL2,굵기2); //tx1 = Text_New(LPD1,LPT1,LPV1,NumToStr(LPV1,2)); //tx2 = Text_New(LPD,LPT,LPV,NumToStr(LPV,2)); //tx3 = Text_New(LPD,LPT,(LPV1+LPV)/2,NumToStr((LPV1+LPV)/2,2)); Text_SetStyle(tx1,2,1); Text_SetStyle(tx2,2,1); //TL3 = TL_New(LPD1,LPT1,LPV1,sdate,stime,LPV1); //TL4 = TL_New(LPD1,LPT1,LPV,LPD,LPT,LPV); //TL5 = TL_New(LPD1,LPT1,(LPV1+LPV)/2,LPD,LPT,(LPV1+LPV)/2); Condition2 = true; } if Condition2 == true then { if LPV < LPV1 and LIV > LIV1 then { TL_SetEnd(TL1,LPD,LPT,LPV); TL_SetEnd(TL2,LID,LIT,LIV); Text_SetLocation(tx2,LPD,LPT,LPV); Text_SetString(tx2,NumToStr(LPV,2)); i2 = index; } Else { TL_Delete(TL1); TL_Delete(TL2); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); Text_Delete(tx1); Text_Delete(tx2); } } } if index > i1 and index <= i1+3 Then { TL_SetEnd(tl3,sdate,stime,TL_GetValue(tl3,sdate,stime)); TL_SetEnd(tl4,sdate,stime,TL_GetValue(tl4,sdate,stime)); TL_SetEnd(tl5,sdate,stime,TL_GetValue(tl5,sdate,stime)); } if index > i2 and index <= i2+3 Then { TL_SetEnd(tl3,sdate,stime,TL_GetValue(tl3,sdate,stime)); TL_SetEnd(tl4,sdate,stime,TL_GetValue(tl4,sdate,stime)); TL_SetEnd(tl5,sdate,stime,TL_GetValue(tl5,sdate,stime)); } #=================# Var : MACDV2(0) , MACDS2(0),T2(0); var : HIV2(0),HID2(0),HIT2(0),HIV3(0),HID3(0),HIT3(0),HI2(0),HI3(0); var : HPV2(0),HPD2(0),HPT2(0),HPV3(0),HPD3(0),HPT3(0); var : LIV2(0),LID2(0),LIT2(0),LIV3(0),LID3(0),LIT3(0),LI2(0),LI3(0); var : LPV2(0),LPD2(0),LPT2(0),LPV3(0),LPD3(0),LPT3(0); var : TL26(0),TL27(0),TX26(0),TX27(0),TX28(0); var : TL28(0),TL29(0),TL30(0),TL31(0),i26(0),i27(0); MACDV2 = CC91; MACDS2 = ema(MACDV2,signal); if crossup(MACDV2,MACDS2) Then { T2 = 1; HIV2 = MACDV2; HID2 = sdate; HIT2 = stime; HI2 = Index; HIV3 = HIV2[1]; HID3 = HID2[1]; HIT3 = HIT2[1]; HPV2 = H; HPD2 = sdate; HPT2 = stime; HI3 = HI2[1]; HPV3 = HPV2[1]; HPD3= HPD2[1]; HPT3 = HPT2[1]; Condition1 = false; } if CrossDown(MACDV2,MACDS2) Then { T2 = -1; LIV2 = MACDV2; LID2 = sdate; LIT2 = stime; LI2 = Index; LIV3 = LIV2[1]; LID3 = LID2[1]; LIT3 = LIT2[1]; LPV2 = L; LPD2 = sdate; LPT2 = stime; LI3 = LI2[1]; LPV3 = LPV2[1]; LPD3 = LPD2[1]; LPT3 = LPT2[1]; Condition2 = false; } if T2 == 1 Then { if MACDV2 > HIV2 Then { HIV2 = MACDV2; HID2 = sdate; HIT2 = stime; } if H > HPV2 Then { HPV2 = H; HPD2 = sdate; HPT2 = stime; } if Condition1 == false and HPV3 > 0 and HPV2 > HPV3 and HIV2 < HIV3 and HI2 <= HI3+30 Then { TL26 = TL_New(HPD3,HPT3,HPV3,HPD2,HPT2,HPV2); TL27 = TL_New_Self(HID3,HIT3,HIV3,HID2,HIT2,HIV2); TL_SetColor(TL26,MAGENTA); TL_SetColor(TL27,MAGENTA); TL_SetSize(TL26,굵기3); TL_SetSize(TL27,굵기3); //tx1 = Text_New(HPD1,HPT1,HPV1,NumToStr(HPV1,2)); //tx2 = Text_New(HPD,HPT,HPV,NumToStr(HPV,2)); //tx3 = Text_New(HPD,HPT,(HPV1+HPV)/2,NumToStr((HPV1+HPV)/2,2)); Text_SetStyle(tx26,2,1); Text_SetStyle(tx27,2,1); //TL3 = TL_New(HPD1,HPT1,HPV1,sdate,stime,HPV1); //TL4 = TL_New(HPD1,HPT1,HPV,HPD,HPT,HPV); //TL5 = TL_New(HPD1,HPT1,(HPV1+HPV)/2,HPD,HPT,(HPV1+HPV)/2); Condition1 = true; } if Condition1 == true then { if HPV2 > HPV3 and HIV2 < HIV3 then { TL_SetEnd(TL26,HPD2,HPT2,HPV2); TL_SetEnd(TL27,HID2,HIT2,HIV2); Text_SetLocation(tx27,HPD2,HPT2,HPV2); Text_SetString(tx27,NumToStr(HPV2,2)); i26 = index; } Else { TL_Delete(TL26); TL_Delete(TL27); TL_Delete(TL28); TL_Delete(TL29); TL_Delete(TL30); Text_Delete(tx26); Text_Delete(tx27); } } } if T2 == -1 Then { if MACDV2 < LIV2 Then { LIV2 = MACDV2; LID2 = sdate; LIT2 = stime; } if L < LPV2 Then { LPV2 = L; LPD2 = sdate; LPT2 = stime; } if Condition2 == false and LPV3 > 0 and LPV2 < LPV3 and LIV2 > LIV3 and LI2 <= LI3+30 Then { TL26 = TL_New(LPD3,LPT3,LPV3,LPD2,LPT2,LPV2); TL27 = TL_New_Self(LID3,LIT3,LIV3,LID2,LIT2,LIV2); TL_SetColor(TL26,WHITE); TL_SetColor(TL27,WHITE); TL_SetSize(TL26,굵기3); TL_SetSize(TL27,굵기3); //tx1 = Text_New(LPD1,LPT1,LPV1,NumToStr(LPV1,2)); //tx2 = Text_New(LPD,LPT,LPV,NumToStr(LPV,2)); //tx3 = Text_New(LPD,LPT,(LPV1+LPV)/2,NumToStr((LPV1+LPV)/2,2)); Text_SetStyle(tx26,2,1); Text_SetStyle(tx27,2,1); //TL3 = TL_New(LPD1,LPT1,LPV1,sdate,stime,LPV1); //TL4 = TL_New(LPD1,LPT1,LPV,LPD,LPT,LPV); //TL5 = TL_New(LPD1,LPT1,(LPV1+LPV)/2,LPD,LPT,(LPV1+LPV)/2); Condition2 = true; } if Condition2 == true then { if LPV2 < LPV3 and LIV2 > LIV3 then { TL_SetEnd(TL26,LPD2,LPT2,LPV2); TL_SetEnd(TL27,LID2,LIT2,LIV2); Text_SetLocation(tx27,LPD2,LPT2,LPV2); Text_SetString(tx27,NumToStr(LPV2,2)); i27 = index; } Else { TL_Delete(TL26); TL_Delete(TL27); TL_Delete(TL28); TL_Delete(TL29); TL_Delete(TL30); Text_Delete(tx26); Text_Delete(tx27); } } } if index > i26 and index <= i26+3 Then { TL_SetEnd(tl29,sdate,stime,TL_GetValue(tl29,sdate,stime)); TL_SetEnd(tl30,sdate,stime,TL_GetValue(tl30,sdate,stime)); TL_SetEnd(tl31,sdate,stime,TL_GetValue(tl31,sdate,stime)); } if index > i27 and index <= i27+3 Then { TL_SetEnd(tl29,sdate,stime,TL_GetValue(tl29,sdate,stime)); TL_SetEnd(tl30,sdate,stime,TL_GetValue(tl30,sdate,stime)); TL_SetEnd(tl31,sdate,stime,TL_GetValue(tl31,sdate,stime)); } #===================# plot1(ma(C, DnLevel),"몸통", Black); //음봉이면 파란색 2.그럼 수고하세요
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2025-03-06 13:35:01

안녕하세요 예스스탁입니다. 올리신 지표식만으로는 어떤 조건으로 매매식을 만들지 알 수 없습니다. 각 라인이 최초 출력되는 시점에 매수와 매도신호가 발생하게 작성해 드립니다. #=================#=======================================# Input : signal(5),굵기2(1),굵기3(1),굵기4(1); #=================#=======================================# Var : CC9(0),CC91(0); #=================# CC9 =data7(C); #=================# #=================# CC91 = data4(C); #=================# #===================# Var : MACDV(0) , MACDS(0),T(0); var : HIV(0),HID(0),HIT(0),HIV1(0),HID1(0),HIT1(0),HI(0),HI1(0); var : HPV(0),HPD(0),HPT(0),HPV1(0),HPD1(0),HPT1(0); var : LIV(0),LID(0),LIT(0),LIV1(0),LID1(0),LIT1(0),LI(0),LI1(0); var : LPV(0),LPD(0),LPT(0),LPV1(0),LPD1(0),LPT1(0); var : TL1(0),TL2(0),TX1(0),TX2(0),TX3(0); var : TL3(0),TL4(0),TL5(0),i1(0),i2(0); MACDV = CC9; MACDS = ema(MACDV,signal); if (MACDV >= MACDV[1] and MACDV[1] >= MACDV[2]) Then { T = 1; HIV = MACDV; HID = sdate; HIT = stime; HI = Index; HIV1 = HIV[1]; HID1 = HID[1]; HIT1 = HIT[1]; HPV = H; HPD = sdate; HPT = stime; HI1 = HI[1]; HPV1 = HPV[1]; HPD1 = HPD[1]; HPT1 = HPT[1]; Condition1 = false; } if (MACDV <= MACDV[1] and MACDV[1] <= MACDV[2] ) Then { T = -1; LIV = MACDV; LID = sdate; LIT = stime; LI = Index; LIV1 = LIV[1]; LID1 = LID[1]; LIT1 = LIT[1]; LPV = L; LPD = sdate; LPT = stime; LI1 = LI[1]; LPV1 = LPV[1]; LPD1 = LPD[1]; LPT1 = LPT[1]; Condition2 = false; } if T == 1 Then { if MACDV > HIV Then { HIV = MACDV; HID = sdate; HIT = stime; } if H > HPV Then { HPV = H; HPD = sdate; HPT = stime; } if Condition1 == false and HPV1 > 0 and HPV > HPV1 and HIV < HIV1 and HI <= HI1+30 Then { TL1 = TL_New(HPD1,HPT1,HPV1,HPD,HPT,HPV); TL2 = TL_New_Self(HID1,HIT1,HIV1,HID,HIT,HIV); TL_SetColor(TL1,MAGENTA); TL_SetColor(TL2,MAGENTA); TL_SetSize(TL1,굵기2); TL_SetSize(TL2,굵기2); //tx1 = Text_New(HPD1,HPT1,HPV1,NumToStr(HPV1,2)); //tx2 = Text_New(HPD,HPT,HPV,NumToStr(HPV,2)); //tx3 = Text_New(HPD,HPT,(HPV1+HPV)/2,NumToStr((HPV1+HPV)/2,2)); Text_SetStyle(tx1,2,1); Text_SetStyle(tx2,2,1); //TL3 = TL_New(HPD1,HPT1,HPV1,sdate,stime,HPV1); //TL4 = TL_New(HPD1,HPT1,HPV,HPD,HPT,HPV); //TL5 = TL_New(HPD1,HPT1,(HPV1+HPV)/2,HPD,HPT,(HPV1+HPV)/2); Condition1 = true; Buy("b1"); } if Condition1 == true then { if HPV > HPV1 and HIV < HIV1 then { TL_SetEnd(TL1,HPD,HPT,HPV); TL_SetEnd(TL2,HID,HIT,HIV); Text_SetLocation(tx2,HPD,HPT,HPV); Text_SetString(tx2,NumToStr(HPV,2)); i1 = index; } Else { TL_Delete(TL1); TL_Delete(TL2); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); Text_Delete(tx1); Text_Delete(tx2); } } } if T == -1 Then { if MACDV < LIV Then { LIV = MACDV; LID = sdate; LIT = stime; } if L < LPV Then { LPV = L; LPD = sdate; LPT = stime; } if Condition2 == false and LPV1 > 0 and LPV < LPV1 and LIV > LIV1 and LI <= LI1+30 Then { Sell("s1"); TL1 = TL_New(LPD1,LPT1,LPV1,LPD,LPT,LPV); TL2 = TL_New_Self(LID1,LIT1,LIV1,LID,LIT,LIV); TL_SetColor(TL1,WHITE); TL_SetColor(TL2,WHITE); TL_SetSize(TL1,굵기2); TL_SetSize(TL2,굵기2); //tx1 = Text_New(LPD1,LPT1,LPV1,NumToStr(LPV1,2)); //tx2 = Text_New(LPD,LPT,LPV,NumToStr(LPV,2)); //tx3 = Text_New(LPD,LPT,(LPV1+LPV)/2,NumToStr((LPV1+LPV)/2,2)); Text_SetStyle(tx1,2,1); Text_SetStyle(tx2,2,1); //TL3 = TL_New(LPD1,LPT1,LPV1,sdate,stime,LPV1); //TL4 = TL_New(LPD1,LPT1,LPV,LPD,LPT,LPV); //TL5 = TL_New(LPD1,LPT1,(LPV1+LPV)/2,LPD,LPT,(LPV1+LPV)/2); Condition2 = true; } if Condition2 == true then { if LPV < LPV1 and LIV > LIV1 then { TL_SetEnd(TL1,LPD,LPT,LPV); TL_SetEnd(TL2,LID,LIT,LIV); Text_SetLocation(tx2,LPD,LPT,LPV); Text_SetString(tx2,NumToStr(LPV,2)); i2 = index; } Else { TL_Delete(TL1); TL_Delete(TL2); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); Text_Delete(tx1); Text_Delete(tx2); } } } if index > i1 and index <= i1+3 Then { TL_SetEnd(tl3,sdate,stime,TL_GetValue(tl3,sdate,stime)); TL_SetEnd(tl4,sdate,stime,TL_GetValue(tl4,sdate,stime)); TL_SetEnd(tl5,sdate,stime,TL_GetValue(tl5,sdate,stime)); } if index > i2 and index <= i2+3 Then { TL_SetEnd(tl3,sdate,stime,TL_GetValue(tl3,sdate,stime)); TL_SetEnd(tl4,sdate,stime,TL_GetValue(tl4,sdate,stime)); TL_SetEnd(tl5,sdate,stime,TL_GetValue(tl5,sdate,stime)); } #=================# Var : MACDV2(0) , MACDS2(0),T2(0); var : HIV2(0),HID2(0),HIT2(0),HIV3(0),HID3(0),HIT3(0),HI2(0),HI3(0); var : HPV2(0),HPD2(0),HPT2(0),HPV3(0),HPD3(0),HPT3(0); var : LIV2(0),LID2(0),LIT2(0),LIV3(0),LID3(0),LIT3(0),LI2(0),LI3(0); var : LPV2(0),LPD2(0),LPT2(0),LPV3(0),LPD3(0),LPT3(0); var : TL26(0),TL27(0),TX26(0),TX27(0),TX28(0); var : TL28(0),TL29(0),TL30(0),TL31(0),i26(0),i27(0); MACDV2 = CC91; MACDS2 = ema(MACDV2,signal); if crossup(MACDV2,MACDS2) Then { T2 = 1; HIV2 = MACDV2; HID2 = sdate; HIT2 = stime; HI2 = Index; HIV3 = HIV2[1]; HID3 = HID2[1]; HIT3 = HIT2[1]; HPV2 = H; HPD2 = sdate; HPT2 = stime; HI3 = HI2[1]; HPV3 = HPV2[1]; HPD3= HPD2[1]; HPT3 = HPT2[1]; Condition1 = false; } if CrossDown(MACDV2,MACDS2) Then { T2 = -1; LIV2 = MACDV2; LID2 = sdate; LIT2 = stime; LI2 = Index; LIV3 = LIV2[1]; LID3 = LID2[1]; LIT3 = LIT2[1]; LPV2 = L; LPD2 = sdate; LPT2 = stime; LI3 = LI2[1]; LPV3 = LPV2[1]; LPD3 = LPD2[1]; LPT3 = LPT2[1]; Condition2 = false; } if T2 == 1 Then { if MACDV2 > HIV2 Then { HIV2 = MACDV2; HID2 = sdate; HIT2 = stime; } if H > HPV2 Then { HPV2 = H; HPD2 = sdate; HPT2 = stime; } if Condition1 == false and HPV3 > 0 and HPV2 > HPV3 and HIV2 < HIV3 and HI2 <= HI3+30 Then { Buy("b2"); TL26 = TL_New(HPD3,HPT3,HPV3,HPD2,HPT2,HPV2); TL27 = TL_New_Self(HID3,HIT3,HIV3,HID2,HIT2,HIV2); TL_SetColor(TL26,MAGENTA); TL_SetColor(TL27,MAGENTA); TL_SetSize(TL26,굵기3); TL_SetSize(TL27,굵기3); //tx1 = Text_New(HPD1,HPT1,HPV1,NumToStr(HPV1,2)); //tx2 = Text_New(HPD,HPT,HPV,NumToStr(HPV,2)); //tx3 = Text_New(HPD,HPT,(HPV1+HPV)/2,NumToStr((HPV1+HPV)/2,2)); Text_SetStyle(tx26,2,1); Text_SetStyle(tx27,2,1); //TL3 = TL_New(HPD1,HPT1,HPV1,sdate,stime,HPV1); //TL4 = TL_New(HPD1,HPT1,HPV,HPD,HPT,HPV); //TL5 = TL_New(HPD1,HPT1,(HPV1+HPV)/2,HPD,HPT,(HPV1+HPV)/2); Condition1 = true; } if Condition1 == true then { if HPV2 > HPV3 and HIV2 < HIV3 then { TL_SetEnd(TL26,HPD2,HPT2,HPV2); TL_SetEnd(TL27,HID2,HIT2,HIV2); Text_SetLocation(tx27,HPD2,HPT2,HPV2); Text_SetString(tx27,NumToStr(HPV2,2)); i26 = index; } Else { TL_Delete(TL26); TL_Delete(TL27); TL_Delete(TL28); TL_Delete(TL29); TL_Delete(TL30); Text_Delete(tx26); Text_Delete(tx27); } } } if T2 == -1 Then { if MACDV2 < LIV2 Then { LIV2 = MACDV2; LID2 = sdate; LIT2 = stime; } if L < LPV2 Then { LPV2 = L; LPD2 = sdate; LPT2 = stime; } if Condition2 == false and LPV3 > 0 and LPV2 < LPV3 and LIV2 > LIV3 and LI2 <= LI3+30 Then { Sell("s2"); TL26 = TL_New(LPD3,LPT3,LPV3,LPD2,LPT2,LPV2); TL27 = TL_New_Self(LID3,LIT3,LIV3,LID2,LIT2,LIV2); TL_SetColor(TL26,WHITE); TL_SetColor(TL27,WHITE); TL_SetSize(TL26,굵기3); TL_SetSize(TL27,굵기3); //tx1 = Text_New(LPD1,LPT1,LPV1,NumToStr(LPV1,2)); //tx2 = Text_New(LPD,LPT,LPV,NumToStr(LPV,2)); //tx3 = Text_New(LPD,LPT,(LPV1+LPV)/2,NumToStr((LPV1+LPV)/2,2)); Text_SetStyle(tx26,2,1); Text_SetStyle(tx27,2,1); //TL3 = TL_New(LPD1,LPT1,LPV1,sdate,stime,LPV1); //TL4 = TL_New(LPD1,LPT1,LPV,LPD,LPT,LPV); //TL5 = TL_New(LPD1,LPT1,(LPV1+LPV)/2,LPD,LPT,(LPV1+LPV)/2); Condition2 = true; } if Condition2 == true then { if LPV2 < LPV3 and LIV2 > LIV3 then { TL_SetEnd(TL26,LPD2,LPT2,LPV2); TL_SetEnd(TL27,LID2,LIT2,LIV2); Text_SetLocation(tx27,LPD2,LPT2,LPV2); Text_SetString(tx27,NumToStr(LPV2,2)); i27 = index; } Else { TL_Delete(TL26); TL_Delete(TL27); TL_Delete(TL28); TL_Delete(TL29); TL_Delete(TL30); Text_Delete(tx26); Text_Delete(tx27); } } } if index > i26 and index <= i26+3 Then { TL_SetEnd(tl29,sdate,stime,TL_GetValue(tl29,sdate,stime)); TL_SetEnd(tl30,sdate,stime,TL_GetValue(tl30,sdate,stime)); TL_SetEnd(tl31,sdate,stime,TL_GetValue(tl31,sdate,stime)); } if index > i27 and index <= i27+3 Then { TL_SetEnd(tl29,sdate,stime,TL_GetValue(tl29,sdate,stime)); TL_SetEnd(tl30,sdate,stime,TL_GetValue(tl30,sdate,stime)); TL_SetEnd(tl31,sdate,stime,TL_GetValue(tl31,sdate,stime)); } #===================# # plot1(ma(C, DnLevel),"몸통", Black); //음봉이면 파란색 즐거운 하루되세요 > 성공예견 님이 쓴 글입니다. > 제목 : 시스템문의 > 1.아래 지표를 시스템으로 좀 수정 해주세요 #=================#=======================================# Input : signal(5),굵기2(1),굵기3(1),굵기4(1); #=================#=======================================# Var : CC9(0),CC91(0); #=================# CC9 =data7(C); #=================# #=================# CC91 = data4(C); #=================# #===================# Var : MACDV(0) , MACDS(0),T(0); var : HIV(0),HID(0),HIT(0),HIV1(0),HID1(0),HIT1(0),HI(0),HI1(0); var : HPV(0),HPD(0),HPT(0),HPV1(0),HPD1(0),HPT1(0); var : LIV(0),LID(0),LIT(0),LIV1(0),LID1(0),LIT1(0),LI(0),LI1(0); var : LPV(0),LPD(0),LPT(0),LPV1(0),LPD1(0),LPT1(0); var : TL1(0),TL2(0),TX1(0),TX2(0),TX3(0); var : TL3(0),TL4(0),TL5(0),i1(0),i2(0); MACDV = CC9; MACDS = ema(MACDV,signal); if (MACDV >= MACDV[1] and MACDV[1] >= MACDV[2]) Then { T = 1; HIV = MACDV; HID = sdate; HIT = stime; HI = Index; HIV1 = HIV[1]; HID1 = HID[1]; HIT1 = HIT[1]; HPV = H; HPD = sdate; HPT = stime; HI1 = HI[1]; HPV1 = HPV[1]; HPD1 = HPD[1]; HPT1 = HPT[1]; Condition1 = false; } if (MACDV <= MACDV[1] and MACDV[1] <= MACDV[2] ) Then { T = -1; LIV = MACDV; LID = sdate; LIT = stime; LI = Index; LIV1 = LIV[1]; LID1 = LID[1]; LIT1 = LIT[1]; LPV = L; LPD = sdate; LPT = stime; LI1 = LI[1]; LPV1 = LPV[1]; LPD1 = LPD[1]; LPT1 = LPT[1]; Condition2 = false; } if T == 1 Then { if MACDV > HIV Then { HIV = MACDV; HID = sdate; HIT = stime; } if H > HPV Then { HPV = H; HPD = sdate; HPT = stime; } if Condition1 == false and HPV1 > 0 and HPV > HPV1 and HIV < HIV1 and HI <= HI1+30 Then { TL1 = TL_New(HPD1,HPT1,HPV1,HPD,HPT,HPV); TL2 = TL_New_Self(HID1,HIT1,HIV1,HID,HIT,HIV); TL_SetColor(TL1,MAGENTA); TL_SetColor(TL2,MAGENTA); TL_SetSize(TL1,굵기2); TL_SetSize(TL2,굵기2); //tx1 = Text_New(HPD1,HPT1,HPV1,NumToStr(HPV1,2)); //tx2 = Text_New(HPD,HPT,HPV,NumToStr(HPV,2)); //tx3 = Text_New(HPD,HPT,(HPV1+HPV)/2,NumToStr((HPV1+HPV)/2,2)); Text_SetStyle(tx1,2,1); Text_SetStyle(tx2,2,1); //TL3 = TL_New(HPD1,HPT1,HPV1,sdate,stime,HPV1); //TL4 = TL_New(HPD1,HPT1,HPV,HPD,HPT,HPV); //TL5 = TL_New(HPD1,HPT1,(HPV1+HPV)/2,HPD,HPT,(HPV1+HPV)/2); Condition1 = true; } if Condition1 == true then { if HPV > HPV1 and HIV < HIV1 then { TL_SetEnd(TL1,HPD,HPT,HPV); TL_SetEnd(TL2,HID,HIT,HIV); Text_SetLocation(tx2,HPD,HPT,HPV); Text_SetString(tx2,NumToStr(HPV,2)); i1 = index; } Else { TL_Delete(TL1); TL_Delete(TL2); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); Text_Delete(tx1); Text_Delete(tx2); } } } if T == -1 Then { if MACDV < LIV Then { LIV = MACDV; LID = sdate; LIT = stime; } if L < LPV Then { LPV = L; LPD = sdate; LPT = stime; } if Condition2 == false and LPV1 > 0 and LPV < LPV1 and LIV > LIV1 and LI <= LI1+30 Then { TL1 = TL_New(LPD1,LPT1,LPV1,LPD,LPT,LPV); TL2 = TL_New_Self(LID1,LIT1,LIV1,LID,LIT,LIV); TL_SetColor(TL1,WHITE); TL_SetColor(TL2,WHITE); TL_SetSize(TL1,굵기2); TL_SetSize(TL2,굵기2); //tx1 = Text_New(LPD1,LPT1,LPV1,NumToStr(LPV1,2)); //tx2 = Text_New(LPD,LPT,LPV,NumToStr(LPV,2)); //tx3 = Text_New(LPD,LPT,(LPV1+LPV)/2,NumToStr((LPV1+LPV)/2,2)); Text_SetStyle(tx1,2,1); Text_SetStyle(tx2,2,1); //TL3 = TL_New(LPD1,LPT1,LPV1,sdate,stime,LPV1); //TL4 = TL_New(LPD1,LPT1,LPV,LPD,LPT,LPV); //TL5 = TL_New(LPD1,LPT1,(LPV1+LPV)/2,LPD,LPT,(LPV1+LPV)/2); Condition2 = true; } if Condition2 == true then { if LPV < LPV1 and LIV > LIV1 then { TL_SetEnd(TL1,LPD,LPT,LPV); TL_SetEnd(TL2,LID,LIT,LIV); Text_SetLocation(tx2,LPD,LPT,LPV); Text_SetString(tx2,NumToStr(LPV,2)); i2 = index; } Else { TL_Delete(TL1); TL_Delete(TL2); TL_Delete(TL3); TL_Delete(TL4); TL_Delete(TL5); Text_Delete(tx1); Text_Delete(tx2); } } } if index > i1 and index <= i1+3 Then { TL_SetEnd(tl3,sdate,stime,TL_GetValue(tl3,sdate,stime)); TL_SetEnd(tl4,sdate,stime,TL_GetValue(tl4,sdate,stime)); TL_SetEnd(tl5,sdate,stime,TL_GetValue(tl5,sdate,stime)); } if index > i2 and index <= i2+3 Then { TL_SetEnd(tl3,sdate,stime,TL_GetValue(tl3,sdate,stime)); TL_SetEnd(tl4,sdate,stime,TL_GetValue(tl4,sdate,stime)); TL_SetEnd(tl5,sdate,stime,TL_GetValue(tl5,sdate,stime)); } #=================# Var : MACDV2(0) , MACDS2(0),T2(0); var : HIV2(0),HID2(0),HIT2(0),HIV3(0),HID3(0),HIT3(0),HI2(0),HI3(0); var : HPV2(0),HPD2(0),HPT2(0),HPV3(0),HPD3(0),HPT3(0); var : LIV2(0),LID2(0),LIT2(0),LIV3(0),LID3(0),LIT3(0),LI2(0),LI3(0); var : LPV2(0),LPD2(0),LPT2(0),LPV3(0),LPD3(0),LPT3(0); var : TL26(0),TL27(0),TX26(0),TX27(0),TX28(0); var : TL28(0),TL29(0),TL30(0),TL31(0),i26(0),i27(0); MACDV2 = CC91; MACDS2 = ema(MACDV2,signal); if crossup(MACDV2,MACDS2) Then { T2 = 1; HIV2 = MACDV2; HID2 = sdate; HIT2 = stime; HI2 = Index; HIV3 = HIV2[1]; HID3 = HID2[1]; HIT3 = HIT2[1]; HPV2 = H; HPD2 = sdate; HPT2 = stime; HI3 = HI2[1]; HPV3 = HPV2[1]; HPD3= HPD2[1]; HPT3 = HPT2[1]; Condition1 = false; } if CrossDown(MACDV2,MACDS2) Then { T2 = -1; LIV2 = MACDV2; LID2 = sdate; LIT2 = stime; LI2 = Index; LIV3 = LIV2[1]; LID3 = LID2[1]; LIT3 = LIT2[1]; LPV2 = L; LPD2 = sdate; LPT2 = stime; LI3 = LI2[1]; LPV3 = LPV2[1]; LPD3 = LPD2[1]; LPT3 = LPT2[1]; Condition2 = false; } if T2 == 1 Then { if MACDV2 > HIV2 Then { HIV2 = MACDV2; HID2 = sdate; HIT2 = stime; } if H > HPV2 Then { HPV2 = H; HPD2 = sdate; HPT2 = stime; } if Condition1 == false and HPV3 > 0 and HPV2 > HPV3 and HIV2 < HIV3 and HI2 <= HI3+30 Then { TL26 = TL_New(HPD3,HPT3,HPV3,HPD2,HPT2,HPV2); TL27 = TL_New_Self(HID3,HIT3,HIV3,HID2,HIT2,HIV2); TL_SetColor(TL26,MAGENTA); TL_SetColor(TL27,MAGENTA); TL_SetSize(TL26,굵기3); TL_SetSize(TL27,굵기3); //tx1 = Text_New(HPD1,HPT1,HPV1,NumToStr(HPV1,2)); //tx2 = Text_New(HPD,HPT,HPV,NumToStr(HPV,2)); //tx3 = Text_New(HPD,HPT,(HPV1+HPV)/2,NumToStr((HPV1+HPV)/2,2)); Text_SetStyle(tx26,2,1); Text_SetStyle(tx27,2,1); //TL3 = TL_New(HPD1,HPT1,HPV1,sdate,stime,HPV1); //TL4 = TL_New(HPD1,HPT1,HPV,HPD,HPT,HPV); //TL5 = TL_New(HPD1,HPT1,(HPV1+HPV)/2,HPD,HPT,(HPV1+HPV)/2); Condition1 = true; } if Condition1 == true then { if HPV2 > HPV3 and HIV2 < HIV3 then { TL_SetEnd(TL26,HPD2,HPT2,HPV2); TL_SetEnd(TL27,HID2,HIT2,HIV2); Text_SetLocation(tx27,HPD2,HPT2,HPV2); Text_SetString(tx27,NumToStr(HPV2,2)); i26 = index; } Else { TL_Delete(TL26); TL_Delete(TL27); TL_Delete(TL28); TL_Delete(TL29); TL_Delete(TL30); Text_Delete(tx26); Text_Delete(tx27); } } } if T2 == -1 Then { if MACDV2 < LIV2 Then { LIV2 = MACDV2; LID2 = sdate; LIT2 = stime; } if L < LPV2 Then { LPV2 = L; LPD2 = sdate; LPT2 = stime; } if Condition2 == false and LPV3 > 0 and LPV2 < LPV3 and LIV2 > LIV3 and LI2 <= LI3+30 Then { TL26 = TL_New(LPD3,LPT3,LPV3,LPD2,LPT2,LPV2); TL27 = TL_New_Self(LID3,LIT3,LIV3,LID2,LIT2,LIV2); TL_SetColor(TL26,WHITE); TL_SetColor(TL27,WHITE); TL_SetSize(TL26,굵기3); TL_SetSize(TL27,굵기3); //tx1 = Text_New(LPD1,LPT1,LPV1,NumToStr(LPV1,2)); //tx2 = Text_New(LPD,LPT,LPV,NumToStr(LPV,2)); //tx3 = Text_New(LPD,LPT,(LPV1+LPV)/2,NumToStr((LPV1+LPV)/2,2)); Text_SetStyle(tx26,2,1); Text_SetStyle(tx27,2,1); //TL3 = TL_New(LPD1,LPT1,LPV1,sdate,stime,LPV1); //TL4 = TL_New(LPD1,LPT1,LPV,LPD,LPT,LPV); //TL5 = TL_New(LPD1,LPT1,(LPV1+LPV)/2,LPD,LPT,(LPV1+LPV)/2); Condition2 = true; } if Condition2 == true then { if LPV2 < LPV3 and LIV2 > LIV3 then { TL_SetEnd(TL26,LPD2,LPT2,LPV2); TL_SetEnd(TL27,LID2,LIT2,LIV2); Text_SetLocation(tx27,LPD2,LPT2,LPV2); Text_SetString(tx27,NumToStr(LPV2,2)); i27 = index; } Else { TL_Delete(TL26); TL_Delete(TL27); TL_Delete(TL28); TL_Delete(TL29); TL_Delete(TL30); Text_Delete(tx26); Text_Delete(tx27); } } } if index > i26 and index <= i26+3 Then { TL_SetEnd(tl29,sdate,stime,TL_GetValue(tl29,sdate,stime)); TL_SetEnd(tl30,sdate,stime,TL_GetValue(tl30,sdate,stime)); TL_SetEnd(tl31,sdate,stime,TL_GetValue(tl31,sdate,stime)); } if index > i27 and index <= i27+3 Then { TL_SetEnd(tl29,sdate,stime,TL_GetValue(tl29,sdate,stime)); TL_SetEnd(tl30,sdate,stime,TL_GetValue(tl30,sdate,stime)); TL_SetEnd(tl31,sdate,stime,TL_GetValue(tl31,sdate,stime)); } #===================# plot1(ma(C, DnLevel),"몸통", Black); //음봉이면 파란색 2.그럼 수고하세요