예스스탁
예스스탁 답변
2022-02-16 11:05:41
안녕하세요
예스스탁입니다.
input : n(50);
var : hh(0),ll(0),idx(0),tf(0),hh1(0),ll1(0),hh2(0),ll2(0);
var : TL1(0),TL2(0),d1(0),t1(0),TL3(0);
if Bdate != Bdate[1] Then
idx = 0;
Else
idx = idx+1;
TF = idx%n;
if Bdate != Bdate[1] or (Bdate == Bdate[1] and TF < TF[1]) Then
{
hh = h;
ll = l;
hh1 = hh[1];
ll1 = ll[1];
hh2 = hh1[1];
ll2 = ll1[1];
d1 = sDate;
t1 = sTime;
#TL_Delete(TL1);
TL1 = TL_new(d1,t1,hh,NextBarSdate,NextBarStime,hh);
#TL_Delete(TL2);
TL2 = TL_new(d1,t1,ll,NextBarSdate,NextBarStime,ll);
#TL_Delete(TL3);
TL3 = TL_new(d1,t1,(hh+ll)/2,NextBarSdate,NextBarStime,(hh+ll)/2);
}
if h > hh Then
{
hh = h;
TL_SetBegin(TL1,d1,t1,hh);
TL_SetBegin(TL3,d1,t1,(hh+ll)/2);
}
if l < ll Then
{
ll = l;
TL_SetBegin(TL2,d1,t1,ll);
TL_SetBegin(TL3,d1,t1,(hh+ll)/2);
}
TL_SetEnd(TL1,NextBarSdate,NextBarStime,hh);
TL_SetEnd(TL2,NextBarSdate,NextBarStime,ll);
TL_SetEnd(TL3,NextBarSdate,NextBarStime,(hh+ll)/2);
var1 = (hh+ll)/2;
var2 = (hh1+ll1)/2;
var3 = (hh2+ll2)/2;
if TF >= 4 and CrossUp(var1,Var2) Then
Buy();
if TF >= 4 and CrossUp(var1,ll1) Then
sell();
if TF >= 4 and CrossUp(hh,Var3) Then
sell();
if TF >= 4 and CrossUp(hh,ll2) Then
Buy();
즐거운 하루되세요
> 요타 님이 쓴 글입니다.
> 제목 : 수식 작성 요청 드립니다.(중간)
> * 항상 많은 도움에 고맙습니다.
* 아래 수식을 매매식으로 전완 좀 부탁 드립니다.
기준
1. 새로운 수평선 시작되고 4개봉이 경과힌 후에 현재 중간선이 이전 중간선 을 CrossUp 하면 매수
2. 새로운 수평선 시작되고 4개봉이 경과힌 후에 현재 중간선이 이전 하단선 을 CrossDown 하면 매도
3. 새로운 수평선 시작되고 4개봉이 경과힌 후에 현재 수평상단선이 이전전 중간선 을 CrossDown 하면 매도
4. 새로운 수평선 시작되고 4개봉이 경과힌 후에 현재 수평상단선이 이전전 하단선 을 CrossUp 하면 매수
## 아래 수식
input : n(50);
var : hh(0),ll(0),idx(0),tf(0);
var : TL1(0),TL2(0),d1(0),t1(0),TL3(0);
if Bdate != Bdate[1] Then
idx = 0;
Else
idx = idx+1;
TF = idx%n;
if Bdate != Bdate[1] or (Bdate == Bdate[1] and TF < TF[1]) Then
{
hh = h;
ll = l;
d1 = sDate;
t1 = sTime;
#TL_Delete(TL1);
TL1 = TL_new(d1,t1,hh,NextBarSdate,NextBarStime,hh);
#TL_Delete(TL2);
TL2 = TL_new(d1,t1,ll,NextBarSdate,NextBarStime,ll);
#TL_Delete(TL3);
TL3 = TL_new(d1,t1,(hh+ll)/2,NextBarSdate,NextBarStime,(hh+ll)/2);
}
if h > hh Then
{
hh = h;
TL_SetBegin(TL1,d1,t1,hh);
TL_SetBegin(TL3,d1,t1,(hh+ll)/2);
}
if l < ll Then
{
ll = l;
TL_SetBegin(TL2,d1,t1,ll);
TL_SetBegin(TL3,d1,t1,(hh+ll)/2);
}
TL_SetEnd(TL1,NextBarSdate,NextBarStime,hh);
TL_SetEnd(TL2,NextBarSdate,NextBarStime,ll);
TL_SetEnd(TL3,NextBarSdate,NextBarStime,(hh+ll)/2);
* 고맙습니다.