커뮤니티

부탁합니다.

프로필 이미지
안전
2011-10-26 15:30:46
581
글번호 44126
답변완료
아래와같은식에서 1. 고가추세선,저가추세선 지표식과 2. 상승쇄기,하락 쐐기 지표식 부탁드립니다 ================================================================================= input:len(8),s1(0.37),s2(2.7); var : slv1(0),slv2(0),slb1(0),slb2(0),shv1(0),shv2(0),shb1(0),shb2(0); var : low_trendline(0),low_radian(0),high_trendline(0),high_radian(0); var : cond1(false),cond2(false),cond3(False),currententrynum(0); //'스윙고가,스윙저가 설정 slv1 = SwingLow(1,low,len,len,len*2+1); slv2 = SwingLow(2,low,len,len,len*2+1); slb1 = SwingLowBar(1,low,len,len,len*2+1); slb2 = SwingLowBar(2,low,len,len,len*2+1); shv1 = SwingHigh(1,high,len,len,len*2+1); shv2 = SwingHigh(2,high,len,len,len*2+1); shb1 = SwingHighBar(1,high,len,len,len*2+1); shb2 = SwingHighBar(2,high,len,len,len*2+1); If slb2>slb1 Then{ low_trendline = (slv1-slv2)/(slb2-slb1)*slb1+slv1;// '스윙저가연결 추세선 low_radian=(((slv1-slv2)/slv2)*100)/(slb2-slb1);// '스윙저가연결 추세각 } If shb2>shb1 Then{ high_trendline =(shv1-shv2)/(shb2-shb1)*shb1+shv1;// '스윙고가연결 추세선 high_radian=(((shv1-shv2)/shv2)*100)/(shb2-shb1);// '스윙고가연결 추세각 } Var1=round(ArcTangent(low_radian)*180/Pie,2); Var2=round(ArcTangent(high_radian)*180/Pie,2); If Var1>0 And Var2>0 And Var1>var2 And high_trendline>low_trendline Then// '상향쐐기형 Cond1 = True; Else Cond1 = False; If Var1<0 And Var2<0 And Var1>var2 And high_trendline > low_trendline Then// '하향쐐기형 Cond2=True; Else Cond2=False; If Var1>0 And Var2<0 And high_trendline>low_trendline Then// '삼각형 Cond3=True; Else Cond3=False; Var10=highd(1)-lowd(1); //'전일고저차 If date <> date[1] Then{ Var50=currententrynum; } if MarketPosition() == 0 Then //무포지션 상태에서는 currententrynum = TotalTrades(); //청산종결된 모든 거래 횟수 저장 Else currententrynum = TotalTrades()+1;//포지션이 있는 상태에서는 청산종결된 모든 거래의 횟수에 +1 =================================================================================
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2011-10-27 13:27:09

안녕하세요 예스스탁입니다. plot1과 plot2는 선그래프 plot3과 plot4는 점그래프 로 설정하시고 적용하시기 바랍니다. input:len(8),s1(0.37),s2(2.7); var : slv1(0),slv2(0),slb1(0),slb2(0),shv1(0),shv2(0),shb1(0),shb2(0); var : low_trendline(0),low_radian(0),high_trendline(0),high_radian(0); var : cond1(false),cond2(false),cond3(False),currententrynum(0); //'스윙고가,스윙저가 설정 slv1 = SwingLow(1,low,len,len,100); slv2 = SwingLow(2,low,len,len,100); slb1 = SwingLowBar(1,low,len,len,100); slb2 = SwingLowBar(2,low,len,len,100); shv1 = SwingHigh(1,high,len,len,100); shv2 = SwingHigh(2,high,len,len,100); shb1 = SwingHighBar(1,high,len,len,100); shb2 = SwingHighBar(2,high,len,len,100); If slb2>slb1 Then{ low_trendline = (slv1-slv2)/(slb2-slb1)*slb1+slv1;// '스윙저가연결 추세선 low_radian=(((slv1-slv2)/slv2)*100)/(slb2-slb1);// '스윙저가연결 추세각 } If shb2>shb1 Then{ high_trendline =(shv1-shv2)/(shb2-shb1)*shb1+shv1;// '스윙고가연결 추세선 high_radian=(((shv1-shv2)/shv2)*100)/(shb2-shb1);// '스윙고가연결 추세각 } Var1=round(ArcTangent(low_radian)*180/Pie,2); Var2=round(ArcTangent(high_radian)*180/Pie,2); If Var1>0 And Var2>0 And Var1>var2 And high_trendline>low_trendline Then// '상향쐐기형 Cond1 = True; Else Cond1 = False; If Var1<0 And Var2<0 And Var1>var2 And high_trendline > low_trendline Then// '하향쐐기형 Cond2=True; Else Cond2=False; If Var1>0 And Var2<0 And high_trendline>low_trendline Then// '삼각형 Cond3=True; Else Cond3=False; Var10=highd(1)-lowd(1); //'전일고저차 plot1(high_trendline); plot2(low_trendline); if Cond1 == true Then plot3(H,"상향쇄기형",RED); if Cond2 == true Then plot4(L,"상향쇄기형",blue); 즐거운 하루되세요 > 안전 님이 쓴 글입니다. > 제목 : 부탁합니다. > 아래와같은식에서 1. 고가추세선,저가추세선 지표식과 2. 상승쇄기,하락 쐐기 지표식 부탁드립니다 ================================================================================= input:len(8),s1(0.37),s2(2.7); var : slv1(0),slv2(0),slb1(0),slb2(0),shv1(0),shv2(0),shb1(0),shb2(0); var : low_trendline(0),low_radian(0),high_trendline(0),high_radian(0); var : cond1(false),cond2(false),cond3(False),currententrynum(0); //'스윙고가,스윙저가 설정 slv1 = SwingLow(1,low,len,len,len*2+1); slv2 = SwingLow(2,low,len,len,len*2+1); slb1 = SwingLowBar(1,low,len,len,len*2+1); slb2 = SwingLowBar(2,low,len,len,len*2+1); shv1 = SwingHigh(1,high,len,len,len*2+1); shv2 = SwingHigh(2,high,len,len,len*2+1); shb1 = SwingHighBar(1,high,len,len,len*2+1); shb2 = SwingHighBar(2,high,len,len,len*2+1); If slb2>slb1 Then{ low_trendline = (slv1-slv2)/(slb2-slb1)*slb1+slv1;// '스윙저가연결 추세선 low_radian=(((slv1-slv2)/slv2)*100)/(slb2-slb1);// '스윙저가연결 추세각 } If shb2>shb1 Then{ high_trendline =(shv1-shv2)/(shb2-shb1)*shb1+shv1;// '스윙고가연결 추세선 high_radian=(((shv1-shv2)/shv2)*100)/(shb2-shb1);// '스윙고가연결 추세각 } Var1=round(ArcTangent(low_radian)*180/Pie,2); Var2=round(ArcTangent(high_radian)*180/Pie,2); If Var1>0 And Var2>0 And Var1>var2 And high_trendline>low_trendline Then// '상향쐐기형 Cond1 = True; Else Cond1 = False; If Var1<0 And Var2<0 And Var1>var2 And high_trendline > low_trendline Then// '하향쐐기형 Cond2=True; Else Cond2=False; If Var1>0 And Var2<0 And high_trendline>low_trendline Then// '삼각형 Cond3=True; Else Cond3=False; Var10=highd(1)-lowd(1); //'전일고저차 If date <> date[1] Then{ Var50=currententrynum; } if MarketPosition() == 0 Then //무포지션 상태에서는 currententrynum = TotalTrades(); //청산종결된 모든 거래 횟수 저장 Else currententrynum = TotalTrades()+1;//포지션이 있는 상태에서는 청산종결된 모든 거래의 횟수에 +1 =================================================================================