커뮤니티

문의드립니다.

프로필 이미지
회원
2014-08-04 13:50:01
265
글번호 77364
답변완료
예스랭귀지쪽은 따로 책을 구입하지 못해 이지랭귀지쪽 책과 병행하며 공부를 하고 있습니다. 이지랭귀지쪽을 예스로 제 나름대로 변환해서 작성을 해보았는데, 정상동작하지 않는듯 하여 문의드립니다. 1. 전략 Base 1-1. 신규 (매수) 1) 설정 : 이평 / 가격 상승돌파시 설정 2) 기준 : 이전 12개봉 최고가 3) 매매 : 기준 * 103% 상승돌파시 매수 4) 기간 : 설정후 12개봉 유지 1-1. 신규 (매도) 1) 설정 : 이평 / 가격 하향이탈시 설정 2) 기준 : 이전 12개봉 최저가 3) 매매 : 기준 * 97% 하향이탈시 매도 4) 기간 : 설정후 12개봉 유지 1-2. 청산 1) 기준 : 이전 8개봉 최고 (최저) 가 2) 매매 : 최고 (최저)가 돌파시 청산 1-3. 재진입 1) 설정 : 청산 직후 2) 기준 : 이전 10개봉 최고(최저)가 3) 매매 : 최고(최저)가 돌파시 매수(매도) 4) 기간 : 설정 후 15개 봉 --------------- Easy Language Input : FL(9),SL(18),CL(12),TB(8),Ini(300),Rebars(15),Reentry(100); Vars : FMA(0), SMA(0), LPrice(0), SPrice(0), LCount(-999), SCount(-999), ReCount(0), CurrentPosition(0); // FL : 단기이평 봉개수, SL : 장기이평 봉개수, CL : 이평 교차이후 매수/매도주문 유지 봉 개수, TB : 청산주문시 최고/최저 찾기위한 봉개수, Ini : 주문수량, Rebars : 청산후 재진입 조건을 찾기위한 봉개수, Reentry : 청산후 재진입 수량 FMA : Average(Close,FL); SMA : Average(Close,SL); If FMA crosses over SMA and barnumber > 1 then Begin Lprice = highest(high,CL)*1.03; LCount = Barnumber; end; if marketposition < > 1 and barnumber < Lcount + CL then buy ("Cross over buy") ini shares next bar at LPrice Stop; if FMA crosses under SMA and barnumber > 1 then begin SPrice = lowest(low,CL)[1]*.97; SCount = Barnumber; end; if marketposition < > -1 and barnumber < Scount + CL then sell ("Cross Under buy") ini shares next bar at SPrice Stop; If marketposition = 1 then begin Lcount=-999; exitlong("longTStop") next bar at lowest(Low, TB) stop; end; if marketposition = -1 then begin SCount = -999; exitshort("shortTstop") next bar at highest(high, TB) stop; end; currentposition = marketposition; if currentposition=0 and currentposition[1]=-1 then ReCount = 1; if currentposition = 0 and currentposition[1]=1 then Recount = 1; if marketposition = 0 and marketposition(1) = 1 and ReCount < Rebars then begin ReCount = ReCount+1; buy("Long ReEntry") reentry shares next bar at highest(high,10) stop; if marketposition = 0 and marketposition(1) = -1 and ReCount < Rebars then begin ReCount = ReCoutn+1; sell("Short Reentry") reentry shares next bar at lowest(low,10) stop; end; --------------------- 변경한 Yes Language - 첨부파일1
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-08-04 17:33:46

안녕하세요 예스스탁입니다. 수식을 예스랭귀지에 맞춰 수정했습니다. Input : FL(9),SL(18),CL(12),TB(8),Ini(300),Rebars(15),Reentry(100); Vars : FMA(0), SMA(0), LPrice(0), SPrice(0); // FL : 단기이평 봉개수, SL : 장기이평 봉개수, CL : 이평 교차이후 매수/매도주문 유지 봉 개수, TB : 청산주문시 최고/최저 찾기위한 봉개수, Ini : 주문수량, Rebars : 청산후 재진입 조건을 찾기위한 봉개수, Reentry : 청산후 재진입 수량 FMA = Average(Close,FL); SMA = Average(Close,SL); If crossup(FMA,SMA) then Begin Lprice = highest(high,CL)*1.03; end; if marketposition != 1 and countif(crossup(FMA,SMA),CL) >= 1 then buy("Cross over buy",AtStop,LPrice,ini); if CrossDown(FMA,SMA) then begin SPrice = lowest(low,CL)[1]*.97; end; if marketposition != -1 and countif(CrossDown(FMA,SMA),CL) >= 1 then sell("Cross Under buy",AtStop,Sprice,ini); If marketposition == 1 then begin exitlong("longTStop",AtStop,lowest(Low, TB)); end; if marketposition == -1 then begin exitshort("shortTstop",AtStop,highest(high, TB)); end; if marketposition == 0 and marketposition(1) == 1 and BarsSinceExit(1) < Rebars then begin buy("Long ReEntry",AtStop,highest(high,10), reentry); End; if marketposition == 0 and marketposition(1) == -1 and BarsSinceExit(1) < Rebars then begin sell("Short Reentry",AtStop,lowest(low,10) , reentry); end; 해당식의 범위가 국내 선물에서는 신호가 거의 발생하지 않습니다. 이평골드시점의 최고가의 3% 이상의 가격등 국내선물의 움직임보다 큰 폭이므로 해당 부분 저절하시기 바랍니다. 옵션종목에는 적용하시면 신호보실수 있습니다. 즐거운 하루되세요 > WT_yr**** 님이 쓴 글입니다. > 제목 : 문의드립니다. > 예스랭귀지쪽은 따로 책을 구입하지 못해 이지랭귀지쪽 책과 병행하며 공부를 하고 있습니다. 이지랭귀지쪽을 예스로 제 나름대로 변환해서 작성을 해보았는데, 정상동작하지 않는듯 하여 문의드립니다. 1. 전략 Base 1-1. 신규 (매수) 1) 설정 : 이평 / 가격 상승돌파시 설정 2) 기준 : 이전 12개봉 최고가 3) 매매 : 기준 * 103% 상승돌파시 매수 4) 기간 : 설정후 12개봉 유지 1-1. 신규 (매도) 1) 설정 : 이평 / 가격 하향이탈시 설정 2) 기준 : 이전 12개봉 최저가 3) 매매 : 기준 * 97% 하향이탈시 매도 4) 기간 : 설정후 12개봉 유지 1-2. 청산 1) 기준 : 이전 8개봉 최고 (최저) 가 2) 매매 : 최고 (최저)가 돌파시 청산 1-3. 재진입 1) 설정 : 청산 직후 2) 기준 : 이전 10개봉 최고(최저)가 3) 매매 : 최고(최저)가 돌파시 매수(매도) 4) 기간 : 설정 후 15개 봉 --------------- Easy Language Input : FL(9),SL(18),CL(12),TB(8),Ini(300),Rebars(15),Reentry(100); Vars : FMA(0), SMA(0), LPrice(0), SPrice(0), LCount(-999), SCount(-999), ReCount(0), CurrentPosition(0); // FL : 단기이평 봉개수, SL : 장기이평 봉개수, CL : 이평 교차이후 매수/매도주문 유지 봉 개수, TB : 청산주문시 최고/최저 찾기위한 봉개수, Ini : 주문수량, Rebars : 청산후 재진입 조건을 찾기위한 봉개수, Reentry : 청산후 재진입 수량 FMA : Average(Close,FL); SMA : Average(Close,SL); If FMA crosses over SMA and barnumber > 1 then Begin Lprice = highest(high,CL)*1.03; LCount = Barnumber; end; if marketposition < > 1 and barnumber < Lcount + CL then buy ("Cross over buy") ini shares next bar at LPrice Stop; if FMA crosses under SMA and barnumber > 1 then begin SPrice = lowest(low,CL)[1]*.97; SCount = Barnumber; end; if marketposition < > -1 and barnumber < Scount + CL then sell ("Cross Under buy") ini shares next bar at SPrice Stop; If marketposition = 1 then begin Lcount=-999; exitlong("longTStop") next bar at lowest(Low, TB) stop; end; if marketposition = -1 then begin SCount = -999; exitshort("shortTstop") next bar at highest(high, TB) stop; end; currentposition = marketposition; if currentposition=0 and currentposition[1]=-1 then ReCount = 1; if currentposition = 0 and currentposition[1]=1 then Recount = 1; if marketposition = 0 and marketposition(1) = 1 and ReCount < Rebars then begin ReCount = ReCount+1; buy("Long ReEntry") reentry shares next bar at highest(high,10) stop; if marketposition = 0 and marketposition(1) = -1 and ReCount < Rebars then begin ReCount = ReCoutn+1; sell("Short Reentry") reentry shares next bar at lowest(low,10) stop; end; --------------------- 변경한 Yes Language - 첨부파일1