커뮤니티

문의드립니다.

프로필 이미지
레드코어
2015-03-15 23:55:32
165
글번호 84057
답변완료
안녕하세요. 하기의 시스템식을 예스랭귀지로 변환하고 싶은데 가능할까요? 부탁드립니다~^^ //---- input parameters extern int RISK=3; extern int SSP=9; extern int CountBars=500; extern int Alert_Delay_In_Seconds=60; int PrevAlertTime=0; //---- buffers double val1[]; double val2[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { string short_name; //---- indicator line IndicatorBuffers(2); SetIndexStyle(0,DRAW_ARROW); SetIndexArrow(0,234); SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,233); SetIndexBuffer(0,val1); SetIndexBuffer(1,val2); //---- return(0); } //+------------------------------------------------------------------+ //| BykovTrend_Sig | //+------------------------------------------------------------------+ int start() { SetIndexDrawBegin(0,Bars-CountBars+SSP+1); SetIndexDrawBegin(1,Bars-CountBars+SSP+1); int i,counted_bars=IndicatorCounted(); int K; bool uptrend,old; double wpr; int A=10; //---- K=33-RISK; //---- if(Bars<=SSP+1) return(0); //---- initial zero if(counted_bars<SSP+1) { for(i=1;i<=0;i++) val1[CountBars-i]=0.0; for(i=1;i<=0;i++) val2[CountBars-i]=0.0; } //---- i=CountBars-SSP-1; if(counted_bars>=SSP+1) i=CountBars-counted_bars-1; while(i>=0) { wpr=iWPR(NULL,0,SSP,i); val1[i]=0.0; val2[i]=0.0; if (wpr<-100+K) uptrend=false; if (wpr>-K) uptrend=true; if ((! uptrend==old) && uptrend==true) {val2[i]=Low[i]-5*Point;} //---- PrevAlertTime=CurTime(); //---- if ((! uptrend==old) && uptrend==false) {val1[i]=High[i]+5*Point;} old=uptrend; i--; } return(0); } //+------------------------------------------------------------------+
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-03-16 14:44:19

안녕하세요 예스스탁입니다. 올려주신 랭귀지는 사용해본 경험이 없어 예스랭귀지로 변경해 드리기 어렵습니다. 도움을 드리지 못해 죄송합니다. 즐거운 하루되세요 > 레드코어 님이 쓴 글입니다. > 제목 : 문의드립니다. > 안녕하세요. 하기의 시스템식을 예스랭귀지로 변환하고 싶은데 가능할까요? 부탁드립니다~^^ //---- input parameters extern int RISK=3; extern int SSP=9; extern int CountBars=500; extern int Alert_Delay_In_Seconds=60; int PrevAlertTime=0; //---- buffers double val1[]; double val2[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { string short_name; //---- indicator line IndicatorBuffers(2); SetIndexStyle(0,DRAW_ARROW); SetIndexArrow(0,234); SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,233); SetIndexBuffer(0,val1); SetIndexBuffer(1,val2); //---- return(0); } //+------------------------------------------------------------------+ //| BykovTrend_Sig | //+------------------------------------------------------------------+ int start() { SetIndexDrawBegin(0,Bars-CountBars+SSP+1); SetIndexDrawBegin(1,Bars-CountBars+SSP+1); int i,counted_bars=IndicatorCounted(); int K; bool uptrend,old; double wpr; int A=10; //---- K=33-RISK; //---- if(Bars<=SSP+1) return(0); //---- initial zero if(counted_bars<SSP+1) { for(i=1;i<=0;i++) val1[CountBars-i]=0.0; for(i=1;i<=0;i++) val2[CountBars-i]=0.0; } //---- i=CountBars-SSP-1; if(counted_bars>=SSP+1) i=CountBars-counted_bars-1; while(i>=0) { wpr=iWPR(NULL,0,SSP,i); val1[i]=0.0; val2[i]=0.0; if (wpr<-100+K) uptrend=false; if (wpr>-K) uptrend=true; if ((! uptrend==old) && uptrend==true) {val2[i]=Low[i]-5*Point;} //---- PrevAlertTime=CurTime(); //---- if ((! uptrend==old) && uptrend==false) {val1[i]=High[i]+5*Point;} old=uptrend; i--; } return(0); } //+------------------------------------------------------------------+