커뮤니티

부탁드립니다

프로필 이미지
마법77
2024-11-11 10:07:34
631
글번호 185129
답변완료
1) 기간 A 볼린저밴드 상단이 ,기간B 볼린저밴드 상단을 돌파(크로스오버)하는 종목을 검색하는 검색식알고싶습니다 2) 기간A 볼린저밴드 상단이, 기간B 볼린저밴드 상단을 돌파할때, 돌파지점에 동그란모양의 강조표시하고 싶습니다
검색
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2024-11-11 15:21:26

안녕하세요 예스스탁입니다. input : 전환포인트(0.8); Array : HD[10](0),HT[10](0),HV[10](0); Array : LD[10](0),LT[10](0),LV[10](0); var : cnt(0),Hprice(0),Lprice(0),VTL(0); var : UpTrend(false),DownTrend(False),Trend(0),Trend1(0),ZigZagTL(0),TX(0),TXx(0),tx1(0); var : TL1(0),TL2(0),TL3(0),TL4(0),TL5(0),TL6(0),TL7(0),TL9(0),T(0); Plot1 (0); HPrice = H; LPrice = L; if Index == 0 or Bdate != Bdate[1] Then { HD[0] = sDate; HT[0] = sTime; HV[0] = HPrice; LD[0] = sDate; LT[0] = sTime; LV[0] = LPrice; trend = 0; trend1 = 0; t = 0; } Else { if Trend == 0 Then { if L < LV[0] Then { LD[0] = sDate; LT[0] = sTime; LV[0] = LPrice; } if H > HV[0] Then { HD[0] = sDate; HT[0] = sTime; HV[0] = HPrice; } } UpTrend = HPrice >= LV[0]+전환포인트; DownTrend = LPrice <= HV[0]-전환포인트; if trend <= 0 and UpTrend == true Then { trend = 1; trend1 = trend[1]; For cnt = 9 DownTo 1 { HD[cnt] = HD[cnt-1]; HT[cnt] = HT[cnt-1]; HV[cnt] = HV[cnt-1]; } HD[0] = sDate; HT[0] = sTime; HV[0] = HPrice; ZigZagTL = TL_New(LD[0],LT[0],LV[0],HD[0],HT[0],HV[0]); TL_SetColor(ZigZagTL,Gold); TL_SetSize(ZigZagTL,3); TX = Text_New(HD[0],HT[0],HV[0],NumToStr(HV[0]-LV[0],2)+" "); Text_SetStyle(TX,1,1); Text_SetColor(TX,Black); Text_SetSize(tx,28); Text_SetBold(tx,1); var3 = 10^(LOG10(HV[0])-(LOG10(HV[0])-LOG10(LV[0]))*(38.2/100)); var4 = 10^(LOG10(HV[0])-(LOG10(HV[0])-LOG10(LV[0]))*(50/100)); var5 = 10^(LOG10(HV[0])-(LOG10(HV[0])-LOG10(LV[0]))*(61.8/100)); TL1 = TL_New(LD[0],LT[0],HV[0],NextBarSdate,NextBarStime,HV[0]); TL3 = TL_New(LD[0],LT[0],var3,NextBarSdate,NextBarStime,var3); TL4 = TL_New(LD[0],LT[0],var4,NextBarSdate,NextBarStime,var4); TL5 = TL_New(LD[0],LT[0],var5,NextBarSdate,NextBarStime,var5); TL_SetColor(TL1,Magenta); TL_SetColor(TL3,Magenta); TL_SetColor(TL4,Blue); TL_SetColor(TL5,Magenta); } Else if trend >= 0 and DownTrend Then//하락추세 전환 { trend = -1; trend1 = trend[1]; For cnt = 9 DownTo 1 { LD[cnt] = LD[cnt-1]; LT[cnt] = LT[cnt-1]; LV[cnt] = LV[cnt-1]; } LD[0] = sDate; LT[0] = sTime; LV[0] = LPrice; ZigZagTL = TL_New(HD[0],HT[0],HV[0],LD[0],LT[0],LV[0]); TL_SetColor(ZigZagTL,Gold); TL_SetSize(ZigZagTL,3); TX = Text_New(LD[0],LT[0],LV[0],NumToStr(HV[0]-LV[0],2)+" "); Text_SetStyle(TX,1,0); Text_SetColor(TX,Black); Text_SetSize(tx,28); Text_SetBold(tx,1); var3 = 10^(LOG10(HV[0])-(LOG10(HV[0])-LOG10(LV[0]))*(38.2/100)); var4 = 10^(LOG10(HV[0])-(LOG10(HV[0])-LOG10(LV[0]))*(50/100)); var5 = 10^(LOG10(HV[0])-(LOG10(HV[0])-LOG10(LV[0]))*(61.8/100)); TL3 = TL_New(HD[0],HT[0],var3,NextBarSdate,NextBarStime,var3); TL4 = TL_New(HD[0],HT[0],var4,NextBarSdate,NextBarStime,var4); TL5 = TL_New(HD[0],HT[0],var5,NextBarSdate,NextBarStime,var5); TL7 = TL_New(HD[0],HT[0],LV[0],NextBarSdate,NextBarStime,LV[0]); TL_SetColor(TL3,Magenta); TL_SetColor(TL4,Blue); TL_SetColor(TL5,Magenta); TL_SetColor(TL7,Magenta); } Else { if trend == 1 Then { if trend1 == 0 Then { LV[0] = DayLow; } if HPrice > HV[0] Then { HD[0] = sDate; HT[0] = sTime; HV[0] = HPrice; TL_SetEnd(ZigZagTL,HD[0],HT[0],HV[0]); Text_SetLocation(TX,HD[0],HT[0],HV[0]); Text_SetString(TX,NumToStr(HV[0]-LV[0],2)+" "); var3 = 10^(LOG10(HV[0])-(LOG10(HV[0])-LOG10(LV[0]))*(38.2/100)); var4 = 10^(LOG10(HV[0])-(LOG10(HV[0])-LOG10(LV[0]))*(50/100)); var5 = 10^(LOG10(HV[0])-(LOG10(HV[0])-LOG10(LV[0]))*(61.8/100)); TL_SetBegin(TL1,LD[0],LT[0],HV[0]); TL_SetBegin(TL3,LD[0],LT[0],Var3); TL_SetBegin(TL4,LD[0],LT[0],Var4); TL_SetBegin(TL5,LD[0],LT[0],Var5); TL_SetEnd(TL1,Sdate,Stime,HV[0]); TL_SetEnd(TL3,Sdate,Stime,Var3); TL_SetEnd(TL4,Sdate,Stime,Var4); TL_SetEnd(TL5,Sdate,Stime,Var5); TL_SetEnd(TL7,Sdate,Stime,TL_GetValue(TL7,sDate,sTime)); } } if trend == -1 Then { if trend1 == 0 Then { HV[0] = DayHigh; } if LPrice < LV[0] Then { LD[0] = sDate; LT[0] = sTime; LV[0] = LPrice; TL_SetEnd(ZigZagTL,LD[0],LT[0],LV[0]); Text_SetLocation(TX,LD[0],LT[0],LV[0]); Text_SetString(TX,NumToStr(HV[0]-LV[0],2)+" "); var3 = 10^(LOG10(HV[0])-(LOG10(HV[0])-LOG10(LV[0]))*(38.2/100)); var4 = 10^(LOG10(HV[0])-(LOG10(HV[0])-LOG10(LV[0]))*(50/100)); var5 = 10^(LOG10(HV[0])-(LOG10(HV[0])-LOG10(LV[0]))*(61.8/100)); TL_SetBegin(TL3,HD[0],HT[0],Var3); TL_SetBegin(TL4,HD[0],HT[0],Var4); TL_SetBegin(TL5,HD[0],HT[0],Var5); TL_SetBegin(TL7,HD[0],HT[0],LV[0]); TL_SetEnd(TL1,Sdate,Stime,TL_GetValue(TL1,sDate,sTime)); TL_SetEnd(TL3,Sdate,Stime,Var3); TL_SetEnd(TL4,Sdate,Stime,Var4); TL_SetEnd(TL5,Sdate,Stime,Var5); TL_SetEnd(TL7,Sdate,Stime,LV[0]); } } } } var : tl99(0); if trend == 1 and trend1 != 0 Then { if trend != trend[1] Then Condition1 = False; if Condition1 == False and HV[0] > HV[1] Then { Condition1 = true; tl99 = TL_New(sDate,sTime,0,sDate,sTime,9999999999); TL_SetColor(tl99,Red); } } if trend == -1 and trend1 != 0 Then { if trend != trend[1] Then Condition2 = False; if Condition2 == False and LV[0] < LV[1] Then { Condition2 = true; tl99 = TL_New(sDate,sTime,0,sDate,sTime,9999999999); TL_SetColor(tl99,Blue); } } 즐거운 하루되세요 > 마법77 님이 쓴 글입니다. > 제목 : 부탁드립니다 > 1) 기간 A 볼린저밴드 상단이 ,기간B 볼린저밴드 상단을 돌파(크로스오버)하는 종목을 검색하는 검색식알고싶습니다 2) 기간A 볼린저밴드 상단이, 기간B 볼린저밴드 상단을 돌파할때, 돌파지점에 동그란모양의 강조표시하고 싶습니다