커뮤니티
메일답변..
2004-06-18 13:58:36
949
글번호 4138
안녕하세요..메일로 보내지지 않아서 게시판에 올려 놓습니다.
[시스템식]
input : N(20);
var: 단기스톡_k(0),단기스톡_d(0),장기스톡_k(0),장기스톡_d(0);
var: ma5(0),ma20(0), ma40(0), ma60(0),ma120(0);
var: 고가라인(0),저가라인(0),중심라인(0),기준시간(0);
var : buyVal(0), bhigh(0), buyidx(0), cnt(0), bcond(0), sellval(0), sellidx(0), scond(0), preScond(0);
if date != date[1] then {cnt = 0; bcond = 0; scond = 0; preScond = scond[1];}
단기스톡_k = StochasticsK(20,5); 단기스톡_d = StochasticsD(20,5,5);
장기스톡_k = StochasticsK(60,7); 장기스톡_d = StochasticsD(60,7,7);
ma5 = ma(c,5); ma20 = ma(c,20); ma40 = ma(C,40); ma60 = ma(c,60); ma120 = ma(c,120);
기준시간 = stime>93500 && stime<143000 ; 고가라인 = timehigh(90000,93000);
저가라인 = timelow(90000,93000); 중심라인 = (timehigh(90000,93000)+timelow(90000,93000))/2 ;
if 기준시간 and cnt < 2 then { //매매횟수 2회로 제한
if CrossUp(C,고가라인) then {buy("고가돌파"); buyVal = C; bhigh = H; buyidx = accum(1); cnt = cnt + 1; bcond = 1;}//1번매수식
if CrossUp(C,중심라인) then {buy("중심돌파"); buyVal = C; buyidx = accum(1); cnt = cnt + 1; bcond = 2;}//2번매수식
if CrossDown(C,중심라인) then {sell("지지대붕괴"); sellVal = C; sellidx = accum(1); cnt = cnt + 1; scond = 1;}//1번매도식
if min(ma5, ma20, ma40) >= EnvelopeDown(120,0.2) && max(ma5, ma20, ma40) <= Envelopeup(120,0.2) && //2번매도식
CrossDown(c, EnvelopeDown(120,0.2)) && O > C && C < ma5 && C < ma20 then
{sell("이평수렴매도") ; sellVal = C; sellidx = accum(1); cnt = cnt + 1; scond = 2; }
}
if CrossUp(C,고가라인) then exitshort("고가돌파청산");
if CrossUp(C,중심라인) then exitshort("중심라인상향");
if CrossDown(C,중심라인) then exitlong("중심라인하향");
if min(ma5, ma20, ma40) >= EnvelopeDown(120,0.2) && max(ma5, ma20, ma40) <= Envelopeup(120,0.2) &&
CrossDown(c, EnvelopeDown(120,0.2)) && O > C && C < ma5 && C < ma20 then
exitlong("2번청산");
if bCond == 1 and C > buyVal + 1 and CrossDown(ma5,ma20) then exitlong("1"); //[질문-1]
if bCond == 1 and accum(1) > buyidx+12 and C < bhigh then exitlong("2"); //[질문-2]
if bCond == 2 and highest(H,accum(1)-buyidx) > 고가라인 and CrossDown(C, 고가라인-0.3) then exitlong("3");//[질문-3]
if sCond == 1 and lowest(L,accum(1)-sellidx) < 저가라인 and CrossUp(C, 저가라인) and 단기스톡_k > 단기스톡_d then exitshort("4");//[질문-4]
if preScond == 2 and dayOpen(0) < dayClose(1)-1 and C > H[dayindex()] then exitshort("5-1"); //[질문-5]-1
if sCond == 2 and accum(1) > sellidx+10 and C > Envelopeup(120,0.2) and C > L[accum(1)-sellidx] then exitshort("5-2"); //[질문-5]-2
if sCond == 2 and accumN(crossup(ma5,ma20),N)>=2 and crossup(ma5,ma20) and C > ma5 then exitshort("5-3");//[질문-5]-3
if SCond == 2 and accum(1) > sellidx+5 and EnvelopeDown(20,0.2) > EnvelopeDown(20,0.2)[1] and C > EnvelopeDown(20,0.2) then exitshort("5-4");//[질문-5]-4
if Scond == 2 and accum(1) < sellidx+5 and CrossUp(C, highest(H,5)[1]) then exitshort("5-5");//[질문-5]-5
답변 0
다음글
이전글