커뮤니티
수식문의
2005-10-16 22:29:15
1356
글번호 8539
input:p1122(20),n1(72),p44(0.044),p80(10);
input:p17(0.1),A(2.71828182845904),p33(1.4),p4000(0.2);
input:p52(56),p8(4);
Var: Formula1(0),Formula2(0);
Var: PDO(0),PDH(0),PDL(0),PDC(0),TDO(0),TDH(0),TDL(0);
var: sochi(0),lalee(0),kok1(0),kok2(0),nine(0),DispV_70(0);
var: PIVOT(0),PVT1R(0),PVT2R(0),PVT1S(0),PVT2S(0),sigma(0);
var: ull(0),mll(0),dll(0);
Var: DIP(0),DIM(0),abba(0);
var: mc(0),mL(0),mH(0),ms(0);
lalee=LRS(c,p1122);
PIVOT = (PDH+PDL+PDC)/3;
ull = iff(dayclose(1)>dayopen(1), (dayhigh(1)-daylow(1)+dayclose(1)+dayhigh(1))/2, iff(dayclose(1)<dayopen(1), (dayhigh(1)+dayclose(1))/2 ,(dayhigh(1)+daylow(1)+dayclose(1)+dayhigh(1))/4 ));
mll = iff(dayclose(1)>dayopen(1), (dayhigh(1)+daylow(1)+dayclose(1)+dayhigh(1))/4, iff(dayclose(1)<dayopen(1), (dayhigh(1)+daylow(1)+dayclose(1)+daylow(1))/4,(dayhigh(1)+daylow(1)+dayclose(1)+dayclose(1))/4));
dll = iff(dayclose(1)>dayopen(1), (daylow(1)+dayclose(1))/2, iff(dayclose(1)<dayopen(1), (-dayhigh(1)+daylow(1)+dayclose(1)+daylow(1))/2 ,(dayhigh(1)+daylow(1)+dayclose(1)+daylow(1))/4 ));
sochi=
abs(accumN(H-C,46)/accumN(C-L,46)*100-accumN(H-O,46)/accumN(O-L,46)*100);
TDO = DayOpen(0);
TDH = DayHigh(0);
TDL = DayLow(0);
DispV_70 = Disparity(70);
sigma=(C-ma(C,138))/STD(C,138);
PDO = DayOpen(1);
PDH = DayHigh(1);
PDL = DayLow(1);
PDC = DayClose(1);
PIVOT = (PDH+PDL+PDC)/3; // 피봇기준선
PVT2R = PIVOT+PDH-PDL; // 2차저항
PVT1R = 2*PIVOT-PDL; // 1차저항
PVT1S = 2*PIVOT-PDH; // 1차지지
PVT2S = PIVOT-PDH+PDL; // 2차지지
kok1 = ma(C,88);
kok2 = atan(kok1-kok1[1])*180/pie();
nine=A^((highest(log(H), n1) + lowest(log(L),n1)) / 2);
Formula1=//매수
((((((((
iff(lalee>lalee[4] && bids>asks*1.0 ,1,0)
|| iff(sigma>sigma[2] && bids>asks*1.0,1,0)
|| iff(crossUp(c,nine),1,0)
|| iff(Barssinceentry(0)>8 && c>Entryprice(0),1,0)
|| iff(crossUp(c,nine),1,0)
|| stime==144000
&& (iff(sochi<8,0,1)))
&& (iff(abs(ull[1]-mll)<0.1 || abs(ull-mll)<p4000,0,1)))
&& (iff(((PDH-PDL)/PDL)>p44,0,1)))
&& (iff(stime<92000 && DispV_70>103.7 ,stime>150000,stime>=90000)))
&& (iff(abs(kok2[2]-kok2)<p17,0,1)))
&& (iff(PVT2R-PVT2S>5.4,0,1)))
&& (iff(ull-dll<1.4 && c>mll && c<ull,0,1)))
&& (iff((PDC[1]-PDC) / (PDC) >0.043 && PDO>PDC,stime>144959, stime>=90000)))
&& stime<140000
;
Formula2=//매도
(((((((
iff(lalee<lalee[4] && asks>bids*1.0 ,1,0)
|| iff(sigma<sigma[2] && asks>bids*1.0,1,0)
|| iff(crossDown(c,nine),1,0)
|| iff(Barssinceentry(0)>8 && c<Entryprice(0),1,0)
|| stime==144000
&& iff(sochi<8 ,0,1))
&& (iff(abs(ull[1]-mll)<0.1 || abs(ull-mll)<p4000,0,1)))
&& (iff(ull-dll<1.4 && c>dll && c<mll,0,1)))
&& (iff(((PDH-PDL)/PDL)>p44,0,1)))
&& (iff(PVT2R-PVT2S>5.4,0,1)))
&& (iff(abs(kok2[2]-kok2)<p17,0,1)))
&& (iff((PDC[1]-PDC) / (PDC) >0.043 && PDO>PDC,stime>144959, stime>=90000)))
&& stime<140000
;
if Formula1 Then
buy("na");
if Formula2 Then
sell("ma");
위 식은 한봉에 매수청산, 매도, 매도청산, 매수 모조리 나오는데...
따로 나오게 하면 어떻게 하나요?
즉 매수청산, 매도 이렇게 한봉에서 마감하고 다음봉 이후에 매도청산, 매수
이렇게요...미리 감사드림...좋은 주말 되세요...
답변 1
예스스탁 예스스탁 답변
2005-10-17 09:27:01
안녕하세요
예스스탁입니다.
한봉에 매수/매수청산/매도/매도청산 신호가 모두 나오는 것은
Formula1 과 Formula1가 한봉에 조건이 모두 만족하는 경우가 발생하기 때문입니다.
작성하신 식의 각 조건과 and or 조건을 살펴보시기 바랍니다.
즐거운 하루되세요
> fjulia 님이 쓴 글입니다.
> 제목 : 수식문의
> input:p1122(20),n1(72),p44(0.044),p80(10);
input:p17(0.1),A(2.71828182845904),p33(1.4),p4000(0.2);
input:p52(56),p8(4);
Var: Formula1(0),Formula2(0);
Var: PDO(0),PDH(0),PDL(0),PDC(0),TDO(0),TDH(0),TDL(0);
var: sochi(0),lalee(0),kok1(0),kok2(0),nine(0),DispV_70(0);
var: PIVOT(0),PVT1R(0),PVT2R(0),PVT1S(0),PVT2S(0),sigma(0);
var: ull(0),mll(0),dll(0);
Var: DIP(0),DIM(0),abba(0);
var: mc(0),mL(0),mH(0),ms(0);
lalee=LRS(c,p1122);
PIVOT = (PDH+PDL+PDC)/3;
ull = iff(dayclose(1)>dayopen(1), (dayhigh(1)-daylow(1)+dayclose(1)+dayhigh(1))/2, iff(dayclose(1)<dayopen(1), (dayhigh(1)+dayclose(1))/2 ,(dayhigh(1)+daylow(1)+dayclose(1)+dayhigh(1))/4 ));
mll = iff(dayclose(1)>dayopen(1), (dayhigh(1)+daylow(1)+dayclose(1)+dayhigh(1))/4, iff(dayclose(1)<dayopen(1), (dayhigh(1)+daylow(1)+dayclose(1)+daylow(1))/4,(dayhigh(1)+daylow(1)+dayclose(1)+dayclose(1))/4));
dll = iff(dayclose(1)>dayopen(1), (daylow(1)+dayclose(1))/2, iff(dayclose(1)<dayopen(1), (-dayhigh(1)+daylow(1)+dayclose(1)+daylow(1))/2 ,(dayhigh(1)+daylow(1)+dayclose(1)+daylow(1))/4 ));
sochi=
abs(accumN(H-C,46)/accumN(C-L,46)*100-accumN(H-O,46)/accumN(O-L,46)*100);
TDO = DayOpen(0);
TDH = DayHigh(0);
TDL = DayLow(0);
DispV_70 = Disparity(70);
sigma=(C-ma(C,138))/STD(C,138);
PDO = DayOpen(1);
PDH = DayHigh(1);
PDL = DayLow(1);
PDC = DayClose(1);
PIVOT = (PDH+PDL+PDC)/3; // 피봇기준선
PVT2R = PIVOT+PDH-PDL; // 2차저항
PVT1R = 2*PIVOT-PDL; // 1차저항
PVT1S = 2*PIVOT-PDH; // 1차지지
PVT2S = PIVOT-PDH+PDL; // 2차지지
kok1 = ma(C,88);
kok2 = atan(kok1-kok1[1])*180/pie();
nine=A^((highest(log(H), n1) + lowest(log(L),n1)) / 2);
Formula1=//매수
((((((((
iff(lalee>lalee[4] && bids>asks*1.0 ,1,0)
|| iff(sigma>sigma[2] && bids>asks*1.0,1,0)
|| iff(crossUp(c,nine),1,0)
|| iff(Barssinceentry(0)>8 && c>Entryprice(0),1,0)
|| iff(crossUp(c,nine),1,0)
|| stime==144000
&& (iff(sochi<8,0,1)))
&& (iff(abs(ull[1]-mll)<0.1 || abs(ull-mll)<p4000,0,1)))
&& (iff(((PDH-PDL)/PDL)>p44,0,1)))
&& (iff(stime<92000 && DispV_70>103.7 ,stime>150000,stime>=90000)))
&& (iff(abs(kok2[2]-kok2)<p17,0,1)))
&& (iff(PVT2R-PVT2S>5.4,0,1)))
&& (iff(ull-dll<1.4 && c>mll && c<ull,0,1)))
&& (iff((PDC[1]-PDC) / (PDC) >0.043 && PDO>PDC,stime>144959, stime>=90000)))
&& stime<140000
;
Formula2=//매도
(((((((
iff(lalee<lalee[4] && asks>bids*1.0 ,1,0)
|| iff(sigma<sigma[2] && asks>bids*1.0,1,0)
|| iff(crossDown(c,nine),1,0)
|| iff(Barssinceentry(0)>8 && c<Entryprice(0),1,0)
|| stime==144000
&& iff(sochi<8 ,0,1))
&& (iff(abs(ull[1]-mll)<0.1 || abs(ull-mll)<p4000,0,1)))
&& (iff(ull-dll<1.4 && c>dll && c<mll,0,1)))
&& (iff(((PDH-PDL)/PDL)>p44,0,1)))
&& (iff(PVT2R-PVT2S>5.4,0,1)))
&& (iff(abs(kok2[2]-kok2)<p17,0,1)))
&& (iff((PDC[1]-PDC) / (PDC) >0.043 && PDO>PDC,stime>144959, stime>=90000)))
&& stime<140000
;
if Formula1 Then
buy("na");
if Formula2 Then
sell("ma");
위 식은 한봉에 매수청산, 매도, 매도청산, 매수 모조리 나오는데...
따로 나오게 하면 어떻게 하나요?
즉 매수청산, 매도 이렇게 한봉에서 마감하고 다음봉 이후에 매도청산, 매수
이렇게요...미리 감사드림...좋은 주말 되세요...
이전글