커뮤니티

문의드립니다.

프로필 이미지
잡다백수
2018-06-23 21:06:12
235
글번호 119988
답변완료
도움주시는 덕분에 도전하고 있습니다. 매번 감사합니다. 1. 코딩 변환부탁드립니다. Function: EhlersDSMA using elsystem ; inputs: Period( numericsimple ) ; variables: a1( 0 ), b1( 0 ), c1( 0 ), c2( 0 ), c3( 0 ), Zeros( 0 ), Filt( 0 ), ScaledFilt( 0 ), RMS( 0 ), count( 0 ), alpha1( 0 ), DSMA( 0 ) ; once begin if Period <= 0 then throw Exception.Create( "The 'Period' input to the " + "EhlersDSMA function must be greater than 0." ) ; //Smooth with a Super Smoother a1 = ExpValue( -1.414 * 3.14159 / ( .5 * Period ) ) ; b1 = 2 * a1 * Cosine( 1.414 * 180 / ( .5 * Period ) ) ; c2 = b1 ; c3 = -a1 * a1 ; c1 = 1 - c2 - c3 ; end ; //Produce Nominal zero mean with zeros in the transfer //response at DC and Nyquist with no spectral distortion //Nominally whitens the spectrum because of 6 dB //per octave rolloff Zeros = Close - Close[2] ; //SuperSmoother Filter Filt = c1 * ( Zeros + Zeros[1] ) / 2 + c2 * Filt[1] + c3 * Filt[2] ; //Compute Standard Deviation RMS = 0; For count = 0 to Period - 1 begin RMS = RMS + Filt[count] * Filt[count] ; end ; RMS = SquareRoot( RMS / Period ) ; //Rescale Filt in terms of Standard Deviations If RMS <> 0 then ScaledFilt = Filt / RMS ; alpha1 = AbsValue( ScaledFilt ) * 5 / Period ; DSMA = alpha1 * Close + ( 1 - alpha1 ) * DSMA[1] ; EhlersDSMA = DSMA ; 2. 코딩 변환부탁드립니다. Indicator: DSMA // TASC JUL 2018 // Ehlers DSMA inputs: Period( 40 ) ; variables: DSMAValue( 0 ) ; DSMAValue = EhlersDSMA( Period ) ; Plot1( DSMAValue, "DSMA" ) ; if AlertEnabled then begin if Close crosses over DSMAValue then Alert( "Price crossing over DSMA" ) else if Close crosses under DSMAValue then Alert( "Price crossing under DSMA" ) ; end ; 3. 코딩변환 + 해선용으로 n분부터 n분까지만 매매 코드 추가 부탁드립니다. inputs: FastPeriod( 40 ), SlowPeriod( 100 ) ; variables: FastDSMAValue( 0 ), SlowDSMAValue( 0 ) ; FastDSMAValue = EhlersDSMA( FastPeriod ) ; SlowDSMAValue = EhlersDSMA( SlowPeriod ) ; if FastDSMAValue crosses above SlowDSMAValue then Buy next bar at Market else if FastDSMAValue crosses below SlowDSMAValue then SellShort next bar at Market ; 4. 기타 -09:30~10:00 봉 가운데 -봉 길이가 -전일 봉 길이 평균의 2배이상인 봉이 나타났을 때 고저셋업 a-양봉이면 고가 + n틱에 매수진입 b-음봉이면 저가 - n틱에 매도 진입 a시 셋업 고가를 하향돌파할 때 매수 손절 청산 b시 셋업 저가를 상향돌파할 때 매도 손절 청산 5. 기타 4번 해선용으로
시스템
답변 2
프로필 이미지

예스스탁 예스스탁 답변

2018-06-25 13:20:20

안녕하세요 예스스탁입니다. 1,2,3,번 내용은 저희 문법에 맞게 변경만 해드립니다. 지표값이 출력되지 않은데 사용자함수의 계산식등이 0으로만 발생합니다. 해당 부분은 사용자분이 계산식 내용 살펴보셔야 할것 같습니다. 안녕하세요 예스스탁입니다. 1,2,3,번 내용은 저희 문법에 맞게 변경만 해드립니다. 지표값이 출력되지 않은데 사용자함수의 계산식등이 0으로만 발생합니다. 해당 부분은 사용자분이 계산식 내용 살펴보셔야 할것 같습니다. 1 inputs: Period( numericsimple ) ; variables: a1( 0 ), b1( 0 ), c1( 0 ), c2( 0 ), c3( 0 ), Zeros( 0 ), Filt( 0 ), ScaledFilt( 0 ), RMS( 0 ), count( 0 ), alpha1( 0 ), DSMA( 0 ) ; if Period <= 0 then //throw Exception.Create( "The 'Period' input to the " + //"EhlersDSMA function must be greater than 0." ) ; //Smooth with a Super Smoother a1 = ExpValue( -1.414 * 3.14159 / ( .5 * Period ) ) ; b1 = 2 * a1 * Cosine( 1.414 * 180 / ( .5 * Period ) ) ; c2 = b1 ; c3 = -a1 * a1 ; c1 = 1 - c2 - c3 ; //Produce Nominal zero mean with zeros in the transfer //response at DC and Nyquist with no spectral distortion //Nominally whitens the spectrum because of 6 dB //per octave rolloff Zeros = Close - Close[2] ; //SuperSmoother Filter Filt = c1 * ( Zeros + Zeros[1] ) / 2 + c2 * Filt[1] + c3 * Filt[2] ; //Compute Standard Deviation RMS = 0; For count = 0 to Period - 1 begin RMS = RMS + Filt[count] * Filt[count] ; end ; RMS = SquareRoot( RMS / Period ) ; //Rescale Filt in terms of Standard Deviations If RMS <> 0 then ScaledFilt = Filt / RMS ; alpha1 = AbsValue( ScaledFilt ) * 5 / Period ; DSMA = alpha1 * Close + ( 1 - alpha1 ) * DSMA[1] ; EhlersDSMA = DSMA ; 2 inputs: Period( 40 ) ; variables: DSMAValue( 0 ) ; DSMAValue = EhlersDSMA( Period ) ; Plot1( DSMAValue, "DSMA" ) ; if AlertEnabled then begin if crossup(Close,DSMAValue) then Alert( "Price crossing over DSMA" ); if CrossDown(Close,DSMAValue) then Alert( "Price crossing under DSMA" ) ; end; 3 inputs: FastPeriod( 40 ), SlowPeriod( 100 ) , 시작시간(070000),종료시간(050000); variables: FastDSMAValue( 0 ), SlowDSMAValue( 0 ),Tcond(false) ; if (sdate != sdate and stime >= 시작시간) or (sdate == sdate and stime >= 시작시간 and stime[1] < 시작시간) Then Tcond = true; if (sdate != sdate and stime >= 종료시간) or (sdate == sdate and stime >= 종료시간 and stime[1] < 종료시간) Then Tcond = false; FastDSMAValue = EhlersDSMA( FastPeriod ) ; SlowDSMAValue = EhlersDSMA( SlowPeriod ) ; if tcond == true then { if crossup(FastDSMAValue,SlowDSMAValue) then buy("b",AtMarket); if CrossDown(FastDSMAValue,SlowDSMAValue) then sell("s",AtMarket); } 4 input : 시작시간(070000),종료시간(050000),n(5); var : T(0),Tcond(false); if bdate != bdate[1] Then { var1 = 0; var2 = 0; var31 = var3[1]; T = 0; } var1 = var1+(H-L); var2 = var2+1; var3 = var1/var2; if (sdate != sdate and stime >= 시작시간) or (sdate == sdate and stime >= 시작시간 and stime[1] < 시작시간) Then Tcond = true; if (sdate != sdate and stime >= 종료시간) or (sdate == sdate and stime >= 종료시간 and stime[1] < 종료시간) Then Tcond = false; if tcond == true then { if H-L >= var31*2 Then { value1 = H; value2 = L; if C > O Then T = 1; if C > O Then T = -1; } } if T == 1 and MarketPosition <= 0 Then buy("b",AtStop,value1+PriceScale*n); if T == -1 and MarketPosition >= 0 Then sell("s",AtStop,value2-PriceScale*n); if MarketPosition == 1 and T == 1 Then ExitLong("bx",AtStop,value1); if MarketPosition == -1 and T == -1 Then ExitShort("sx",AtStop,value1); 5 해당 내용은 해선 국선 구분이 없습니다. 공용으로 사용할수 있습니다. 즐거운 하루되세요 > 잡다백수 님이 쓴 글입니다. > 제목 : 문의드립니다. > 도움주시는 덕분에 도전하고 있습니다. 매번 감사합니다. 1. 코딩 변환부탁드립니다. Function: EhlersDSMA using elsystem ; inputs: Period( numericsimple ) ; variables: a1( 0 ), b1( 0 ), c1( 0 ), c2( 0 ), c3( 0 ), Zeros( 0 ), Filt( 0 ), ScaledFilt( 0 ), RMS( 0 ), count( 0 ), alpha1( 0 ), DSMA( 0 ) ; once begin if Period <= 0 then throw Exception.Create( "The 'Period' input to the " + "EhlersDSMA function must be greater than 0." ) ; //Smooth with a Super Smoother a1 = ExpValue( -1.414 * 3.14159 / ( .5 * Period ) ) ; b1 = 2 * a1 * Cosine( 1.414 * 180 / ( .5 * Period ) ) ; c2 = b1 ; c3 = -a1 * a1 ; c1 = 1 - c2 - c3 ; end ; //Produce Nominal zero mean with zeros in the transfer //response at DC and Nyquist with no spectral distortion //Nominally whitens the spectrum because of 6 dB //per octave rolloff Zeros = Close - Close[2] ; //SuperSmoother Filter Filt = c1 * ( Zeros + Zeros[1] ) / 2 + c2 * Filt[1] + c3 * Filt[2] ; //Compute Standard Deviation RMS = 0; For count = 0 to Period - 1 begin RMS = RMS + Filt[count] * Filt[count] ; end ; RMS = SquareRoot( RMS / Period ) ; //Rescale Filt in terms of Standard Deviations If RMS <> 0 then ScaledFilt = Filt / RMS ; alpha1 = AbsValue( ScaledFilt ) * 5 / Period ; DSMA = alpha1 * Close + ( 1 - alpha1 ) * DSMA[1] ; EhlersDSMA = DSMA ; 2. 코딩 변환부탁드립니다. Indicator: DSMA // TASC JUL 2018 // Ehlers DSMA inputs: Period( 40 ) ; variables: DSMAValue( 0 ) ; DSMAValue = EhlersDSMA( Period ) ; Plot1( DSMAValue, "DSMA" ) ; if AlertEnabled then begin if Close crosses over DSMAValue then Alert( "Price crossing over DSMA" ) else if Close crosses under DSMAValue then Alert( "Price crossing under DSMA" ) ; end ; 3. 코딩변환 + 해선용으로 n분부터 n분까지만 매매 코드 추가 부탁드립니다. inputs: FastPeriod( 40 ), SlowPeriod( 100 ) ; variables: FastDSMAValue( 0 ), SlowDSMAValue( 0 ) ; FastDSMAValue = EhlersDSMA( FastPeriod ) ; SlowDSMAValue = EhlersDSMA( SlowPeriod ) ; if FastDSMAValue crosses above SlowDSMAValue then Buy next bar at Market else if FastDSMAValue crosses below SlowDSMAValue then SellShort next bar at Market ; 4. 기타 -09:30~10:00 봉 가운데 -봉 길이가 -전일 봉 길이 평균의 2배이상인 봉이 나타났을 때 고저셋업 a-양봉이면 고가 + n틱에 매수진입 b-음봉이면 저가 - n틱에 매도 진입 a시 셋업 고가를 하향돌파할 때 매수 손절 청산 b시 셋업 저가를 상향돌파할 때 매도 손절 청산 5. 기타 4번 해선용으로
프로필 이미지

잡다백수

2018-06-26 09:58:31

코딩 감사합니다. 1. 4번은 한번 실행해봤는데 거래 자체가 돼지 않았습니다. 혹시나 전 거래일 봉 길이 평균의 2배가 되는 게 원래 잘 없는 값인가 해서 if H-L >= var31*2 부분을 var31*1로 바꾸어서 해봤는데도 시뮬상 거래가 없었습니다. 뭐가 잘못된 건지 잘 모르겠습니다. 가르침 바랍니다. 2. 지표값이 안나온다고 하셔서 혹시 몰라 다른 페이지에 있는 트레이스테이션 코드를 붙입니다. 아래와 완전 같은 내용이라면 어차피 0값이 나올테니 이 질문은 무시해주십시오. Inputs: Period(40); Vars: a1(0), b1(0), c1(0), c2(0), c3(0), Zeros(0), Filt(0), ScaledFilt(0), RMS(0), count(0), alpha1(0), DSMA(0); If CurrentBar = 1 Then Begin //Smooth with a Super Smoother a1 = expvalue(-1.414*3.14159 / (.5*Period)); b1 = 2*a1*Cosine(1.414*180 / (.5*Period)); c2 = b1; c3 = -a1*a1; c1 = 1 - c2 - c3; End; //Produce Nominal zero mean with zeros in the transfer response //at DC and Nyquist with no spectral distortion //Nominally whitens the spectrum because of 6 dB per octave //rolloff Zeros = Close - Close[2]; //SuperSmoother Filter Filt = c1*(Zeros + Zeros[1]) / 2 + c2*Filt[1] + c3*Filt[2]; //Compute Standard Deviation RMS = 0; For count = 0 to Period - 1 Begin RMS = RMS + Filt[count]*Filt[count]; End; RMS = SquareRoot(RMS / Period); //Rescale Filt in terms of Standard Deviations ScaledFilt = Filt / RMS; alpha1 = AbsValue(ScaledFilt)*5 / Period; DSMA = alpha1*Close + (1 - alpha1)*DSMA[1]; Plot1(DSMA); > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 문의드립니다. > 안녕하세요 예스스탁입니다. 1,2,3,번 내용은 저희 문법에 맞게 변경만 해드립니다. 지표값이 출력되지 않은데 사용자함수의 계산식등이 0으로만 발생합니다. 해당 부분은 사용자분이 계산식 내용 살펴보셔야 할것 같습니다. 안녕하세요 예스스탁입니다. 1,2,3,번 내용은 저희 문법에 맞게 변경만 해드립니다. 지표값이 출력되지 않은데 사용자함수의 계산식등이 0으로만 발생합니다. 해당 부분은 사용자분이 계산식 내용 살펴보셔야 할것 같습니다. 1 inputs: Period( numericsimple ) ; variables: a1( 0 ), b1( 0 ), c1( 0 ), c2( 0 ), c3( 0 ), Zeros( 0 ), Filt( 0 ), ScaledFilt( 0 ), RMS( 0 ), count( 0 ), alpha1( 0 ), DSMA( 0 ) ; if Period <= 0 then //throw Exception.Create( "The 'Period' input to the " + //"EhlersDSMA function must be greater than 0." ) ; //Smooth with a Super Smoother a1 = ExpValue( -1.414 * 3.14159 / ( .5 * Period ) ) ; b1 = 2 * a1 * Cosine( 1.414 * 180 / ( .5 * Period ) ) ; c2 = b1 ; c3 = -a1 * a1 ; c1 = 1 - c2 - c3 ; //Produce Nominal zero mean with zeros in the transfer //response at DC and Nyquist with no spectral distortion //Nominally whitens the spectrum because of 6 dB //per octave rolloff Zeros = Close - Close[2] ; //SuperSmoother Filter Filt = c1 * ( Zeros + Zeros[1] ) / 2 + c2 * Filt[1] + c3 * Filt[2] ; //Compute Standard Deviation RMS = 0; For count = 0 to Period - 1 begin RMS = RMS + Filt[count] * Filt[count] ; end ; RMS = SquareRoot( RMS / Period ) ; //Rescale Filt in terms of Standard Deviations If RMS <> 0 then ScaledFilt = Filt / RMS ; alpha1 = AbsValue( ScaledFilt ) * 5 / Period ; DSMA = alpha1 * Close + ( 1 - alpha1 ) * DSMA[1] ; EhlersDSMA = DSMA ; 2 inputs: Period( 40 ) ; variables: DSMAValue( 0 ) ; DSMAValue = EhlersDSMA( Period ) ; Plot1( DSMAValue, "DSMA" ) ; if AlertEnabled then begin if crossup(Close,DSMAValue) then Alert( "Price crossing over DSMA" ); if CrossDown(Close,DSMAValue) then Alert( "Price crossing under DSMA" ) ; end; 3 inputs: FastPeriod( 40 ), SlowPeriod( 100 ) , 시작시간(070000),종료시간(050000); variables: FastDSMAValue( 0 ), SlowDSMAValue( 0 ),Tcond(false) ; if (sdate != sdate and stime >= 시작시간) or (sdate == sdate and stime >= 시작시간 and stime[1] < 시작시간) Then Tcond = true; if (sdate != sdate and stime >= 종료시간) or (sdate == sdate and stime >= 종료시간 and stime[1] < 종료시간) Then Tcond = false; FastDSMAValue = EhlersDSMA( FastPeriod ) ; SlowDSMAValue = EhlersDSMA( SlowPeriod ) ; if tcond == true then { if crossup(FastDSMAValue,SlowDSMAValue) then buy("b",AtMarket); if CrossDown(FastDSMAValue,SlowDSMAValue) then sell("s",AtMarket); } 4 input : 시작시간(070000),종료시간(050000),n(5); var : T(0),Tcond(false); if bdate != bdate[1] Then { var1 = 0; var2 = 0; var31 = var3[1]; T = 0; } var1 = var1+(H-L); var2 = var2+1; var3 = var1/var2; if (sdate != sdate and stime >= 시작시간) or (sdate == sdate and stime >= 시작시간 and stime[1] < 시작시간) Then Tcond = true; if (sdate != sdate and stime >= 종료시간) or (sdate == sdate and stime >= 종료시간 and stime[1] < 종료시간) Then Tcond = false; if tcond == true then { if H-L >= var31*2 Then { value1 = H; value2 = L; if C > O Then T = 1; if C > O Then T = -1; } } if T == 1 and MarketPosition <= 0 Then buy("b",AtStop,value1+PriceScale*n); if T == -1 and MarketPosition >= 0 Then sell("s",AtStop,value2-PriceScale*n); if MarketPosition == 1 and T == 1 Then ExitLong("bx",AtStop,value1); if MarketPosition == -1 and T == -1 Then ExitShort("sx",AtStop,value1); 5 해당 내용은 해선 국선 구분이 없습니다. 공용으로 사용할수 있습니다. 즐거운 하루되세요 > 잡다백수 님이 쓴 글입니다. > 제목 : 문의드립니다. > 도움주시는 덕분에 도전하고 있습니다. 매번 감사합니다. 1. 코딩 변환부탁드립니다. Function: EhlersDSMA using elsystem ; inputs: Period( numericsimple ) ; variables: a1( 0 ), b1( 0 ), c1( 0 ), c2( 0 ), c3( 0 ), Zeros( 0 ), Filt( 0 ), ScaledFilt( 0 ), RMS( 0 ), count( 0 ), alpha1( 0 ), DSMA( 0 ) ; once begin if Period <= 0 then throw Exception.Create( "The 'Period' input to the " + "EhlersDSMA function must be greater than 0." ) ; //Smooth with a Super Smoother a1 = ExpValue( -1.414 * 3.14159 / ( .5 * Period ) ) ; b1 = 2 * a1 * Cosine( 1.414 * 180 / ( .5 * Period ) ) ; c2 = b1 ; c3 = -a1 * a1 ; c1 = 1 - c2 - c3 ; end ; //Produce Nominal zero mean with zeros in the transfer //response at DC and Nyquist with no spectral distortion //Nominally whitens the spectrum because of 6 dB //per octave rolloff Zeros = Close - Close[2] ; //SuperSmoother Filter Filt = c1 * ( Zeros + Zeros[1] ) / 2 + c2 * Filt[1] + c3 * Filt[2] ; //Compute Standard Deviation RMS = 0; For count = 0 to Period - 1 begin RMS = RMS + Filt[count] * Filt[count] ; end ; RMS = SquareRoot( RMS / Period ) ; //Rescale Filt in terms of Standard Deviations If RMS <> 0 then ScaledFilt = Filt / RMS ; alpha1 = AbsValue( ScaledFilt ) * 5 / Period ; DSMA = alpha1 * Close + ( 1 - alpha1 ) * DSMA[1] ; EhlersDSMA = DSMA ; 2. 코딩 변환부탁드립니다. Indicator: DSMA // TASC JUL 2018 // Ehlers DSMA inputs: Period( 40 ) ; variables: DSMAValue( 0 ) ; DSMAValue = EhlersDSMA( Period ) ; Plot1( DSMAValue, "DSMA" ) ; if AlertEnabled then begin if Close crosses over DSMAValue then Alert( "Price crossing over DSMA" ) else if Close crosses under DSMAValue then Alert( "Price crossing under DSMA" ) ; end ; 3. 코딩변환 + 해선용으로 n분부터 n분까지만 매매 코드 추가 부탁드립니다. inputs: FastPeriod( 40 ), SlowPeriod( 100 ) ; variables: FastDSMAValue( 0 ), SlowDSMAValue( 0 ) ; FastDSMAValue = EhlersDSMA( FastPeriod ) ; SlowDSMAValue = EhlersDSMA( SlowPeriod ) ; if FastDSMAValue crosses above SlowDSMAValue then Buy next bar at Market else if FastDSMAValue crosses below SlowDSMAValue then SellShort next bar at Market ; 4. 기타 -09:30~10:00 봉 가운데 -봉 길이가 -전일 봉 길이 평균의 2배이상인 봉이 나타났을 때 고저셋업 a-양봉이면 고가 + n틱에 매수진입 b-음봉이면 저가 - n틱에 매도 진입 a시 셋업 고가를 하향돌파할 때 매수 손절 청산 b시 셋업 저가를 상향돌파할 때 매도 손절 청산 5. 기타 4번 해선용으로