커뮤니티

함수요청

프로필 이미지
흰둥이아빠
2020-01-13 17:19:49
158
글번호 135101
답변완료
안녕하세요? 아래 스크립트 검증 부탁드립니다. (전략과 컨셉이 상이하다면 새롭게 작성 요청드립니다.) 전략은 다음과 같습니다. 항셍지수선물 3분봉으로 거래를 하고자 하는데 T장(10:15~17:30)에서만 생성하고자 합니다. 해당봉의 저가가 볼린저밴드 상단 위에 위치해 있으면 익봉 시가 매도 해당봉의 고가가 볼린저밴드 하단 아래에 위치해 있으면 익봉 시가 매수 진입 후 종가가 볼린저밴드 중심선(20ma)을 크로스하면 익봉 시가에 청산 진입 기준으로 매매횟수가 최대 2회까지이며 17시에 시간청산하고자 합니다. input : BBP(20),dv(2); var : mav(0),bbup(0),BBdn(0),BBmd(0),entry(0); BBup = BollBandUp(BBP,dv); BBdn = BollBandDown(BBP,dv); if (sdate != sdate[1] and stime >= 101500) or (sdate != sdate[1] and stime >= 101500 and stime[1] < 101500) Then entry = 0; if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then entry = entry+1; if stime >= 101500 and stime < 170000 then { if entry < 3 and L > bbup Then sell("s"); if entry < 3 and H < bbdn Then buy("b"); if MarketPosition == 1 and Crossup(C,bbmd) Then ExitLong("bx"); if MarketPosition == -1 and Crossdown(C,bbmd) Then ExitShort("sx"); } SetStopEndofday(170000);
시스템
답변 3
프로필 이미지

예스스탁 예스스탁 답변

2020-01-13 18:51:08

안녕하세요 예스스탁입니다. input : BBP(20),dv(2),매매횟수(2); var : mav(0),bbup(0),BBdn(0),BBmd(0),entry(0); BBup = BollBandUp(BBP,dv); BBdn = BollBandDown(BBP,dv); if (sdate != sdate[1] and stime >= 101500) or (sdate != sdate[1] and stime >= 101500 and stime[1] < 101500) Then entry = 0; if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then entry = entry+1; if stime >= 101500 and stime < 170000 then { if entry < 매매횟수 and L > bbup Then sell("s",AtMarket); if entry < 매매횟수 and H < bbdn Then buy("b",AtMarket); if MarketPosition == 1 and Crossup(C,bbmd) Then ExitLong("bx",AtMarket); if MarketPosition == -1 and Crossdown(C,bbmd) Then ExitShort("sx",AtMarket); } SetStopEndofday(170000); 즐거운 하루되세요 > 흰둥이아빠 님이 쓴 글입니다. > 제목 : 함수요청 > 안녕하세요? 아래 스크립트 검증 부탁드립니다. (전략과 컨셉이 상이하다면 새롭게 작성 요청드립니다.) 전략은 다음과 같습니다. 항셍지수선물 3분봉으로 거래를 하고자 하는데 T장(10:15~17:30)에서만 생성하고자 합니다. 해당봉의 저가가 볼린저밴드 상단 위에 위치해 있으면 익봉 시가 매도 해당봉의 고가가 볼린저밴드 하단 아래에 위치해 있으면 익봉 시가 매수 진입 후 종가가 볼린저밴드 중심선(20ma)을 크로스하면 익봉 시가에 청산 진입 기준으로 매매횟수가 최대 2회까지이며 17시에 시간청산하고자 합니다. input : BBP(20),dv(2); var : mav(0),bbup(0),BBdn(0),BBmd(0),entry(0); BBup = BollBandUp(BBP,dv); BBdn = BollBandDown(BBP,dv); if (sdate != sdate[1] and stime >= 101500) or (sdate != sdate[1] and stime >= 101500 and stime[1] < 101500) Then entry = 0; if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then entry = entry+1; if stime >= 101500 and stime < 170000 then { if entry < 3 and L > bbup Then sell("s"); if entry < 3 and H < bbdn Then buy("b"); if MarketPosition == 1 and Crossup(C,bbmd) Then ExitLong("bx"); if MarketPosition == -1 and Crossdown(C,bbmd) Then ExitShort("sx"); } SetStopEndofday(170000);
프로필 이미지

흰둥이아빠

2020-01-14 07:31:27

함수검증 요청드립니다. 실제로 스크립트를 적용하게 되면 항셍지수선물 T장(10:15~17:30)에서 해당봉의 저가가 볼린저밴드 상단 위에 위치해 있으면 익봉 시가 매도신호가 해당봉의 고가가 볼린저밴드 하단 아래에 위치해 있으면 익봉 시가 매수신호가 생성되지 않습니다. > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 함수요청 > 안녕하세요 예스스탁입니다. input : BBP(20),dv(2),매매횟수(2); var : mav(0),bbup(0),BBdn(0),BBmd(0),entry(0); BBup = BollBandUp(BBP,dv); BBdn = BollBandDown(BBP,dv); if (sdate != sdate[1] and stime >= 101500) or (sdate != sdate[1] and stime >= 101500 and stime[1] < 101500) Then entry = 0; if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then entry = entry+1; if stime >= 101500 and stime < 170000 then { if entry < 매매횟수 and L > bbup Then sell("s",AtMarket); if entry < 매매횟수 and H < bbdn Then buy("b",AtMarket); if MarketPosition == 1 and Crossup(C,bbmd) Then ExitLong("bx",AtMarket); if MarketPosition == -1 and Crossdown(C,bbmd) Then ExitShort("sx",AtMarket); } SetStopEndofday(170000); 즐거운 하루되세요 > 흰둥이아빠 님이 쓴 글입니다. > 제목 : 함수요청 > 안녕하세요? 아래 스크립트 검증 부탁드립니다. (전략과 컨셉이 상이하다면 새롭게 작성 요청드립니다.) 전략은 다음과 같습니다. 항셍지수선물 3분봉으로 거래를 하고자 하는데 T장(10:15~17:30)에서만 생성하고자 합니다. 해당봉의 저가가 볼린저밴드 상단 위에 위치해 있으면 익봉 시가 매도 해당봉의 고가가 볼린저밴드 하단 아래에 위치해 있으면 익봉 시가 매수 진입 후 종가가 볼린저밴드 중심선(20ma)을 크로스하면 익봉 시가에 청산 진입 기준으로 매매횟수가 최대 2회까지이며 17시에 시간청산하고자 합니다. input : BBP(20),dv(2); var : mav(0),bbup(0),BBdn(0),BBmd(0),entry(0); BBup = BollBandUp(BBP,dv); BBdn = BollBandDown(BBP,dv); if (sdate != sdate[1] and stime >= 101500) or (sdate != sdate[1] and stime >= 101500 and stime[1] < 101500) Then entry = 0; if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then entry = entry+1; if stime >= 101500 and stime < 170000 then { if entry < 3 and L > bbup Then sell("s"); if entry < 3 and H < bbdn Then buy("b"); if MarketPosition == 1 and Crossup(C,bbmd) Then ExitLong("bx"); if MarketPosition == -1 and Crossdown(C,bbmd) Then ExitShort("sx"); } SetStopEndofday(170000);
프로필 이미지

예스스탁 예스스탁 답변

2020-01-14 09:06:07

안녕하세요 예스스탁입니다. 진입신호는 정상적으로 발생하고 있습니다. 청산신호는 중심선이 변수선언만 되고 값할당이 없어 추가했습니다. input : BBP(20),dv(2),매매횟수(2); var : mav(0),bbup(0),BBdn(0),BBmd(0),entry(0); BBmd = ma(C,BBP); BBup = BollBandUp(BBP,dv); BBdn = BollBandDown(BBP,dv); if (sdate != sdate[1] and stime >= 101500) or (sdate != sdate[1] and stime >= 101500 and stime[1] < 101500) Then entry = 0; if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then entry = entry+1; if stime >= 101500 and stime < 170000 then { if entry < 매매횟수 and L > bbup Then sell("s",AtMarket); if entry < 매매횟수 and H < bbdn Then buy("b",AtMarket); if MarketPosition == 1 and Crossup(C,bbmd) Then ExitLong("bx",AtMarket); if MarketPosition == -1 and Crossdown(C,bbmd) Then ExitShort("sx",AtMarket); } SetStopEndofday(170000); 즐거운 하루되세요 > 흰둥이아빠 님이 쓴 글입니다. > 제목 : Re : Re : 함수요청 > 함수검증 요청드립니다. 실제로 스크립트를 적용하게 되면 항셍지수선물 T장(10:15~17:30)에서 해당봉의 저가가 볼린저밴드 상단 위에 위치해 있으면 익봉 시가 매도신호가 해당봉의 고가가 볼린저밴드 하단 아래에 위치해 있으면 익봉 시가 매수신호가 생성되지 않습니다. > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 함수요청 > 안녕하세요 예스스탁입니다. input : BBP(20),dv(2),매매횟수(2); var : mav(0),bbup(0),BBdn(0),BBmd(0),entry(0); BBup = BollBandUp(BBP,dv); BBdn = BollBandDown(BBP,dv); if (sdate != sdate[1] and stime >= 101500) or (sdate != sdate[1] and stime >= 101500 and stime[1] < 101500) Then entry = 0; if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then entry = entry+1; if stime >= 101500 and stime < 170000 then { if entry < 매매횟수 and L > bbup Then sell("s",AtMarket); if entry < 매매횟수 and H < bbdn Then buy("b",AtMarket); if MarketPosition == 1 and Crossup(C,bbmd) Then ExitLong("bx",AtMarket); if MarketPosition == -1 and Crossdown(C,bbmd) Then ExitShort("sx",AtMarket); } SetStopEndofday(170000); 즐거운 하루되세요 > 흰둥이아빠 님이 쓴 글입니다. > 제목 : 함수요청 > 안녕하세요? 아래 스크립트 검증 부탁드립니다. (전략과 컨셉이 상이하다면 새롭게 작성 요청드립니다.) 전략은 다음과 같습니다. 항셍지수선물 3분봉으로 거래를 하고자 하는데 T장(10:15~17:30)에서만 생성하고자 합니다. 해당봉의 저가가 볼린저밴드 상단 위에 위치해 있으면 익봉 시가 매도 해당봉의 고가가 볼린저밴드 하단 아래에 위치해 있으면 익봉 시가 매수 진입 후 종가가 볼린저밴드 중심선(20ma)을 크로스하면 익봉 시가에 청산 진입 기준으로 매매횟수가 최대 2회까지이며 17시에 시간청산하고자 합니다. input : BBP(20),dv(2); var : mav(0),bbup(0),BBdn(0),BBmd(0),entry(0); BBup = BollBandUp(BBP,dv); BBdn = BollBandDown(BBP,dv); if (sdate != sdate[1] and stime >= 101500) or (sdate != sdate[1] and stime >= 101500 and stime[1] < 101500) Then entry = 0; if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then entry = entry+1; if stime >= 101500 and stime < 170000 then { if entry < 3 and L > bbup Then sell("s"); if entry < 3 and H < bbdn Then buy("b"); if MarketPosition == 1 and Crossup(C,bbmd) Then ExitLong("bx"); if MarketPosition == -1 and Crossdown(C,bbmd) Then ExitShort("sx"); } SetStopEndofday(170000);