커뮤니티

수식부탁드립니다-----

프로필 이미지
leekss1
2011-08-16 12:28:54
489
글번호 41905
답변완료
INPUT: 테마기간(0),채널기간(0),수평(0),이익(0),손절(0),전봉차(0),진입가(0),Per1(0.0),X1(30); VAR : TCHAN(0), BCHAN(0), aa(0), bb(0), highV(0), LowV(0); TCHAN = HIGHEST(HIGH, 채널기간)[1]; BCHAN = LOWEST(LOW, 채널기간)[1]; var77 = (3 * Ema(c,테마기간)) - (3 * Ema(Ema(c,테마기간),테마기간)) + (Ema(Ema(Ema(c,테마기간),테마기간),테마기간)); Condition1 = highest(h,x1) >= lowest(L,x1)*(1+(Per1/100)); if stime >= 090100 then { #매수 if MarketPosition == 0 and stime < 150000 and Condition1 then { if var77 >= var77[1]+전봉차 and CountIF(Tchan==Tchan[1],수평) == 수평 Then aa = TCHAN + PriceScale*진입가; buy("매수",atstop, aa); } highV = highest(H,BarsSinceEntry); if MarketPosition == 1 Then { ExitLong("수익", atlimit, entryPrice+PriceScale*이익); #exitlong("EL",atstop,highV-ATR(6)*AtrMult); #exitlong("수추적",atstop,highest(high,BarsSinceEntry(0)+1)-ATR(atrlength)*mult); exitlong("bxxxxx",atstop,entryPrice-PriceScale*손절); } if MarketPosition == 1 or var77 < var77[1] Then aa = 999999; #매도 if MarketPosition == 0 and stime < 150000 then { if var77 <= var77[1]-전봉차 and CountIF(Bchan==Bchan[1],수평) == 수평 Then bb = BCHAN - PriceScale*진입가; sell("매도",atstop, bb); } LowV = Lowest(L,BarsSinceEntry); if MarketPosition == -1 Then { ExitShort("도익", atlimit, entryPrice-PriceScale*이익); #exitshort("ES",atstop,LowV+ATR(6)*AtrMult); #exitlong("도추적",atstop,Lowest(low,BarsSinceEntry(0)+1)+ATR(atrlength)*mult); exitshort("sxxxxx",atstop,entryPrice+PriceScale*손절); } if MarketPosition == -1 or var77 > var77[1] Then bb = 0.000001; } //시간청산-------------------- var11 = int(date/100)-int(date/10000)*100; //월 var22 = date - int(date/100)*100; //일 var33 = DayOfWeek(date); //요일 if var11%3 == 0 and var22 >= 8 and var22 <= 14 and var33 == 4 then { SetStopEndofday(144800); //만 } else { SetStopEndofday(150100); //평 } 위식에 price channel 의 top 과 bot의 값이 현재가의 0.5% 미만이거나 top 과 bot의 간격이 5봉이상 같으면 진입금지 해주세요 감사합니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2011-08-16 14:03:59

안녕하세요 예스스탁입니다. INPUT: 테마기간(0),채널기간(0),수평(0),이익(0),손절(0),전봉차(0),진입가(0),Per1(0.0),X1(30); VAR : TCHAN(0), BCHAN(0), aa(0), bb(0), highV(0), LowV(0); TCHAN = HIGHEST(HIGH, 채널기간)[1]; BCHAN = LOWEST(LOW, 채널기간)[1]; var77 = (3 * Ema(c,테마기간)) - (3 * Ema(Ema(c,테마기간),테마기간)) + (Ema(Ema(Ema(c,테마기간),테마기간),테마기간)); value99 = TCHAN-BCHAN; Condition1 = highest(h,x1) >= lowest(L,x1)*(1+(Per1/100)); Condition2 = TCHAN >= C*1.005 and BCHAN <= C*0.995 and countif(value99 != value99[1],5) >= 1; if stime >= 090100 then { #매수 if MarketPosition == 0 and stime < 150000 and Condition1 and Condition2 then { if var77 >= var77[1]+전봉차 and CountIF(Tchan==Tchan[1],수평) == 수평 Then aa = TCHAN + PriceScale*진입가; buy("매수",atstop, aa); } highV = highest(H,BarsSinceEntry); if MarketPosition == 1 Then { ExitLong("수익", atlimit, entryPrice+PriceScale*이익); #exitlong("EL",atstop,highV-ATR(6)*AtrMult); #exitlong("수추적",atstop,highest(high,BarsSinceEntry(0)+1)-ATR(atrlength)*mult); exitlong("bxxxxx",atstop,entryPrice-PriceScale*손절); } if MarketPosition == 1 or var77 < var77[1] Then aa = 999999; #매도 if MarketPosition == 0 and stime < 150000 and Condition2 then { if var77 <= var77[1]-전봉차 and CountIF(Bchan==Bchan[1],수평) == 수평 Then bb = BCHAN - PriceScale*진입가; sell("매도",atstop, bb); } LowV = Lowest(L,BarsSinceEntry); if MarketPosition == -1 Then { ExitShort("도익", atlimit, entryPrice-PriceScale*이익); #exitshort("ES",atstop,LowV+ATR(6)*AtrMult); #exitlong("도추적",atstop,Lowest(low,BarsSinceEntry(0)+1)+ATR(atrlength)*mult); exitshort("sxxxxx",atstop,entryPrice+PriceScale*손절); } if MarketPosition == -1 or var77 > var77[1] Then bb = 0.000001; } //시간청산-------------------- var11 = int(date/100)-int(date/10000)*100; //월 var22 = date - int(date/100)*100; //일 var33 = DayOfWeek(date); //요일 if var11%3 == 0 and var22 >= 8 and var22 <= 14 and var33 == 4 then { SetStopEndofday(144800); //만 } else { SetStopEndofday(150100); //평 } 즐거운 하루되세요 > leekss1 님이 쓴 글입니다. > 제목 : 수식부탁드립니다----- > INPUT: 테마기간(0),채널기간(0),수평(0),이익(0),손절(0),전봉차(0),진입가(0),Per1(0.0),X1(30); VAR : TCHAN(0), BCHAN(0), aa(0), bb(0), highV(0), LowV(0); TCHAN = HIGHEST(HIGH, 채널기간)[1]; BCHAN = LOWEST(LOW, 채널기간)[1]; var77 = (3 * Ema(c,테마기간)) - (3 * Ema(Ema(c,테마기간),테마기간)) + (Ema(Ema(Ema(c,테마기간),테마기간),테마기간)); Condition1 = highest(h,x1) >= lowest(L,x1)*(1+(Per1/100)); if stime >= 090100 then { #매수 if MarketPosition == 0 and stime < 150000 and Condition1 then { if var77 >= var77[1]+전봉차 and CountIF(Tchan==Tchan[1],수평) == 수평 Then aa = TCHAN + PriceScale*진입가; buy("매수",atstop, aa); } highV = highest(H,BarsSinceEntry); if MarketPosition == 1 Then { ExitLong("수익", atlimit, entryPrice+PriceScale*이익); #exitlong("EL",atstop,highV-ATR(6)*AtrMult); #exitlong("수추적",atstop,highest(high,BarsSinceEntry(0)+1)-ATR(atrlength)*mult); exitlong("bxxxxx",atstop,entryPrice-PriceScale*손절); } if MarketPosition == 1 or var77 < var77[1] Then aa = 999999; #매도 if MarketPosition == 0 and stime < 150000 then { if var77 <= var77[1]-전봉차 and CountIF(Bchan==Bchan[1],수평) == 수평 Then bb = BCHAN - PriceScale*진입가; sell("매도",atstop, bb); } LowV = Lowest(L,BarsSinceEntry); if MarketPosition == -1 Then { ExitShort("도익", atlimit, entryPrice-PriceScale*이익); #exitshort("ES",atstop,LowV+ATR(6)*AtrMult); #exitlong("도추적",atstop,Lowest(low,BarsSinceEntry(0)+1)+ATR(atrlength)*mult); exitshort("sxxxxx",atstop,entryPrice+PriceScale*손절); } if MarketPosition == -1 or var77 > var77[1] Then bb = 0.000001; } //시간청산-------------------- var11 = int(date/100)-int(date/10000)*100; //월 var22 = date - int(date/100)*100; //일 var33 = DayOfWeek(date); //요일 if var11%3 == 0 and var22 >= 8 and var22 <= 14 and var33 == 4 then { SetStopEndofday(144800); //만 } else { SetStopEndofday(150100); //평 } 위식에 price channel 의 top 과 bot의 값이 현재가의 0.5% 미만이거나 top 과 bot의 간격이 5봉이상 같으면 진입금지 해주세요 감사합니다