커뮤니티

안녕하세요?

프로필 이미지
jwkim
2012-05-02 20:13:34
446
글번호 50728
답변완료
24230, 24238 질문한 사람입니다. 아래와같이 주어주신 시스템을 넣어봐도 변화가 없습니다. var :buyindex(0), sellindex(0); if Crossup(c,highest(h,index-sellindex)-0.51) && highest(H,BarsSinceExit())-0.5 && (c>EntryPrice()+0.0 or c<EntryPrice()-0.47) then {sell("1");buyindex=index;} if Crossdown(c,lowest(l,index-buyindex)+0.51) && lowest(L,BarsSinceExit())+0.5 && (c>EntryPrice(0)+0.47 or c<EntryPrice()-0.0) then {buy("2");buyindex=index;} if (c<highest(h,index-buyindex)-1.01)&& highest(H,BarsSinceExit())-0.5 && c<EntryPrice() then {sell("3");buyindex=index;} if (c>lowest(l,index-buyindex)+1.01) && lowest(L,BarsSinceExit())+0.5 && c>EntryPrice() then {buy("4");buyindex=index;} 에를들어 자세한 답변 기다리겠습니다. 감사합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2012-05-03 09:22:55

안녕하세요 예스스탁입니다. 1. BarsSinceExit은 청산후 봉수이므로 최소인자값이 1부터 시작합니다. BarsSinceExit(1) 도움말 참고하시기 바랍니다. https://www.yesstock.com/YesTrader/YesLanguage/YesLanguage_help/3_7_6_14_BarsSinceExit.htm 2. 현재작성하신 조건상 && highest(H,BarsSinceExit(1))-0.5 && 조건식이 아닙니다. 단지 청산이후의 최고가에서 0.5를 뺀값인데 어떤 값과 비교하는 내용이 없습니다. 다른 조건 내용과 비교해 보시면 다른 조건은 모두 어떤 값들과 비교해서 크거나 작거나 돌파하거나의 내요인데 위 내용은 단지 값만 있습니다. 아래와 같이 종가가 청산이후의 최고가보다 작다라든가 하는 조건내용으로 사용하셔야 합니다. C <= highest(H,BarsSinceExit(1))-0.5 3. 현재 식상 전체 차트 중 첫번째로 발생할 때 조건내용이 없습니다. 차트에서 첫진입은 직전에 청산이 없으으로 highest(H,BarsSinceExit(1))-0.5와 같은 내용은 첫진입에서는 의미가 없는 내용이며 당연히 현재 무포지션 상태에서 발생하므로 진입이 없으므로 EntryPrice()도 0일 뿐입니다. 즉 무포지션 상태에서 발생되는 내용이 없습니다. 4 각 매도와 매수 진입식에 위와 같은 내용은 감안이 되지 않고 작성되어 있습니다. 식내용상 어떤 내용을 구현하시고자 하시는지 식만으로는 정확히 모르겠습니다. 즐거운 하루되세요 > jwkim 님이 쓴 글입니다. > 제목 : 안녕하세요? > 24230, 24238 질문한 사람입니다. 아래와같이 주어주신 시스템을 넣어봐도 변화가 없습니다. var :buyindex(0), sellindex(0); if Crossup(c,highest(h,index-sellindex)-0.51) && highest(H,BarsSinceExit())-0.5 && (c>EntryPrice()+0.0 or c<EntryPrice()-0.47) then {sell("1");buyindex=index;} if Crossdown(c,lowest(l,index-buyindex)+0.51) && lowest(L,BarsSinceExit())+0.5 && (c>EntryPrice(0)+0.47 or c<EntryPrice()-0.0) then {buy("2");buyindex=index;} if (c<highest(h,index-buyindex)-1.01)&& highest(H,BarsSinceExit())-0.5 && c<EntryPrice() then {sell("3");buyindex=index;} if (c>lowest(l,index-buyindex)+1.01) && lowest(L,BarsSinceExit())+0.5 && c>EntryPrice() then {buy("4");buyindex=index;} 에를들어 자세한 답변 기다리겠습니다. 감사합니다.