예스스탁
예스스탁 답변
2024-04-19 17:44:48
안녕하세요
예스스탁입니다.
1
input: ntime(21), stop(10);
var : sttime(0),hh(0),ll(0),h1(0),l1(0),hh1(0),ll1(0);
var : oo(0),r(0),v1(0),v2(0);
sttime = ntime*10000;
if (sdate != sdate[1] and stime >= sttime) or
(sdate == sdate[1] and stime >= sttime and stime[1] < sttime) Then
{
oo = o;
hh = h;
ll = l;
hh1 = hh[1];
ll1 = ll[1];
}
if hh > 0 and h > hh Then
hh = h;
if ll > 0 and l < ll Then
ll = l;
if hh1 > 0 and ll1 > 0 Then
{
r = hh1-ll1;
v1 = oo+r*0.5;
v2 = oo-r*0.5;
if CrossUp(C,v1) Then
Buy();
if CrossDown(C,v2) Then
Sell();
if (sttime == 0 and NextBarSdate != sDate) or
(sttime > 0 and NextBarStime >= sttime and sTime < sttime) Then
{
if MarketPosition == 1 Then
ExitLong();
if MarketPosition == -1 Then
ExitShort();
}
}
2
input: ntime(21), stop(10);
var : sttime(0),hh(0),ll(0),h1(0),l1(0),hh1(0),ll1(0);
var : oo(0),r(0),v1(0),v2(0);
sttime = ntime*10000;
if (sdate != sdate[1] and stime >= sttime) or
(sdate == sdate[1] and stime >= sttime and stime[1] < sttime) Then
{
oo = o;
hh = h;
ll = l;
hh1 = hh[1];
ll1 = ll[1];
}
if hh > 0 and h > hh Then
hh = h;
if ll > 0 and l < ll Then
ll = l;
if hh1 > 0 and ll1 > 0 Then
{
r = hh1-ll1;
v1 = oo+r*0.5;
v2 = oo-r*0.5;
Plot1(v1);
Plot2(v2);
}
즐거운 하루되세요
> 에구머니 님이 쓴 글입니다.
> 제목 : 수식 문의
> 차트는 1시간봉 차트.
input: time(21), stop(10);
Range = 전날 21:00 ~ 오늘 21:00 사이의 (최고점 - 최저점)
(즉, 전날 21시봉의 시가=20시봉의 종가 ~ 오늘 20시봉의 종가의 시점까지 판단.)
오늘 21시부터 매매 가능.
v1 =21시의 시가 + 0.5*Range 돌파시 매수 진입.
또는
v2 = 21시의 시가 - 0.5*Range 돌파시 매도 진입.
진입 했으면 10% 손절 또는 v1, v2가 만들어진 이후 24시간 후인, 다음날 20시봉의 종가에 청산.
감사합니다.
ps. 위의 v1과 v2를 지표식으로도 부탁드립니다.