커뮤니티
산식의 신호연기
2013-04-10 17:27:28
220
글번호 61881
1.아래의 조건으로 신호를 발생시켯습니다
그런데 SK05<SD05일때 신호가 발생될때에는
그림과 같이 Crossup된이후에 신호가 발생되도록
산식을 수정했습니다만 작동이 않됩니다
Crossup이후 수정신호의 수정을 부탁드립니다
2.속성창에서의 손절청산을 산식으로 표현하면 어뗳게 되는가요?
===신호===
ST01=0;
SK05=stochasticsK(5,3)
SD05=stochasticsD(5,3,3)
(Bong1:사용자 함수)
If Bong1[1]>B1v1[0] and Bong1[0]>B1v1[0] and
( (Bong1[1]-B1v1[0]<10 ) and (Bong1[0]-B1v1[0]>=10 ) or
(Bong1[1]-B1v1[0]<=10 ) and (Bong1[0]-B1v1[0]>10 ) ) and
CountIF(Bong1[1]>Bong1[0],(index-B1i1))==0 and
CountIF(Bong1[1]==Bong1[0],(index-B1i1))<3 Then{
STi01=index;
ST01=10;
}
==Crossup이후 수정신호==
If Bong1[1]>B1v1[0] and Bong1[0]>B1v1[0] and
( (Bong1[1]-B1v1[0]<10 ) and (Bong1[0]-B1v1[0]>=10 ) or
(Bong1[1]-B1v1[0]<=10 ) and (Bong1[0]-B1v1[0]>10 ) ) and
CountIF(Bong1[1]>Bong1[0],(index-B1i1))==0 and
CountIF(Bong1[1]==Bong1[0],(index-B1i1))<3 Then{
STi01=index;
If SK05>SD05 and SK05[1]<SK05[0] Then
ST01=10;
Else if CrossUp(SK05,SD05) and index<STi01+20 Then
st01=5;
}
- 1. 신호발생 이동.jpg (0.18 MB)
답변 1
예스스탁 예스스탁 답변
2013-04-10 18:41:08
안녕하세요
예스스탁입니다.
1,
var : STi01(0),delay(false);
SK05=stochasticsK(5,3);
SD05=stochasticsD(5,3,3);
If Bong1[1]>B1v1[0] and Bong1[0]>B1v1[0] and
( (Bong1[1]-B1v1[0]<10 ) and (Bong1[0]-B1v1[0]>=10 ) or
(Bong1[1]-B1v1[0]<=10 ) and (Bong1[0]-B1v1[0]>10 ) ) and
CountIF(Bong1[1]>Bong1[0],(index-B1i1))==0 and
CountIF(Bong1[1]==Bong1[0],(index-B1i1))<3 Then{
STi01 = index;
If SK05>SD05 Then{
delay = false;
buy();
}
if SK05>SD05 Then{
delay = true;
}
}
if delay == true and CrossUp(SK05,SD05) and index<STi01+20 Then{
buy();
delay = false;
}
2,
#매수포지션
if MarketPosition == 1 Then{
ExitLong("bx1",AtStop,EntryPrice-1);#1포인트 손절
ExitLong("bx2",AtStop,EntryPrice*0.99);#1% 손절
}
#매도포지션
if MarketPosition == -1 Then{
ExitShort("sx1",AtStop,EntryPrice+1);#1포인트 손절
ExitShort("sx2",AtStop,EntryPrice*1.01);#1% 손절
}
즐거운 하루되세요
> 티끌 님이 쓴 글입니다.
> 제목 : 산식의 신호연기
> 1.아래의 조건으로 신호를 발생시켯습니다
그런데 SK05<SD05일때 신호가 발생될때에는
그림과 같이 Crossup된이후에 신호가 발생되도록
산식을 수정했습니다만 작동이 않됩니다
Crossup이후 수정신호의 수정을 부탁드립니다
2.속성창에서의 손절청산을 산식으로 표현하면 어뗳게 되는가요?
===신호===
ST01=0;
SK05=stochasticsK(5,3)
SD05=stochasticsD(5,3,3)
(Bong1:사용자 함수)
If Bong1[1]>B1v1[0] and Bong1[0]>B1v1[0] and
( (Bong1[1]-B1v1[0]<10 ) and (Bong1[0]-B1v1[0]>=10 ) or
(Bong1[1]-B1v1[0]<=10 ) and (Bong1[0]-B1v1[0]>10 ) ) and
CountIF(Bong1[1]>Bong1[0],(index-B1i1))==0 and
CountIF(Bong1[1]==Bong1[0],(index-B1i1))<3 Then{
STi01=index;
ST01=10;
}
==Crossup이후 수정신호==
If Bong1[1]>B1v1[0] and Bong1[0]>B1v1[0] and
( (Bong1[1]-B1v1[0]<10 ) and (Bong1[0]-B1v1[0]>=10 ) or
(Bong1[1]-B1v1[0]<=10 ) and (Bong1[0]-B1v1[0]>10 ) ) and
CountIF(Bong1[1]>Bong1[0],(index-B1i1))==0 and
CountIF(Bong1[1]==Bong1[0],(index-B1i1))<3 Then{
STi01=index;
If SK05>SD05 and SK05[1]<SK05[0] Then
ST01=10;
Else if CrossUp(SK05,SD05) and index<STi01+20 Then
st01=5;
}