예스스탁
예스스탁 답변
2020-05-25 13:13:41
안녕하세요
예스스탁입니다.
1번식은 갭상승이나 갭하락으로 시작한 경우에만 신호가 발생합니다.
2번식은 고가값이나 저가값을 상향돌파 하향이탈할때 신호가 발생하는 식입니다.
1
input : StartTime(80000),EndTime(060000);
var : T(0),s(0),hh(0),ll(0),h1(0),l1(0);
if (sdate != sdate[1] and stime >= 101500) or
(sdate == sdate[1] and stime >= 101500 and stime[1] < 101500) Then
{
hh = h;
ll = l;
h1 = hh[1];
l1 = ll[1];
t = 0;
if o > h1 then
T = 1;
if O < l1 Then
t = -1;
}
if (sdate != sdate[1] and stime >= 140000) or
(sdate == sdate[1] and stime >= 140000 and stime[1] < 140000) Then
{
h1 = hh[1];
l1 = ll[1];
s = 0;
if o > h1 then
s = 1;
if O < l1 Then
s = -1;
}
if h > hh Then
hh = h;
if l < ll Then
ll = l;
if stime >= 101500 and stime < 125500 then
{
if t == 1 and CrossDown(c,h1) Then
{
t = 2;
sell("AS");
}
if t == -1 and CrossUp(c,l1) Then
{
t = -2;
buy("AB");
}
}
if nextbarstime >= 125500 and stime < 125500 then
{
if MarketPosition == 1 Then
exitlong();
if MarketPosition == -1 Then
ExitShort();
}
if stime >= 140000 and stime < 172500 then
{
if s == 1 and CrossDown(c,h1) Then
{
s = 2;
sell("BS");
}
if s == -1 and CrossUp(c,l1) Then
{
s = -2;
buy("BB");
}
}
if nextbarstime >= 172500 and stime < 172500 then
{
if MarketPosition == 1 Then
exitlong();
if MarketPosition == -1 Then
ExitShort();
}
SetStopLoss(PriceScale*10,PointStop);
2
input : StartTime(80000),EndTime(060000);
var : T(0),s(0),hh(0),ll(0),h1(0),l1(0);
if (sdate != sdate[1] and stime >= 101500) or
(sdate == sdate[1] and stime >= 101500 and stime[1] < 101500) Then
{
hh = h;
ll = l;
h1 = hh[1];
l1 = ll[1];
t = 0;
}
if (sdate != sdate[1] and stime >= 140000) or
(sdate == sdate[1] and stime >= 140000 and stime[1] < 140000) Then
{
h1 = hh[1];
l1 = ll[1];
s = 0;
}
if h > hh Then
hh = h;
if l < ll Then
ll = l;
if stime >= 101500 and stime < 125500 then
{
if t == 0 and CrossDown(c,h1) Then
{
t = 1;
sell("AS");
}
if t == 0 and CrossUp(c,l1) Then
{
t = -1;
buy("AB");
}
}
if nextbarstime >= 125500 and stime < 125500 then
{
if MarketPosition == 1 Then
exitlong();
if MarketPosition == -1 Then
ExitShort();
}
if stime >= 140000 and stime < 172500 then
{
if s == 0 and CrossDown(c,h1) Then
{
s = 1;
sell("BS");
}
if s == 0 and CrossUp(c,l1) Then
{
s = -1;
buy("BB");
}
}
if nextbarstime >= 172500 and stime < 172500 then
{
if MarketPosition == 1 Then
exitlong();
if MarketPosition == -1 Then
ExitShort();
}
SetStopLoss(PriceScale*10,PointStop);
즐거운 하루되세요
> 즐겁게 님이 쓴 글입니다.
> 제목 : 질문 올립니다.
> 안녕하세요. 늘 감사드립니다.
항셍 시초가 매매에 관한 코딩 부탁 드리고 싶습니다.
A. 오전.
1. 매도
1) 진입
항셍 아침 개장 10:15에 전일 고가보다 높게 갶 상승으로 시작한 경우,
가격이 하락하면서 전일 고가를 위에서 밑으로 이탈할 때 매도 진입.
(10:15~12:55 사이에 매도 최대 1회 진입. 조건 안 맞으면 진입 안 함)
2) 청산
초기 손절은 진입가에서 10틱.
손절이 발생치 않으면 12:55에 청산 (13:00에 점심 휴장이 시작되므로 그 5분전에 청산하려는 것임)
2. 매수
1) 진입
항셍 아침 개장 10:15에 전일 저가보다 낮게 갶 하락으로 시작한 경우,
가격이 상승하면서 전일 저가를 밑에서 위로 돌파할 때 매수 진입.
(10:15~12:55 사이에 매수 최대 1회 진입. 조건 안 맞으면 진입 안 함)
2) 청산
초기 손절은 진입가에서 10틱.
손절이 발생치 않으면 12:55에 청산 (13:00에 점심 휴장이 시작되므로 그 5분전에 청산하려는 것임)
B. 오후.
점심 시간 지난 후 14:00에 새로 개장하면 위와 비슷하게 진행.
즉
1. 매도
1) 진입
10:15~13:00 사이의 최고가보다 높게 갶상승했으면,
가격이 내려 오면서 이 최고가를 하향 이탈할 때 매도 진입.
(14:00~17:25 사이에 매도 최대 1회 진입. 조건 안 맞으면 진입 안 함)
2) 청산
초기 손절은 진입가에서 10틱.
손절이 발생치 않으면 17:25에 청산 (17:30에 장 종료 하므로, 그 5분전에 청산하려는 것임)
2. 매수
1) 진입
10:15~13:00 사이의 최저가보다 낮게 갶하락했으면,
가격이 올라 가면서 이 최저가를 상향 돌파할 때 매수 진입.
(14:00~17:25 사이에 매수 최대 1회 진입. 조건 안 맞으면 진입 안 함)
2) 청산
초기 손절은 진입가에서 10틱.
손절이 발생치 않으면 17:25에 청산 (17:30에 장 종료 하므로, 그 5분전에 청산하려는 것임)
대단히 감사합니다!