예스스탁
예스스탁 답변
2024-08-12 15:23:13
안녕하세요
예스스탁입니다.
input : BBP(20),dv(2),ntime1(60),P1(5);
var : S1(0),D1(0),TM(0),TF(0),cnt(0);
var : sum1(0),mav1(0),bbup(0),bbdn(0);
Array : CC[100](0);
var1 = 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;
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,5)) Then
ExitLong();
if CrossDown(c,var1) and CountIf(CrossUp(c,var1),30) >= 1 and
C < O and C < mav1 Then
Sell();
if MarketPosition == -1 and CountIf(L<=bbdn,BarsSinceEntry) >= 1 and CrossUp(c,ma(C,5)) Then
ExitShort();
}
}
즐거운 하루되세요
> 아트정 님이 쓴 글입니다.
> 제목 : 수식추가
>
input : BBP(20),dv(2),ntime1(60),P1(5);
var : S1(0),D1(0),TM(0),TF(0),cnt(0);
var : sum1(0),mav1(0),bbup(0);
Array : CC[100](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,5)) Then
ExitLong();
}
}
매도식도 부탁드림니다