커뮤니티
시스템에서 두번째신호부터 매매시작
2016-08-04 11:52:47
108
글번호 100696
항상 감사드립니다.
1_아래시스템에서 당일첫신호를 무시하고 두번째신호부터 매매하고 싶습니다
2_세번째신호로도도 변경 할수있게 주석부탁 드립니다
### 동일방향 재진입금지/전일 마지막신호와 무관하게 진입 ###
var : entrycnt(0),Xcond(false);
if stime == 170000 or (stime > 170000 and stime[1] < 170000) Then{ # 현지시간_뉴욕 17:00 장시작 #
Entrycnt = 0;
Xcond = false;
}
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then ### 동일방향 재진입금지 설정식 ###
Entrycnt = Entrycnt+1;
if TotalTrades > TotalTrades[1] and (IsExitName("BP",1) or IsExitName("BL",1) or IsExitName("SP",1) or IsExitName("SL",1)) Then
Xcond = true;
if DayOfWeek(bdate) <= 5 and (stime >= 170000 or stime < 170000) and Xcond == false Then{ ### 일요일 17:00 ~ 금요일 매매 ###
##############################
##### 1_ Rsi 매매식 #####
##############################
if ((entrycnt == 0) or (entrycnt >= 1 and MarketPosition == 0 and MarketPosition(1) != 1) or (MarketPosition == -1)) and #동일방향 재진입금지#
c>var50 and uparoon>dnaroon and uparoon>70 and var11==1 Then
BUY("B_aroon");
if ((entrycnt == 0) or (entrycnt >= 1 and MarketPosition == 0 and MarketPosition(1) != -1) or (MarketPosition == 1)) and #동일방향 재진입금지#
c<var50 and uparoon<dnaroon and dnaroon>70 and var11==-1 Then
sell("S_aroon");
}
답변 1
예스스탁 예스스탁 답변
2016-08-04 15:46:55
안녕하세요
예스스탁입니다.
전체 식에서 특정 신호를 걸러내는 부분은
가상으로 진입과 청산을 체크해야 하는 부분인데
수식마다 작성이 다르고 시간이 많이 소모되어 해당 내용은
저희가 답변을 드리지 않습니다.
올려주신 내용이면
매수와 매도가 반복되는 내용이므로 다른 청산이 없으므로
매수와 매도 진입의 횟수를 체크해서 2번째 부터 진입하게 작성하시면 됩니다.
실제신호가 아니므로 포지션함수를 사용할수 없고
가상으로 체크하는 내용으로 식을 구사하셔야 합니다.
아래 내용 참고하셔서 수정보완하시기 바랍니다.
var : entrycnt(0),Xcond(false),T(0),count(0);
if stime == 170000 or (stime > 170000 and stime[1] < 170000) Then{ # 현지시간_뉴욕 17:00 장시작 #
Entrycnt = 0;
Xcond = false;
T = 0;
count = 0;
}
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then ### 동일방향 재진입금지 설정식 ###
Entrycnt = Entrycnt+1;
if TotalTrades > TotalTrades[1] and (IsExitName("BP",1) or IsExitName("BL",1) or IsExitName("SP",1) or IsExitName("SL",1)) Then
Xcond = true;
if DayOfWeek(bdate) <= 5 and (stime >= 170000 or stime < 170000) and Xcond == false Then{ ### 일요일 17:00 ~ 금요일 매매 ###
#매수조건이면 T는 1, 카운트 1증가
if T <= 0 and c>var50 and uparoon>dnaroon and uparoon>70 and var11==1 Then{
T = 1;
count = count+1;
#카운트가 2 이상이고 나머지 포지션 조건 만족할때 진입
if count >= 2 and ((entrycnt == 0) or (entrycnt >= 1 and MarketPosition == 0 and MarketPosition(1) != 1) or (MarketPosition == -1)) Then #동일방향 재진입금지#
BUY("B_aroon");
}
#매도조건이면 T는 -1, 카운트 1증가
if T >= 0 and c<var50 and uparoon<dnaroon and dnaroon>70 and var11==-1 Then{
T = -1;
count = count+1;
#카운트가 2 이상이고 나미저 포지션 조건 만족할때 진입
if count >= 2 and ((entrycnt == 0) or (entrycnt >= 1 and MarketPosition == 0 and MarketPosition(1) != -1) or (MarketPosition == 1)) then #동일방향 재진입금지#
sell("S_aroon");
}
}
즐거운 하루되세요
> 조민철 님이 쓴 글입니다.
> 제목 : 시스템에서 두번째신호부터 매매시작
> 항상 감사드립니다.
1_아래시스템에서 당일첫신호를 무시하고 두번째신호부터 매매하고 싶습니다
2_세번째신호로도도 변경 할수있게 주석부탁 드립니다
### 동일방향 재진입금지/전일 마지막신호와 무관하게 진입 ###
var : entrycnt(0),Xcond(false);
if stime == 170000 or (stime > 170000 and stime[1] < 170000) Then{ # 현지시간_뉴욕 17:00 장시작 #
Entrycnt = 0;
Xcond = false;
}
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then ### 동일방향 재진입금지 설정식 ###
Entrycnt = Entrycnt+1;
if TotalTrades > TotalTrades[1] and (IsExitName("BP",1) or IsExitName("BL",1) or IsExitName("SP",1) or IsExitName("SL",1)) Then
Xcond = true;
if DayOfWeek(bdate) <= 5 and (stime >= 170000 or stime < 170000) and Xcond == false Then{ ### 일요일 17:00 ~ 금요일 매매 ###
##############################
##### 1_ Rsi 매매식 #####
##############################
if ((entrycnt == 0) or (entrycnt >= 1 and MarketPosition == 0 and MarketPosition(1) != 1) or (MarketPosition == -1)) and #동일방향 재진입금지#
c>var50 and uparoon>dnaroon and uparoon>70 and var11==1 Then
BUY("B_aroon");
if ((entrycnt == 0) or (entrycnt >= 1 and MarketPosition == 0 and MarketPosition(1) != -1) or (MarketPosition == 1)) and #동일방향 재진입금지#
c<var50 and uparoon<dnaroon and dnaroon>70 and var11==-1 Then
sell("S_aroon");
}