예스스탁
예스스탁 답변
2022-11-07 09:38:52
안녕하세요
예스스탁입니다.
input : StartTime(93000),EndTime(120000);
input : Period(20),dv(2);
var : Tcond(false);
var : BBup(0),BBmd(0),BBdn(0);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
Tcond = False;
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Tcond = true;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
BBup = BollBandUp(Period,dv);
BBmd = ma(c,Period);
BBdn = BollBandDown(Period,dv);
if Tcond == true Then
{
if MarketPosition <= 0 and crossup(c, bbmd) and c > o Then
{
buy("b",OnClose,Def,2);
ExitLong("bx1",AtLimit,c+PriceScale*5,"",1,1);
}
if MarketPosition >= 0 and CrossDown(c , bbmd) and C < O Then
{
Sell("s",OnClose,Def,2);
ExitShort("sx1",AtLimit,c-PriceScale*5,"",1,1);
}
if MarketPosition == 1 and highest(H,BarsSinceEntry) < EntryPrice+PriceScale*5 Then
ExitLong("bx",AtLimit,EntryPrice+PriceScale*5,"",1,1);
if MarketPosition == -1 and lowest(L,BarsSinceEntry) > EntryPrice-PriceScale*5 Then
ExitShort("sx",AtLimit,EntryPrice-PriceScale*5,"",1,1);
}
SetStopLoss(5*PriceScale, PointStop);
즐거운 하루되세요
> 신보드 님이 쓴 글입니다.
> 제목 : 수식부탁드립니다...
> 1.매수진입조건
1-1-코스피200 선물 09시30부터 적용시작 오전 12시매매 종료
-연결선물 2분봉에서 볼린저밴드 (20,2) 중심선 양봉돌파시 선물2계약 매수진입
진입시 2계약 모두 -5틱에 자동 스탑로스
1-2 청산조건
-진입후 5틱 1계약 청산
-1계약은 볼린저밴드 역돌파(음봉돌파)시 청산
2.매도진입조건
2-1-코스피200 선물 09시30부터 적용시작 오전 12시매매 종료
-연결선물 2분봉에서 볼린저밴드 (20,2) 중심선 음봉돌파시 선물2계약 매도진입
진입시 2계약 모두 -5틱에 자동 스탑로스
2-2 청산조건
-진입후 5틱 1계약 청산
-1계약은 볼린저밴드 역돌파(양봉돌파)시 청산