커뮤니티
수식 부탁드립니다.
2017-08-17 15:22:01
142
글번호 112063
7시부터 16시까지에서 고가 저가를 구하고 (저가+고가/2)=중심선을 16시 이후 16~17시 사이 종
가들의 값의 평균값이 중심선위면 매수 또는 16~17사이지만 고가 뚫으면 매수
반대로 중심선 아래면 매도 또는 16~17사이지만 저가 뚫으면 매도
진입후 50틱 익절 손절은 중심선에 손절
답변 1
예스스탁 예스스탁 답변
2017-08-22 11:36:09
안녕하세요
예스스탁입니다.
Input : 당일수익틱수(80),당일손실틱수(80);
var : HH(0),LL(0),count(0),sum(0),mav(0),idx(0);
if (sdate != sdate[1] and stime >= 70000) or
(sdate == sdate[1] and stime >= 70000 and stime[1] < 70000) Then{
HH = H;
LL = L;
}
if stime >= 70000 and stime < 160000 then{
if H > HH Then
HH = H;
if L < LL Then
LL = L;
}
if (sdate != sdate[1] and stime >= 160000) or
(sdate == sdate[1] and stime >= 160000 and stime[1] < 160000) Then{
sum = 0;
idx = 0;
}
if stime >= 160000 and stime < 170000 and HH > 0 and LL > 0 then{
idx = idx+1;
sum = sum + c;
mav = sum/idx;
if crossup(c,HH) Then
buy("b");
if CrossDown(c,LL) Then{
sell("s");
}
}
if (sdate != sdate[1] and stime >= 170000) or
(sdate == sdate[1] and stime >= 170000 and stime[1] < 170000) Then{
if mav > (HH+LL)/2 and HH > 0 and LL > 0 Then
buy();
if mav < (HH+LL)/2 and HH > 0 and LL > 0 Then
sell();
}
if MarketPosition == 1 Then{
exitlong("bx1",atlimit,EntryPrice+PriceScale*50);
exitlong("bx2",AtStop,(HH+LL)/2);
}
if MarketPosition == -1 Then{
ExitShort("sx1",atlimit,EntryPrice-PriceScale*50);
ExitShort("sx2",AtStop,(HH+LL)/2);
}
즐거운 하루되세요
> 디얼디어 님이 쓴 글입니다.
> 제목 : 수식 부탁드립니다.
> 7시부터 16시까지에서 고가 저가를 구하고 (저가+고가/2)=중심선을 16시 이후 16~17시 사이 종
가들의 값의 평균값이 중심선위면 매수 또는 16~17사이지만 고가 뚫으면 매수
반대로 중심선 아래면 매도 또는 16~17사이지만 저가 뚫으면 매도
진입후 50틱 익절 손절은 중심선에 손절
다음글
이전글