예스스탁
예스스탁 답변
2023-03-08 15:33:50
안녕하세요
예스스탁입니다.
Input: len(8), s1(0.37), s2(2.7);
var : slv1(0),slv2(0),slb1(0),slb2(0),shv1(0),shv2(0),shb1(0),shb2(0);
var : low_trendline(0),low_radian(0),high_trendline(0),high_radian(0);
var : Cond1(false),Cond2(false),Cond3(false),T(0);
slv1=SwingLow(1,low,len,len,100);
slv2=SwingLow(2,low,len,len,100);
slb1=SwingLowBar(1,low,len,len,100);
slb2=SwingLowBar(2,low,len,len,100);
shv1=SwingHigh(1,high,len,len,100);
shv2=SwingHigh(2,high,len,len,100);
shb1=SwingHighBar(1,high,len,len,100);
shb2=SwingHighbar(2,high,len,len,100);
If slb2 > slb1 then{
low_trendline =(slv1-slv2)/(slb2-slb1)*slb1+slv1;
low_radian=(((slv1-slv2)/slv2)*100)/(slb2-slb1);
}
If shb2>shb1 then{
high_trendline =(shv1-shv2)/(shb2-shb1)*shb1+shv1;
high_radian=(((shv1-shv2)/shv2)*100)/(shb2-shb1);
}
Var1=round(atan(low_radian)*180/pie,2);
Var2=round(atan(high_radian)*180/pie,2);
If Var1>0 And Var2>0 And Var1>var2 And high_trendline>low_trendline then# '상향쐐기형
Cond1=True;
Else
Cond1=False;
If Var1<0 And Var2<0 And Var1>var2 And high_trendline > low_trendline then# '하향쐐기형
Cond2=True;
Else
Cond2=False;
If Var1>0 And Var2<0 And high_trendline>low_trendline then# '삼각형
Cond3=True;
Else
Cond3=False;
Var10=highd(1)-lowd(1);
If sdate<>sdate[1] then
{
T = 0;
}
If stime<150000 then
{
If Cond1==True And L <= low_trendline and low[1]>low_trendline[1] and Bdate == Bdate[1] then
{
T = -1;
}
If Cond2==True And H >= high_trendline and high[1] < high_trendline[1] and Bdate == Bdate[1] then
{
T = 1;
}
If Cond3=True And low[1]>low_trendline[1] And high[1]<high_trendline[1] then
{
if H >= high_trendline Then
{
T = 1;
Find(1);
}
if L <= Low_trendline Then
{
T = -1;
}
}
if H >= OpenD(0)+Var10*s1 and Bdate == Bdate[1] Then
{
T = 1;
}
if L <= opend(0)-var10*S1 and Bdate == Bdate[1] Then
{
T = -1;
}
}
즐거운 하루되세요
> 구호리 님이 쓴 글입니다.
> 제목 : 수식요청합니다.
> 수식에서 쐐기매수1과 삼각매수는 당일 첫진입일경우만 발생한다고 답변받았습니다.
쐐기매수1은 제외 부탁드리며(삼각매수만 검색요청)
첫번째 조건만족했을때 뿐만 아니라 조건만족 할때마다 종목검색 요청합니다.
Input: len(8), s1(0.37), s2(2.7);
var : slv1(0),slv2(0),slb1(0),slb2(0),shv1(0),shv2(0),shb1(0),shb2(0);
var : low_trendline(0),low_radian(0),high_trendline(0),high_radian(0);
var : Cond1(false),Cond2(false),Cond3(false),T(0);
slv1=SwingLow(1,low,len,len,100);
slv2=SwingLow(2,low,len,len,100);
slb1=SwingLowBar(1,low,len,len,100);
slb2=SwingLowBar(2,low,len,len,100);
shv1=SwingHigh(1,high,len,len,100);
shv2=SwingHigh(2,high,len,len,100);
shb1=SwingHighBar(1,high,len,len,100);
shb2=SwingHighbar(2,high,len,len,100);
If slb2 > slb1 then{
low_trendline =(slv1-slv2)/(slb2-slb1)*slb1+slv1;
low_radian=(((slv1-slv2)/slv2)*100)/(slb2-slb1);
}
If shb2>shb1 then{
high_trendline =(shv1-shv2)/(shb2-shb1)*shb1+shv1;
high_radian=(((shv1-shv2)/shv2)*100)/(shb2-shb1);
}
Var1=round(atan(low_radian)*180/pie,2);
Var2=round(atan(high_radian)*180/pie,2);
If Var1>0 And Var2>0 And Var1>var2 And high_trendline>low_trendline then# '상향쐐기형
Cond1=True;
Else
Cond1=False;
If Var1<0 And Var2<0 And Var1>var2 And high_trendline > low_trendline then# '하향쐐기형
Cond2=True;
Else
Cond2=False;
If Var1>0 And Var2<0 And high_trendline>low_trendline then# '삼각형
Cond3=True;
Else
Cond3=False;
Var10=highd(1)-lowd(1);
If sdate<>sdate[1] then
{
Var50=0;
T = 0;
}
If stime<150000 then
{
If var50==0 and Cond1==True And L <= low_trendline and low[1]>low_trendline[1] and Bdate == Bdate[1] then
{
Var50=var50+1;
T = -1;
}
If var50==0 and Cond2==True And H >= high_trendline and high[1] < high_trendline[1] and Bdate == Bdate[1] then
{
T = 1;
Var50=var50+1;
Find(1);
}
If Cond3=True And low[1]>low_trendline[1] And high[1]<high_trendline[1] then
{
if var50==0 and H >= high_trendline Then
{
T = 1;
Var50=var50+1;
Find(1);
}
if var50==0 and L <= Low_trendline Then
{
T = -1;
Var50=var50+1;
}
}
if var50==0 and H >= OpenD(0)+Var10*s1 and Bdate == Bdate[1] Then
{
T = 1;
Var50=var50+1;
}
if var50==0 and L <= opend(0)-var10*S1 and Bdate == Bdate[1] Then
{
T = -1;
Var50=var50+1;
}
}