커뮤니티
부탁드립니다.
2016-02-21 15:59:12
93
글번호 95602
if bdate != bdate[1] Then
entry = 0;
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
Condition1 = MarketPosition(1) == 1 and IsExitName("StopProfittarget",1) == true;
Condition2 = MarketPosition(1) == -1 and IsExitName("StopProfittarget",1) == true;
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then
TimeCond = true;
if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then
TimeCond = false;
If timeCond == true and
T1 == 1 Then {
buy();
}
If timeCond == true and
T1 == -1 Then {
sell();
}
if stime == 060000 or (stime > 060000 and stime < 060000) Then{
exitlong();
ExitShort();
}
상기식에서
1) 현재 매수조건 T1 == 1 에서 추가 조건을 2가지를 추가하고싶습니다.
( 조건(1), 조건,(2) )
그런데 T1 == 1 의 조건을 만족하는 봉에서 3봉이상 이 지난후에 조건(1),(2)가
만족된다면 신호발생이 안되게 하고싶습니다.
T1 == 1 의 조건이 만족한후에 3봉이내에서 조건(1),(2) 가 만족되엤을 경우에만 신호발생이 되도록 부탁드립니다.
만약, 조건 (1),(2)가 미리 나온 경우는 관계없음.
2) 상기수식에서 진입은 시간이 지켜지는데 06시 청산이 안되고 오버나잇이 되어 버립니다.
06시에 포지션 전량청산될수있게 부탁드립니다.
3) 매수진입중 10일선의 기울기가 상승으로 연속으로 15개봉을 유지를 하면
청산하는 청산식도 부탁드립니다.
답변 1
예스스탁 예스스탁 답변
2016-02-22 11:44:50
안녕하세요
예스스탁입니다.
1
var :bi(0),mav(0);
if bdate != bdate[1] Then
entry = 0;
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
Condition1 = MarketPosition(1) == 1 and IsExitName("StopProfittarget",1) == true;
Condition2 = MarketPosition(1) == -1 and IsExitName("StopProfittarget",1) == true;
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then
TimeCond = true;
if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then
TimeCond = false;
if T1 == 1 and T1[1] != 1 Then
bi = index;
If timeCond == true and
T1 == 1 and index < bi+3 and 조건1 and 조건2 Then {
buy();
}
If timeCond == true and
T1 == -1 Then {
sell();
}
mav = ma(c,10);
if MarketPosition == 1 and countif(mav >mav[1],15) == 15 Then
exitlong();
if stime == 060000 or (stime > 060000 and stime < 060000) Then{
exitlong();
ExitShort();
}
2
해당식 6시봉에 청산되는 내용이 있습니다.
청산이 되지 않는다면 6시봉이 없는 경우입니다.
plot1(stime);
위 지표적용하셔서 시간확인하시기 바랍니다.
3
위식에 포함했습니다.
즐거운 하루되세요
> as8282 님이 쓴 글입니다.
> 제목 : 부탁드립니다.
> if bdate != bdate[1] Then
entry = 0;
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
Condition1 = MarketPosition(1) == 1 and IsExitName("StopProfittarget",1) == true;
Condition2 = MarketPosition(1) == -1 and IsExitName("StopProfittarget",1) == true;
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then
TimeCond = true;
if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then
TimeCond = false;
If timeCond == true and
T1 == 1 Then {
buy();
}
If timeCond == true and
T1 == -1 Then {
sell();
}
if stime == 060000 or (stime > 060000 and stime < 060000) Then{
exitlong();
ExitShort();
}
상기식에서
1) 현재 매수조건 T1 == 1 에서 추가 조건을 2가지를 추가하고싶습니다.
( 조건(1), 조건,(2) )
그런데 T1 == 1 의 조건을 만족하는 봉에서 3봉이상 이 지난후에 조건(1),(2)가
만족된다면 신호발생이 안되게 하고싶습니다.
T1 == 1 의 조건이 만족한후에 3봉이내에서 조건(1),(2) 가 만족되엤을 경우에만 신호발생이 되도록 부탁드립니다.
만약, 조건 (1),(2)가 미리 나온 경우는 관계없음.
2) 상기수식에서 진입은 시간이 지켜지는데 06시 청산이 안되고 오버나잇이 되어 버립니다.
06시에 포지션 전량청산될수있게 부탁드립니다.
3) 매수진입중 10일선의 기울기가 상승으로 연속으로 15개봉을 유지를 하면
청산하는 청산식도 부탁드립니다.