예스스탁
예스스탁 답변
2024-09-19 08:50:12
안녕하세요
예스스탁입니다.
input : BBP(20),dv(2),ntime1(60),P1(10),ntime2(30);
var : S1(0),D1(0),TM(0),TF(0),cnt(0),TF2(0),O2(0),C2(0);
var : sum1(0),mav1(0),bbup(0),bbdn(0),mav(0);
Array : CC[70](0);
mav = ma(C,BBP);
bbup = BollBandUp(BBP,dv);
bbdn = BollBandDown(BBP,dv);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF = TM%ntime1;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime1 > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and ntime1 > 1 and TM >= TM[1]+ntime1) or
(Bdate == Bdate[1] and ntime1 == 1 and TM > TM[1]) Then
{
for cnt = 99 downto 1
{
CC[cnt] = CC[cnt-1];
}
}
CC[0] = C;
TF2 = TM%ntime2;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime2 > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and ntime2 > 1 and TM >= TM[1]+ntime2) or
(Bdate == Bdate[1] and ntime2 == 1 and TM > TM[1]) Then
{
O2 = O;
}
C2 = C;
if CC[P1-1] > 0 then
{
sum1 = 0;
for cnt = 0 to P1-1
{
sum1 = sum1+CC[cnt];
}
mav1 = sum1/P1;
if MarketPosition <= 0 and CrossUp(c,mav) and CountIf(CrossDown(c,mav),30) >= 1 and
C > O and C > mav1 and C2 > O2 Then
Buy();
if MarketPosition == 1 and CountIf(H>=bbup,BarsSinceEntry) >= 1 and CrossDown(c,ma(C,10)) Then
ExitLong();
if MarketPosition >= 0 and CrossDown(c,mav) and CountIf(CrossUp(c,mav),30) >= 1 and
C < O and C < mav1 and C2 < O2 Then
Sell();
if MarketPosition == -1 and CountIf(L<=bbdn,BarsSinceEntry) >= 1 and CrossUp(c,ma(C,10)) Then
ExitShort();
}
}
즐거운 하루되세요
> 아트정 님이 쓴 글입니다.
> 제목 : 수식추가
> input : BBP(20),dv(2),ntime1(60),P1(10);
var : S1(0),D1(0),TM(0),TF(0),cnt(0);
var : sum1(0),mav1(0),bbup(0);
Array : CC[70](0);
var1 = ma(C,BBP);
bbup = BollBandUp(BBP,dv);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF = TM%ntime1;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime1 > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and ntime1 > 1 and TM >= TM[1]+ntime1) or
(Bdate == Bdate[1] and ntime1 == 1 and TM > TM[1]) Then
{
for cnt = 99 downto 1
{
CC[cnt] = CC[cnt-1];
}
}
CC[0] = C;
if CC[P1-1] > 0 then
{
sum1 = 0;
for cnt = 0 to P1-1
{
sum1 = sum1+CC[cnt];
}
mav1 = sum1/P1;
if CrossUp(c,var1) and CountIf(CrossDown(c,var1),30) >= 1 and
C > O and C > mav1 Then
Buy();
if MarketPosition == 1 and CountIf(H>=bbup,BarsSinceEntry) >= 1 and CrossDown(c,ma(C,10)) Then
ExitLong();
}
}
안녕하세요
Date 2 30분봉 추가
매수 기존식+30분봉 양보밀때
매도 기존식+ 30분봉 음보밀때
손절기능 추가
진입후 손절 매수 이평선 10선 하락돌파시
매도 이평10선 상승돌파시