커뮤니티
시스템식 수정 부탁드립니다.
2006-03-16 17:28:56
1118
글번호 9602
아래와 같이 시스템 매매식을 만들었는데
매도신호만 나오네요..
제데로 작동될 수 있도록 수정해 주시면
고맙겠습니다.
답신은 cyberhwchoi@hanmir.com 부탁드립니다.
-----------------------------------------------
Inputs: Length(60), BarsBlw(2), BarsOver(2);
Var: Bot1(0), Bot2(0), Top1(0), Top2(0);
Var : Pointer(0), x13(0), x21(0);
Bot1 = BollBanddown(Length, 1);
Top1 = BollBandup(Length, 1);
Bot2 = BollBanddown(Length, 2);
Top2 = BollBandup(Length, 2);
x13 = wma(c, 13);
x21 = wma(o, 21);
Setstopendofday(150500);
If CountIF(Close > Bot2, BarsBlw) == BarsBlw Then
Pointer = 1;
else pointer = 0;
If CountIF(Close < Top2, BarsOver) == BarsOver Then
Pointer = -1;
else pointer = 0;
if stime > 90000 and stime <140000 then {
if crossup (x13, x21) and pointer == 1
then Buy ("buy");
if crossdown (x13, x21) and pointer == -1
then Sell ("sell");
}
if marketposition() == 1 then {
if crossdown (x13, x21)
then exitlong("StopL");
}
if marketposition() == -1 then {
if crossup (x13, x21)
then exitshort("StopS");
}
답변 1
예스스탁 예스스탁 답변
2006-03-17 09:18:13
안녕하세요
예스스탁입니다.
If CountIF(Close > Bot2, BarsBlw) == BarsBlw Then
Pointer = 1;
else pointer = 0;
If CountIF(Close < Top2, BarsOver) == BarsOver Then
Pointer = -1;
else pointer = 0;
위 부분이 차트처음에 Pointer가 -1로 할당되면
1로 잡혀야 하는 구간에서도 else Pointer = 0
으로 인해 1이 아닌 0으로 잡혔습니다.
아래의 두개의 지표식을 비교해 보시면 Pointer값이 할당되는 것을
비교해 보실 수 있습니다.
[지표식-원식]
Inputs: Length(60), BarsBlw(2), BarsOver(2);
Var: Bot1(0), Bot2(0), Top1(0), Top2(0);
Var : Pointer(0), x13(0), x21(0);
Bot1 = BollBanddown(Length, 1);
Top1 = BollBandup(Length, 1);
Bot2 = BollBanddown(Length, 2);
Top2 = BollBandup(Length, 2);
x13 = wma(c, 13);
x21 = wma(o, 21);
If CountIF(Close > Bot2, BarsBlw) == BarsBlw Then
Pointer = 1;
else If CountIF(Close < Top2, BarsOver) == BarsOver Then
Pointer = -1;
else
pointer = 0;
plot1(pointer);
[지표식-수정]
Inputs: Length(60), BarsBlw(2), BarsOver(2);
Var: Bot1(0), Bot2(0), Top1(0), Top2(0);
Var : Pointer(0), x13(0), x21(0);
Bot1 = BollBanddown(Length, 1);
Top1 = BollBandup(Length, 1);
Bot2 = BollBanddown(Length, 2);
Top2 = BollBandup(Length, 2);
x13 = wma(c, 13);
x21 = wma(o, 21);
If CountIF(Close > Bot2, BarsBlw) == BarsBlw Then
Pointer = 1;
else If CountIF(Close < Top2, BarsOver) == BarsOver Then
Pointer = -1;
else
pointer = 0;
plot1(pointer);
식을 수정했습니다.
Inputs: Length(60), BarsBlw(2), BarsOver(2);
Var: Bot1(0), Bot2(0), Top1(0), Top2(0);
Var : Pointer(0), x13(0), x21(0);
Bot1 = BollBanddown(Length, 1);
Top1 = BollBandup(Length, 1);
Bot2 = BollBanddown(Length, 2);
Top2 = BollBandup(Length, 2);
x13 = wma(c, 13);
x21 = wma(o, 21);
Setstopendofday(150500);
If CountIF(Close > Bot2, BarsBlw) == BarsBlw Then
Pointer = 1;
else If CountIF(Close < Top2, BarsOver) == BarsOver Then
Pointer = -1;
else
pointer = 0;
if stime > 90000 and stime <140000 then {
if crossup(x13, x21) and pointer == 1 then
Buy("buy");
if crossdown(x13, x21) and pointer == -1 then
Sell("sell");
}
if marketposition() == 1 then {
if crossdown (x13, x21)
then exitlong("StopL");
}
if marketposition() == -1 then {
if crossup (x13, x21)
then exitshort("StopS");
}
> CJ_coco 님이 쓴 글입니다.
> 제목 : 시스템식 수정 부탁드립니다.
>
아래와 같이 시스템 매매식을 만들었는데
매도신호만 나오네요..
제데로 작동될 수 있도록 수정해 주시면
고맙겠습니다.
답신은 cyberhwchoi@hanmir.com 부탁드립니다.
-----------------------------------------------
Inputs: Length(60), BarsBlw(2), BarsOver(2);
Var: Bot1(0), Bot2(0), Top1(0), Top2(0);
Var : Pointer(0), x13(0), x21(0);
Bot1 = BollBanddown(Length, 1);
Top1 = BollBandup(Length, 1);
Bot2 = BollBanddown(Length, 2);
Top2 = BollBandup(Length, 2);
x13 = wma(c, 13);
x21 = wma(o, 21);
Setstopendofday(150500);
If CountIF(Close > Bot2, BarsBlw) == BarsBlw Then
Pointer = 1;
else pointer = 0;
If CountIF(Close < Top2, BarsOver) == BarsOver Then
Pointer = -1;
else pointer = 0;
if stime > 90000 and stime <140000 then {
if crossup (x13, x21) and pointer == 1
then Buy ("buy");
if crossdown (x13, x21) and pointer == -1
then Sell ("sell");
}
if marketposition() == 1 then {
if crossdown (x13, x21)
then exitlong("StopL");
}
if marketposition() == -1 then {
if crossup (x13, x21)
then exitshort("StopS");
}