커뮤니티

부탁드립니다.

프로필 이미지
양치기
2014-10-20 11:44:46
270
글번호 79545
답변완료
항상 도움 주셔서 감사합니다. 멀티차트 로직인데요.. 제가 아무리 예스로직으로 변환해도 안되네요. 아래 멀티차트 로직 예스로직으론 변환 부탁드립니다. 시스템) input : fastlen(5), slowlen(10), chlen(1), trailbar(5), initial(100), rebars(5), reentry(10) ; var : fastma(0), slowma(0), lentryprice(0), sentryprice(0), lcount(-999), scount(-999),reentrycount(0), currentposition(0); fastma = average(close,fastlen) ; slowma = average(close,slowlen) ; if fastma crosses over slowma and barnumber > 1 then begin lentryprice=highest(high,trailbar)[1] ; lcount = barnumber; end ; commentary(barnumber - lcount,lentryprice); if marketposition <> 1 and barnumber < lcount + chlen then buy("cross over buy") initial shares next bar at lentryprice stop ; if fastma crosses under slowma and barnumver > 1 then begin Sentryprice=lowest(low,trailbar)[1] ; Scount = (barnumber ; end; if marketposition <> -1 and barnumber < Scount + chlen then Sell("cross down buy") initial shares next bar at Sentryprice stop ; if marketposition == 1 then begin lcount = -999; exitlong("longTstop") next bar at lowest(low, trailbar) stop; end ; if marketposition == -1 then begin Scount = -999; exitshort("shortTstop") next bar at highest(high, trailbar) stop; end ; currentposition = marketposition ; if currentposition == 0 and currentposition[1] == -1 then reentrycount = 1 ; if currentposition == 0 and currentposition[1] == 1 then reentrycount = 1 ; if marketposition == 0 and marketposition(1) == 1 and reentrycount < rebars then begin reentrycount = reentrycount + 1 ; buy("long reentry") reentry shares next bar at highest(high, 5) stop ; if marketposition == 0 and marketposition(1) == -1 and reentrycount < rebars then begin reentrycount = reentrycount + 1 ; sell("short reentry") reentry shares next bar at lowest(low, 5) stop ; end ; 문1) 시스템 성능보고서에서 진입효율과 청산효율이 있는데 이것에 대한 함수가 있나요? 진입이후 진입효율이 떨어지면 바로 매도 하려고합니다. 도움 부탁드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-10-20 13:11:10

안녕하세요 예스스탁입니다. 1. input : fastlen(5), slowlen(10), chlen(1), trailbar(5), initial(100), rebars(5), reentry(10) ; var : fastma(0), slowma(0), lentryprice(0), sentryprice(0), lcount(-999), scount(-999),reentrycount(0), currentposition(0); fastma = ma(close,fastlen) ; slowma = ma(close,slowlen) ; if crossup(fastma,slowma) and index > 1 then begin lentryprice=highest(high,trailbar)[1] ; lcount = index; end; if marketposition <> 1 and index < lcount + chlen then buy("cross over buy",AtStop,lentryprice); if crossdown(fastma,slowma) and index > 1 then begin Sentryprice=lowest(low,trailbar)[1] ; Scount = index ; end; if marketposition <> -1 and index < Scount + chlen then Sell("cross down buy",AtStop,Sentryprice); if marketposition == 1 then begin lcount = -999; exitlong("longTstop",AtStop,lowest(low, trailbar)); end ; if marketposition == -1 then begin Scount = -999; exitshort("shortTstop",AtStop, highest(high, trailbar)); end ; currentposition = marketposition ; if currentposition == 0 and currentposition[1] == -1 then reentrycount = 1 ; if currentposition == 0 and currentposition[1] == 1 then reentrycount = 1 ; if marketposition == 0 and marketposition(1) == 1 and reentrycount < rebars then reentrycount = reentrycount + 1 ; buy("long reentry",AtStop, highest(high, 5)); if marketposition == 0 and marketposition(1) == -1 and reentrycount < rebars then reentrycount = reentrycount + 1 ; sell("short reentry",AtStop,lowest(low, 5)); 2. if MarketPosition == 1 Then{ #매수진입효율 = (진입후최고가-진입가)/(진입후최고가-진입후최저가)*100 var1 = (Highest(H,BarsSinceEntry)-EntryPrice)/(highest(H,BarsSinceEntry)-lowest(L,BarsSinceEntry))*100; } if MarketPosition == 1 Then{ #매도진입효율 = (진입가-진입후최저가)/(진입후최고가-진입후최저가)*100 var2 = (C-Lowest(L,BarsSinceEntry))/(highest(H,BarsSinceEntry)-lowest(L,BarsSinceEntry))*100; } 즐거운 하루되세요 > 양치기 님이 쓴 글입니다. > 제목 : 부탁드립니다. > 항상 도움 주셔서 감사합니다. 멀티차트 로직인데요.. 제가 아무리 예스로직으로 변환해도 안되네요. 아래 멀티차트 로직 예스로직으론 변환 부탁드립니다. 시스템) input : fastlen(5), slowlen(10), chlen(1), trailbar(5), initial(100), rebars(5), reentry(10) ; var : fastma(0), slowma(0), lentryprice(0), sentryprice(0), lcount(-999), scount(-999),reentrycount(0), currentposition(0); fastma = average(close,fastlen) ; slowma = average(close,slowlen) ; if fastma crosses over slowma and barnumber > 1 then begin lentryprice=highest(high,trailbar)[1] ; lcount = barnumber; end ; commentary(barnumber - lcount,lentryprice); if marketposition <> 1 and barnumber < lcount + chlen then buy("cross over buy") initial shares next bar at lentryprice stop ; if fastma crosses under slowma and barnumver > 1 then begin Sentryprice=lowest(low,trailbar)[1] ; Scount = (barnumber ; end; if marketposition <> -1 and barnumber < Scount + chlen then Sell("cross down buy") initial shares next bar at Sentryprice stop ; if marketposition == 1 then begin lcount = -999; exitlong("longTstop") next bar at lowest(low, trailbar) stop; end ; if marketposition == -1 then begin Scount = -999; exitshort("shortTstop") next bar at highest(high, trailbar) stop; end ; currentposition = marketposition ; if currentposition == 0 and currentposition[1] == -1 then reentrycount = 1 ; if currentposition == 0 and currentposition[1] == 1 then reentrycount = 1 ; if marketposition == 0 and marketposition(1) == 1 and reentrycount < rebars then begin reentrycount = reentrycount + 1 ; buy("long reentry") reentry shares next bar at highest(high, 5) stop ; if marketposition == 0 and marketposition(1) == -1 and reentrycount < rebars then begin reentrycount = reentrycount + 1 ; sell("short reentry") reentry shares next bar at lowest(low, 5) stop ; end ; 문1) 시스템 성능보고서에서 진입효율과 청산효율이 있는데 이것에 대한 함수가 있나요? 진입이후 진입효율이 떨어지면 바로 매도 하려고합니다. 도움 부탁드립니다.