커뮤니티

운영자님 답변 중에 질문

프로필 이미지
수급저격수
2016-03-06 19:02:42
123
글번호 96016
답변완료
지난번 아래와 같이 질문드렸습니다. 제가 질문이 잘못해서 그런것 같습니다,, 시간에 관한 질문이였는데요... 외부 변수를 주어 진입제한시간과 청산시간을 동시에 주고자 질문을 드렸습니다. [예를 들면 043000에 진입제한과 강제청산을 동시에 설정하고자 함인데요..] 저번 답변중에..- if c>o and c>c[3] and if c>o and c>c[3] and (stime >= 100000 or stime < ntime) and count < N and MarketPosition == 0 Then 여기에서요.. 그냥 if c>o and c>c[3] and if c>o and c>c[3] and ( stime < ntime ) and count < N and MarketPosition == 0 Then 으로 하면 될것 같은데요..왜? stime >= 100000 or .. 이부분이 이해가 안갑니다. 혹 다른이유 라도 아니면 제가 질문을 잘못한것인지요?..질문을 잘못 드렸다면 if c>o and c>c[3] and if c>o and c>c[3] and (stime >= 100000 or stime < ntime) and count < N and MarketPosition == 0 Then 이 부분을 어떻게 수정해야하는지요? ========================================================================== Re : 문의 드립니다.. 안녕하세요 예스스탁입니다. Inputs: N(2),StopTick1(0.10),Len1(12), Line1(30), Line2(26),Line3(9), StopTick(0.3), Period1(3),Period2(3);//StopTick(0.5) : 최대 300,000원 손실제한 input : ntime(043000); vars: SPDM(0), SMDM(0), STR(0), DIP(0), DIM(0), DX(0), mADX(0),v1(0),v2(0),v3(0),v4(0),count(0); //=====거래횟수 제한로직 ================== if bdate != Bdate[1] Then var1 = TotalTrades; if MarketPosition == 0 Then count = TotalTrades-var1; Else count = (TotalTrades-var1)+1; //==================================================================== if c>o and c>c[3] and (stime >= 100000 or stime < ntime) and count < N and MarketPosition == 0 Then { Buy("매수19511"); } ...... //매수19511 if marketposition == 1 Then { if IsEntryName("매수19511") and (v1<v2 or v1<v1[1]) then ExitLong("청산19511"); } ,,,,,,, //[강제청산] if stime== ntime or (stime > ntime and stime[1] < ntime); then { exitlong (); exitshort(); } 즐거운 하루되세요 > 수급저격수 님이 쓴 글입니다. > 제목 : 문의 드립니다.. > 안녕하세요? 해외선물 US 달러 인덱스 상품을 투자하고 있습니다. 장시작과 마감은 오전 10:00 ~ 다음날 오전 07:00 입니다. 아래와 같이 시스템식이 있습니다만.. 문의사항) INPUTS 에서 1개의 변수를 주어 시간을 입력하고자 합니다.(기본값은043000) 그래서 진입 조건(시간) 추가 ==>[ 진입조건(시간) AND count <N ] 과 강제청산(시간) 동시에 정하고자 합니다. 예를 들면 오전 0530분에 진입하지 못하게 하고 강제청산도 0530분에 할려고 합니다. 수고하세요... '==================================================================================================== Inputs: N(2),StopTick1(0.10),Len1(12), Line1(30), Line2(26),Line3(9), StopTick(0.3), Period1(3),Period2(3);//StopTick(0.5) : 최대 300,000원 손실제한 vars: SPDM(0), SMDM(0), STR(0), DIP(0), DIM(0), DX(0), mADX(0),v1(0),v2(0),v3(0),v4(0),count(0); //=====거래횟수 제한로직 ================== if bdate != Bdate[1] Then var1 = TotalTrades; if MarketPosition == 0 Then count = TotalTrades-var1; Else count = (TotalTrades-var1)+1; //==================================================================== if c>o and c>c[3] and 진입조건(시간) and count < N and MarketPosition == 0 Then { Buy("매수19511"); } ...... //매수19511 if marketposition == 1 Then { if IsEntryName("매수19511") and (v1<v2 or v1<v1[1]) then ExitLong("청산19511"); } ,,,,,,, //[강제청산] if stime== 043000 then { exitlong (); exitshort(); } '=================================================================================================
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-03-07 11:29:12

안녕하세요 예스스탁입니다. ( stime < ntime ) 와 같이만 지정하시면 ntime 이전에만 진입한다는 의미이므로 ntime이 4시30분이면 0시에서 4시30분 까지만 진입을 하고 10시에서 밤 0시까지는 진입을 못하게 됩니다. 그러므로 (stime >= 100000 or stime < ntime) 봉의 시간이 10시 이후이거나 ntime이전에만 진입하게 해서 10시부터 다음날 04시 30분까지만 진입하게 한 내용입니다. 의도하시는 내용은 0시에서 지정한 시간까지만 진입하고자 하시는 내용이시면 stime < ntime으로 지정하시면 됩니다. 즐거운 하루되세요 > 수급저격수 님이 쓴 글입니다. > 제목 : 운영자님 답변 중에 질문 > 지난번 아래와 같이 질문드렸습니다. 제가 질문이 잘못해서 그런것 같습니다,, 시간에 관한 질문이였는데요... 외부 변수를 주어 진입제한시간과 청산시간을 동시에 주고자 질문을 드렸습니다. [예를 들면 043000에 진입제한과 강제청산을 동시에 설정하고자 함인데요..] 저번 답변중에..- if c>o and c>c[3] and if c>o and c>c[3] and (stime >= 100000 or stime < ntime) and count < N and MarketPosition == 0 Then 여기에서요.. 그냥 if c>o and c>c[3] and if c>o and c>c[3] and ( stime < ntime ) and count < N and MarketPosition == 0 Then 으로 하면 될것 같은데요..왜? stime >= 100000 or .. 이부분이 이해가 안갑니다. 혹 다른이유 라도 아니면 제가 질문을 잘못한것인지요?..질문을 잘못 드렸다면 if c>o and c>c[3] and if c>o and c>c[3] and (stime >= 100000 or stime < ntime) and count < N and MarketPosition == 0 Then 이 부분을 어떻게 수정해야하는지요? ========================================================================== Re : 문의 드립니다.. 안녕하세요 예스스탁입니다. Inputs: N(2),StopTick1(0.10),Len1(12), Line1(30), Line2(26),Line3(9), StopTick(0.3), Period1(3),Period2(3);//StopTick(0.5) : 최대 300,000원 손실제한 input : ntime(043000); vars: SPDM(0), SMDM(0), STR(0), DIP(0), DIM(0), DX(0), mADX(0),v1(0),v2(0),v3(0),v4(0),count(0); //=====거래횟수 제한로직 ================== if bdate != Bdate[1] Then var1 = TotalTrades; if MarketPosition == 0 Then count = TotalTrades-var1; Else count = (TotalTrades-var1)+1; //==================================================================== if c>o and c>c[3] and (stime >= 100000 or stime < ntime) and count < N and MarketPosition == 0 Then { Buy("매수19511"); } ...... //매수19511 if marketposition == 1 Then { if IsEntryName("매수19511") and (v1<v2 or v1<v1[1]) then ExitLong("청산19511"); } ,,,,,,, //[강제청산] if stime== ntime or (stime > ntime and stime[1] < ntime); then { exitlong (); exitshort(); } 즐거운 하루되세요 > 수급저격수 님이 쓴 글입니다. > 제목 : 문의 드립니다.. > 안녕하세요? 해외선물 US 달러 인덱스 상품을 투자하고 있습니다. 장시작과 마감은 오전 10:00 ~ 다음날 오전 07:00 입니다. 아래와 같이 시스템식이 있습니다만.. 문의사항) INPUTS 에서 1개의 변수를 주어 시간을 입력하고자 합니다.(기본값은043000) 그래서 진입 조건(시간) 추가 ==>[ 진입조건(시간) AND count <N ] 과 강제청산(시간) 동시에 정하고자 합니다. 예를 들면 오전 0530분에 진입하지 못하게 하고 강제청산도 0530분에 할려고 합니다. 수고하세요... '==================================================================================================== Inputs: N(2),StopTick1(0.10),Len1(12), Line1(30), Line2(26),Line3(9), StopTick(0.3), Period1(3),Period2(3);//StopTick(0.5) : 최대 300,000원 손실제한 vars: SPDM(0), SMDM(0), STR(0), DIP(0), DIM(0), DX(0), mADX(0),v1(0),v2(0),v3(0),v4(0),count(0); //=====거래횟수 제한로직 ================== if bdate != Bdate[1] Then var1 = TotalTrades; if MarketPosition == 0 Then count = TotalTrades-var1; Else count = (TotalTrades-var1)+1; //==================================================================== if c>o and c>c[3] and 진입조건(시간) and count < N and MarketPosition == 0 Then { Buy("매수19511"); } ...... //매수19511 if marketposition == 1 Then { if IsEntryName("매수19511") and (v1<v2 or v1<v1[1]) then ExitLong("청산19511"); } ,,,,,,, //[강제청산] if stime== 043000 then { exitlong (); exitshort(); } '=================================================================================================