답변완료
수식요청합니다.
아래 시스템자료를 종목검색식으로 변환 요청합니다.
쐐기매수1 또는 삼각매수 2가지만 종목검색요청하오며, 기타 매수, 매도는 삭제 부탁드립니다.
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);
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=TotalTrades;
}
If stime<150000 then{
If TotalTrades-var50==0 then{
If Cond1==True And low>low_trendline then{
sell("쐐기매도1",Atstop,low_trendline );
}
If Cond2==True And high<high_trendline then{
buy("쐐기매수1",Atstop,high_trendline );
}
If Cond3=True And low>low_trendline And high<high_trendline then{
buy("삼각매수",Atstop,high_trendline );
sell("삼각매도",Atstop,low_trendline );
}
buy("매수",Atstop,opend(0)+var10*S1);
sell("매도",Atstop,opend(0)-var10*S1);
}
}
If stime<150000 then{
If TotalTrades-var50==1 then{
If Cond1==True And low>low_trendline then{
sell("쐐기매도2",Atstop,low_trendline );
}
If Cond2==True And high<high_trendline then{
buy("쐐기매수2",Atstop,high_trendline );
}
}
}
If MarketPosition<>0 then{
exitlong("매수추적",Atstop,highest(high,barssinceentry+1)-Atr(20)*S2);
exitshort("매도추적",Atstop,lowest(low,barssinceentry+1)+Atr(20)*S2);
}
2023-03-07
1312
글번호 166984
종목검색
답변완료
수식 검토 부탁드립니다
어제 주신 수식을 넣어보니 rsiv 오류라고 뜹니다. 검토 부탁드립니다.
...............................
안녕하세요
예스스탁입니다.
input : P1(20),P2(60),P3(120),RSIP(14);
var : mav1(0),mav2(0),mav3(0);
mav1 = ma(C,P1);
mav2 = ma(C,P2);
mav3 = ma(C,P3);
if (mav1 > mav2 and mav2 > mav3 and RSIv >= 70) or RSIV >= 75 Then
{
Sell();
}
즐거운 하루되세요
> 끄억 님이 쓴 글입니다.
> 제목 : 수식 부탁드립니다
> 20,60,120일 이동평균선이 정배열이고, rsi70 이상이면
또는
rsi75 이상이면
매도해라
부탁드립니다~
2023-03-07
975
글번호 166970
시스템