커뮤니티

매수전용 시스템수정

프로필 이미지
조민철
2014-12-08 00:11:02
108
글번호 81136
답변완료
항상 감사드립니다 아래시스템은 매수/매도로 설정하면 정상적으로 신호가 발생합니다 그런데 매수만 설정햇을때는 신호가 아무것도 발생치 않습니다. 매수전용으로 수정해주시기 바랍니다 input : 시작시간(090000),끝시간(093000); var : Start(false),entrycnt(0),Bcond(false),Scond(false),idx(0); if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{ Start = True; entrycnt = entrycnt+1; Idx = 0; } Idx = idx+1; if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then Start = false; Bcond = var11==1 and c>var78 and c>var48 ; Scond = var11==-1 and c<var78 and c<var48 ; Condition1 = ExitDate(1) == true and MarketPosition(1) == 1 and (IsExitName("eB_선행",1) == true or IsExitName("StopLoss",1) == true); Condition2 = ExitDate(1) == true and MarketPosition(1) == -1 and (IsExitName("eS_선행",1) == true or IsExitName("StopLoss",1) == true); if Idx >= 1 and Start == true and Bcond == true and (MarketPosition == -1 or (MarketPosition == 0 and Condition1 == False )) Then buy("B1"); if Idx >= 1 and Start == true and Scond == true and (MarketPosition == 1 or (MarketPosition == 0 and Condition2 == False )) Then sell("S1"); 감사합니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-12-08 13:26:08

안녕하세요 예스스탁입니다. 1. 매수-매수청산 input : 시작시간(090000),끝시간(093000); var : Start(false),entrycnt(0),Bcond(false),Scond(false),idx(0); if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{ Start = True; entrycnt = entrycnt+1; Idx = 0; } Idx = idx+1; if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then Start = false; Bcond = var11==1 and c>var78 and c>var48 ; Scond = var11==-1 and c<var78 and c<var48 ; Condition1 = ExitDate(1) == true and MarketPosition(1) == 1 and (IsExitName("eB_선행",1) == true or IsExitName("StopLoss",1) == true); Condition2 = ExitDate(1) == true and MarketPosition(1) == -1 and (IsExitName("eS_선행",1) == true or IsExitName("StopLoss",1) == true); if Idx >= 1 and Start == true and Bcond == true and (MarketPosition == -1 or (MarketPosition == 0 and Condition1 == False )) Then buy("B1"); if Idx >= 1 and Start == true and Scond == true and (MarketPosition == 1 or (MarketPosition == 0 and Condition2 == False )) Then exitlong("bx"); 2, 매도-매도청산 input : 시작시간(090000),끝시간(093000); var : Start(false),entrycnt(0),Bcond(false),Scond(false),idx(0); if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{ Start = True; entrycnt = entrycnt+1; Idx = 0; } Idx = idx+1; if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then Start = false; Bcond = var11==1 and c>var78 and c>var48 ; Scond = var11==-1 and c<var78 and c<var48 ; Condition1 = ExitDate(1) == true and MarketPosition(1) == 1 and (IsExitName("eB_선행",1) == true or IsExitName("StopLoss",1) == true); Condition2 = ExitDate(1) == true and MarketPosition(1) == -1 and (IsExitName("eS_선행",1) == true or IsExitName("StopLoss",1) == true); if Idx >= 1 and Start == true and Bcond == true and (MarketPosition == -1 or (MarketPosition == 0 and Condition1 == False )) Then Exitshort("sx"); if Idx >= 1 and Start == true and Scond == true and (MarketPosition == 1 or (MarketPosition == 0 and Condition2 == False )) Then Sell("S1"); 즐거운 하루되세요 > 조민철 님이 쓴 글입니다. > 제목 : 매수전용 시스템수정 > 항상 감사드립니다 아래시스템은 매수/매도로 설정하면 정상적으로 신호가 발생합니다 그런데 매수만 설정햇을때는 신호가 아무것도 발생치 않습니다. 매수전용으로 수정해주시기 바랍니다 input : 시작시간(090000),끝시간(093000); var : Start(false),entrycnt(0),Bcond(false),Scond(false),idx(0); if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{ Start = True; entrycnt = entrycnt+1; Idx = 0; } Idx = idx+1; if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then Start = false; Bcond = var11==1 and c>var78 and c>var48 ; Scond = var11==-1 and c<var78 and c<var48 ; Condition1 = ExitDate(1) == true and MarketPosition(1) == 1 and (IsExitName("eB_선행",1) == true or IsExitName("StopLoss",1) == true); Condition2 = ExitDate(1) == true and MarketPosition(1) == -1 and (IsExitName("eS_선행",1) == true or IsExitName("StopLoss",1) == true); if Idx >= 1 and Start == true and Bcond == true and (MarketPosition == -1 or (MarketPosition == 0 and Condition1 == False )) Then buy("B1"); if Idx >= 1 and Start == true and Scond == true and (MarketPosition == 1 or (MarketPosition == 0 and Condition2 == False )) Then sell("S1"); 감사합니다