Parameter:顯示偏移(30),劃線(0) Variables:PT(0),CDP(0),H1(0),H2(0),H3(0),L1(0),L2(0),L3(0) Array: OoD[84](-1), HoD[84](-1), LoD[84](-1), CoD[84](-1)Value91= OpenOfD (2, OoD) Value92= HighOfD (2, HoD) Value93= LowOfD (2, LoD) Value94= CloseOfD(2, CoD) //自動偵測前日高低 if CoD[2]>LoD[1] then value1=HoD[1] value2=LoD[1] else //向上跳空缺口 value1=HoD[1] value2=CoD[2] end if if CoD[2] value1=HoD[1] value2=LoD[1] else //向下跳空缺口 value1=CoD[2] value2=LoD[1] end if //(收盤價+高+低 為基準 修正三關價&CDP ) PT =value1-value2 CDP=(value1+value2+CoD[1])/3 H3=(CDP-value2)*2+value1 H2=CDP + PT H1=CDP*2-value2 L1=CDP*2-value1 L2=CDP-PT L3=(CDP-value1)*2+value2 //**********今七關*********************** Draw1(H3 ,"H3" , RED,1,2) Draw2(H2 ,"H2" , MAGENTA,1,1) Draw3(H1 ,"H1" , BLUE,1,1) Draw4(CDP,"CDP", DARKGray,1,2) Draw5(L1 ,"L1" , BLUE,1,1) Draw6(L2 ,"L2" , MAGENTA,1,1) Draw7(L3 ,"L3" , GREEN,1,2) IF LastBarOnChart THEN Value99=TXT_New( Date,Time,H3,space(顯示偏移)+NumToStr(H3,1)+" H3") TXT_SetColor( Value99,RED) VALUE99=TXT_New( Date,Time,H2,space(顯示偏移)+NumToStr(H2,1)+" H2") TXT_SetColor( Value99,MAGENTA) VALUE99=TXT_New( Date,Time,H1,space(顯示偏移)+NumToStr(H1,1)+" H1") TXT_SetColor( Value99,BLUE) VALUE99=TXT_New( Date,Time,CDP,space(顯示偏移)+NumToStr(CDP,1)+" CDP") TXT_SetColor( Value99,DARKGray) VALUE99=TXT_New( Date,Time,L1,space(顯示偏移)+NumToStr(L1,1)+" L1") TXT_SetColor( Value99,BLUE) VALUE99=TXT_New( Date,Time,L2,space(顯示偏移)+NumToStr(L2,1)+" L2") TXT_SetColor( Value99,MAGENTA) VALUE99=TXT_New( Date,Time,L3,space(顯示偏移)+NumToStr(L3,1)+" L3") TXT_SetColor( Value99,GREEN) end if //*********明七關******************* PT =HoD[0]-LoD[0] CDP=(HoD[0]+LoD[0]+CoD[1])/3 H3=(CDP-LoD[0])*2+HoD[0] H2=CDP + PT H1=CDP*2-LoD[0] L1=CDP*2-HoD[0] L2=CDP-PT L3=(CDP-HoD[0])*2+LoD[0] IF LastBarOnChart THEN TXT_New( Date,Time,H3 ,space(顯示偏移+20)+NumToStr(H3,1) +" H3") TXT_New( Date,Time,H2 ,space(顯示偏移+20)+NumToStr(H2,1) +" H2") TXT_New( Date,Time,H1 ,space(顯示偏移+20)+NumToStr(H1,1) +" H1") TXT_New( Date,Time,CDP,space(顯示偏移+20)+NumToStr(CDP,1) +"明*CDP") TXT_New( Date,Time,L1 ,space(顯示偏移+20)+NumToStr(L1,1) +" L1") TXT_New( Date,Time,L2 ,space(顯示偏移+20)+NumToStr(L2,1) +" L2") TXT_New( Date,Time,L3 ,space(顯示偏移+20)+NumToStr(L3,1) +" L3") end if //------------若..劃線=0 不顯示價位線 if 劃線=0 Then For value20 = 1 to 7 NoDraw(value20) End for end if 有問題 不知道是怎裡出了錯 有人可以指導一下嗎
Never too late
|