커뮤니티

오류가 없는것 같은데 이상합니다.

프로필 이미지
노가다9단
2012-05-03 08:29:35
345
글번호 50740
답변완료
검증이 안되고 있습니다. 아무리 찾아봐도 오류는 없는것 같은데...혹시 수정 좀 부탁드려도 되겠습니까? 번거롭게 해드려 죄송합니다. input : losslimit(0.5),profitwish(2) ; vars : line1(0),line2(0),line3(0),var1(0),var2(0),var3(0); line3 = (highd(1)+lowd(1)+closed(1))/3; line2 = line3*2-lowd(1); line1 = line3*2-highd(1); if opend(0)>closed(1) then begin var1=(highd(1)+closed(1)+lowd(1)*2)/2-lowd(1); var2=(highd(1)+closed(1)+lowd(1)*2)/2-Highd(1); end; if opend(0)<closed(1) then begin var1=(highd(1)*2+closed(1)+lowd(1))/2-lowd(1); var2=(highd(1)*2+closed(1)+lowd(1))/2-Highd(1); end; if opend(0)=closed(1) then begin var1=(highd(1)+closed(1)*2+lowd(1))/2-lowd(1); var2=(highd(1)+closed(1)*2+lowd(1))/2-Highd(1); end ; condition1 = currentbar > 1 and marketposition = 0 and date > entrydate(1); if condition1 = true and time>0930 and close cross over var1 then buy at market; if condition2 = true and time>0930 and close cross below var2 then sell at market; if marketposition = 1 then begin if close cross above line2 then exitlong("butout1") at market; if close cross below line1 then exitlong("buyout1")at market; end; if marketposition =-1 then begin if close cross below line1 then exitlong("sellout1") at market; if close cross above line2 then exitlong("sellout2") at market; end; If marketposition <> 0 then begin ExitLong("lsaexit") at EntryPrice*((100-losslimit)/100) stop; ExitShort("ssaexit") at EntryPrice*((100+losslimit)/100) stop; end; If marketposition <> 0 then begin ExitLong("lhaexit") at EntryPrice*(1+profitwish/100) limit; ExitShort("shaexit") at EntryPrice*(1-profitwish/100) limit; end; SetExitonClose;
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2012-05-03 10:47:20

안녕하세요 예스스탁입니다. 예스랭귀지로 변경한 식입니다. 타사 랭귀지나 el모드로는 답변을 드리지 않습니다. 이용에 참고하시기 바랍니다. input : losslimit(0.5),profitwish(2) ; vars : line1(0),line2(0),line3(0),var1(0),var2(0),var3(0); line3 = (highd(1)+lowd(1)+closed(1))/3; line2 = line3*2-lowd(1); line1 = line3*2-highd(1); if opend(0)>closed(1) then begin var1=(highd(1)+closed(1)+lowd(1)*2)/2-lowd(1); var2=(highd(1)+closed(1)+lowd(1)*2)/2-Highd(1); end; if opend(0)<closed(1) then begin var1=(highd(1)*2+closed(1)+lowd(1))/2-lowd(1); var2=(highd(1)*2+closed(1)+lowd(1))/2-Highd(1); end; if opend(0)==closed(1) then begin var1=(highd(1)+closed(1)*2+lowd(1))/2-lowd(1); var2=(highd(1)+closed(1)*2+lowd(1))/2-Highd(1); end ; condition1 = currentbar > 1 and marketposition == 0 and date > entrydate(1); if condition1 == true and stime>093000 and crossup(c,var1) then buy("b",AtMarket); if condition2 == true and stime>093000 and CrossDown(c,var2) then sell("s",AtMarket); if marketposition == 1 then begin if crossup(c,line2) then exitlong("butout1",atmarket); if crossdown(c,line1) then exitlong("buyout1",atmarket); end; if marketposition == -1 then begin if crossdown(c,line1) then exitlong("sellout1",atmarket); if crossup(c,line2) then exitlong("sellout2",atmarket); end; If marketposition <> 0 then begin ExitLong("lsaexit",AtStop,EntryPrice*((100-losslimit)/100)); ExitShort("ssaexit",AtStop,EntryPrice*((100+losslimit)/100)); end; If marketposition <> 0 then begin ExitLong("lhaexit" ,AtLimit,EntryPrice*(1+profitwish/100)); ExitShort("shaexit",atlimit,EntryPrice*(1-profitwish/100)); end; SetStopEndofday(150000); 즐거운 하루되세요 > 노가다9단 님이 쓴 글입니다. > 제목 : 오류가 없는것 같은데 이상합니다. > 검증이 안되고 있습니다. 아무리 찾아봐도 오류는 없는것 같은데...혹시 수정 좀 부탁드려도 되겠습니까? 번거롭게 해드려 죄송합니다. input : losslimit(0.5),profitwish(2) ; vars : line1(0),line2(0),line3(0),var1(0),var2(0),var3(0); line3 = (highd(1)+lowd(1)+closed(1))/3; line2 = line3*2-lowd(1); line1 = line3*2-highd(1); if opend(0)>closed(1) then begin var1=(highd(1)+closed(1)+lowd(1)*2)/2-lowd(1); var2=(highd(1)+closed(1)+lowd(1)*2)/2-Highd(1); end; if opend(0)<closed(1) then begin var1=(highd(1)*2+closed(1)+lowd(1))/2-lowd(1); var2=(highd(1)*2+closed(1)+lowd(1))/2-Highd(1); end; if opend(0)=closed(1) then begin var1=(highd(1)+closed(1)*2+lowd(1))/2-lowd(1); var2=(highd(1)+closed(1)*2+lowd(1))/2-Highd(1); end ; condition1 = currentbar > 1 and marketposition = 0 and date > entrydate(1); if condition1 = true and time>0930 and close cross over var1 then buy at market; if condition2 = true and time>0930 and close cross below var2 then sell at market; if marketposition = 1 then begin if close cross above line2 then exitlong("butout1") at market; if close cross below line1 then exitlong("buyout1")at market; end; if marketposition =-1 then begin if close cross below line1 then exitlong("sellout1") at market; if close cross above line2 then exitlong("sellout2") at market; end; If marketposition <> 0 then begin ExitLong("lsaexit") at EntryPrice*((100-losslimit)/100) stop; ExitShort("ssaexit") at EntryPrice*((100+losslimit)/100) stop; end; If marketposition <> 0 then begin ExitLong("lhaexit") at EntryPrice*(1+profitwish/100) limit; ExitShort("shaexit") at EntryPrice*(1-profitwish/100) limit; end; SetExitonClose;