커뮤니티

작동이 잘 안되네요? ....((2535연결))

프로필 이미지
pinetree
2004-10-07 17:09:52
978
글번호 5339
답변완료
C. 기존 문의 사항 : 위 시스템을 좀 더 개선 하고자 합니다. ............. <<질문은 끝에 있습니다>> 내용은 1. 10시 이후에는 매수, 매도의 진입식에서 MACD(12,26) < MACD(12,26)[1] (또는 MACD(12,26) > MACD(12,26)[1])를 매수 : macd> macd signal 매도 : macd< macd signal 으로 수정 2. 매수 신호의 횟수를 macd> macd signal 조건 유지 하는 동안 (macd< macd signal 로 바뀌기 전) 1 회 만 유효 매도 신호의 횟수도 macd< macd signal 조건 유지 하는 동안(상 동) 1 회 만 유효 3. 10시 이후로 확장 (돌파 전고점 기준 시간대을 각각 다르게 적용) 10:00-10:30 사이 -> 전고점 시간 기준 범위는 09:00-10:00 10:30-11:00 사이 -> 전고점 시간 기준 범위는 09:00-10:30 11:00-11:30 사이 -> 전고점 시간 기준 범위는 09:30-11:00 11:30-12:00 사이 -> 전고점 시간 기준 범위는 10:00-11:30 12:00-12:30 사이 -> 전고점 시간 기준 범위는 10:30-12:00 12:30-13:00 사이 -> 전고점 시간 기준 범위는 11:00-12:30 13:00-13:30 사이 -> 전고점 시간 기준 범위는 11:30-13:00 13:30-14:00 사이 -> 전고점 시간 기준 범위는 12:00-13:30 14:00-14:30 사이 -> 전고점 시간 기준 범위는 12:30-14:00 14:30-15:00 사이 -> 전고점 시간 기준 범위는 13:00-14:30 (복잡하지만 요약하면 9:30 까지는 전일 30분 10:00 까지는 당일 전 1시간 단위 10:30 부터는 30분 단위로 전1시간 30분 단위를 말합니다) 위 시간대에서 매수는 고점 돌파(고점보다 높을 때) 매도는 저점 돌파(저점보다 낮을 때) <끝> 안녕하세요 예스스탁입니다. 죄송합니다. 식작성에 오류가 있었습니다. MACD시그널 선으로 수정하고 구간에서 신호가 한번이상 나지 않게 수정했습니다. 즐거운 하루되세요 var : prehigh(0),prelow(0); var : Bcnt1(0),Bcnt2(0),Bcnt3(0),Bcnt4(0),Bcnt5(0),Bcnt6(0), Bcnt7(0),Bcnt8(0),Bcnt9(0),Bcnt10(0),Bcnt11(0),Bcnt12(0); var : Scnt1(0),Scnt2(0),Scnt3(0),Scnt4(0),Scnt5(0),Scnt6(0), Scnt7(0),Scnt8(0),Scnt9(0),Scnt10(0),Scnt11(0),Scnt12(0); if date != date[1] then{ prehigh = highest(H[1],46); prelow = lowest(L[1],46); Bcnt1 = 0; Bcnt2 = 0; Bcnt3 = 0; Bcnt4 = 0; Bcnt5 = 0; Bcnt6 = 0; Bcnt7 = 0; Bcnt8 = 0; Bcnt9 = 0; Bcnt10 = 0; Bcnt11 = 0; Bcnt12 = 0; Scnt1 = 0; Scnt2 = 0; Scnt3 = 0; Scnt4 = 0; Scnt5 = 0; Scnt6 = 0; Scnt7 = 0; Scnt8 = 0; Scnt9 = 0; Scnt10 = 0; Scnt11 = 0; Scnt12 = 0; } if Bcnt1 < 1 and stime < 93000 and //9시 30분 전 c > prehigh and //전일 14시 30분~15시까지의 고가 MACD(12,26) > MACD(12,26)[1] and C > ma(c,5) then{ buy("B1"); Bcnt1 = 1; } if Bcnt2 < 1 and stime >= 93000 and stime < 100000 and //9시30분에서 ~ 10시 c > Timehigh(90000,92959) and //9시~9시30분전까지의 고가 MACD(12,26) > MACD(12,26)[1] and C > ma(c,5) then{ buy("B2"); Bcnt2 = 1; } if Bcnt3 < 1 and stime >= 100000 and stime < 103000 and //10시에서 ~ 10시 30분 c > Timehigh(90000,95959) and //9시~10시전까지의 고가 MACD(12,26) > ema(MACD(12,26),9) and C > ma(c,5) then{ buy("B3"); Bcnt3 =1; } if Bcnt4 < 1 and stime >= 103000 and stime < 110000 and //10시 30분에서 ~ 11시 c > Timehigh(90000,102959) and //9시~10시30분전까지의 고가 MACD(12,26) > ema(MACD(12,26),9) and C > ma(c,5) then{ buy("B4"); Bcnt4 = 1; } if Bcnt5 < 1 and stime >= 110000 and stime < 113000 and//11시에서 ~ 11시 30분 c > Timehigh(93000,105959) and //9시30분~11시전까지의 고가 MACD(12,26) > ema(MACD(12,26),9) and C > ma(c,5) then{ buy("B5"); Bcnt5 = 1; } if Bcnt6 < 1 and stime >= 113000 and stime < 120000 and //11시 30분에서 ~ 12시 c > Timehigh(100000,112959) and //10시~11시30분전까지의 고가 MACD(12,26) > ema(MACD(12,26),9) and C > ma(c,5) then{ buy("B6"); Bcnt6 = 1; } if Bcnt7 < 1 and stime >= 120000 and stime < 123000 and //12시 ~ 12시 30분 c > Timehigh(103000,115959) and //10시 30분~ 12시전까지의 고가 MACD(12,26) > ema(MACD(12,26),9) and C > ma(c,5) then{ buy("B7"); Bcnt7 = 1; } if Bcnt8 < 1 and stime >= 123000 and stime < 130000 and //12시 30분 ~ 1시 c > Timehigh(110000,122959) and //11시~ 12시 30분전까지의 고가 MACD(12,26) > ema(MACD(12,26),9) and C > ma(c,5) then{ buy("B8"); Bcnt8 = 1; } if Bcnt9 < 1 and stime >= 130000 and stime < 133000 and //1시 ~ 1시 30분 c > Timehigh(113000,125959) and //11시 30분~ 1시전까지의 고가 MACD(12,26) > ema(MACD(12,26),9) and C > ma(c,5) then{ buy("B9"); Bcnt9 = 1; } if Bcnt10< 1 and stime >= 133000 and stime < 140000 and //1시 30분 ~ 2시 c > Timehigh(120000,132959) and //12시~ 1시 30분전까지의 고가 MACD(12,26) > ema(MACD(12,26),9) and C > ma(c,5) then{ buy("B10"); Bcnt10 = 1; } if Bcnt11< 1 and stime >= 140000 and stime < 143000 and //2시 ~ 2시 30분 c > Timehigh(123000,135959) and //12시30분~ 2시전까지의 고가 MACD(12,26) > ema(MACD(12,26),9) and C > ma(c,5) then{ buy("B11"); Bcnt11 =1; } if Bcnt12< 1 and stime >= 143000 and stime < 150000 and //2시30분 ~ 3시 c > Timehigh(130000,142959) and //1시~ 2시30분전까지의 고가 MACD(12,26) > ema(MACD(12,26),9) and C > ma(c,5) then{ buy("B12"); Bcnt12 = 1; } if crossdown(c, ma(c,5)) or stime == 150000 then exitlong("매수청산"); if Scnt1 < 1 and stime < 93000 and c < prelow and MACD(12,26) < MACD(12,26)[1] and C < ma(c,5) then{ sell("S1"); Scnt1 = 1; } if Scnt2 < 1 and stime >= 93000 and stime < 100000 and c < Timelow(90000,92959) and MACD(12,26) < MACD(12,26)[1] and C < ma(c,5) then{ sell("S2"); Scnt2 = 1; } if Scnt3 < 1 and stime >= 100000 and stime < 103000 and //10시에서 ~ 10시 30분 c < Timelow(90000,95959) and //9시~10시전까지의 저가 MACD(12,26) < ema(MACD(12,26),9) and C < ma(c,5) then{ sell("S3"); Scnt3 = 1; } if Scnt4 < 1 and stime >= 103000 and stime < 110000 and //10시 30분에서 ~ 11시 c < Timelow(90000,102959) and //9시~10시30분전까지의 저가 MACD(12,26) < ema(MACD(12,26),9) and C < ma(c,5) then{ sell("S4"); Scnt4 = 1; } if Scnt5 < 1 and stime >= 110000 and stime < 113000 and//11시에서 ~ 11시 30분 c < Timelow(93000,105959) and //9시30분~11시전까지의 저가 MACD(12,26) < ema(MACD(12,26),9) and C < ma(c,5) then{ sell("S5"); Scnt5 = 1; } if Scnt6 < 1 and stime >= 113000 and stime < 120000 and //11시 30분에서 ~ 12시 c < Timelow(100000,112959) and //10시~11시30분전까지의 저가 MACD(12,26) < ema(MACD(12,26),9) and C < ma(c,5) then{ sell("S6"); Scnt6 = 1; } if Scnt7 < 1 and stime >= 120000 and stime < 123000 and //12시 ~ 12시 30분 c < Timelow(103000,115959) and //10시 30분~ 12시전까지의 저가 MACD(12,26) < ema(MACD(12,26),9) and C < ma(c,5) then{ sell("S7"); Scnt7 = 1; } if Scnt8 < 1 and stime >= 123000 and stime < 130000 and //12시 30분 ~ 1시 c < Timelow(110000,122959) and //11시~ 12시 30분전까지의 저가 MACD(12,26) < ema(MACD(12,26),9) and C < ma(c,5) then{ sell("S8"); Scnt8 = 1; } if Scnt9 < 1 and stime >= 130000 and stime < 133000 and //1시 ~ 1시 30분 c < Timelow(113000,125959) and //11시 30분~ 1시전까지의 저가 MACD(12,26) < ema(MACD(12,26),9) and C < ma(c,5) then{ sell("S9"); Scnt9 = 1; } if Scnt10 < 1 and stime >= 133000 and stime < 140000 and //1시 30분 ~ 2시 c < Timelow(120000,132959) and //12시~ 1시 30분전까지의 저가 MACD(12,26) < ema(MACD(12,26),9) and C < ma(c,5) then{ sell("S10"); Scnt10 = 1; } if Scnt11 < 1 and stime >= 140000 and stime < 143000 and //2시 ~ 2시 30분 c < Timelow(123000,135959) and //12시30분~ 2시전까지의 저가 MACD(12,26) < ema(MACD(12,26),9) and C < ma(c,5) then{ sell("S11"); Scnt11 = 1; } if Scnt12 < 1 and stime >= 143000 and stime < 150000 and //2시30분 ~ 3시 c < Timelow(130000,142959) and //1시~ 2시30분전까지의 저가 MACD(12,26) < ema(MACD(12,26),9) and C < ma(c,5) then{ sell("S12"); Scnt12 = 1; } if crossup(c,ma(c,5)) or stime == 150000 then exitshort("매도청산"); 위 답변에서 1. 9:30 -13:00 사이의 신호가 발생하지 않네요 신호가 나오지 않으니 확인이 좀 어려운데, 아마도 9시 30 분까지의 진입 신호이후 청산 신호가 13시 이후에 나오는 것같습니다. 13시 이후에는 정상적으로 작동이 되고요. 연결문 or 의 사용 횟수 제한이 아닌가 싶은데 저로서는 알수가 없네요. 2. b1..., s1...등의 의미와 역할은 어떤 것인지? <<끝>>
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2004-10-08 13:36:27

안녕하세요 예스스탁입니다. 1. 9:30 -13:00 사이의 신호가 발생하지 않네요 --> 신호를 확인결과 9시 40분이나 오늘의 경우 10시 34분에서 신호가 나오고 있습니다. 시템 리포트를 확인해 보시기 바랍니다. 2. 연결문 or 의 사용 횟수 제한이 아닌가 싶은데 저로서는 알수가 없네요. 사용횟수의 제한은 없습니다. 2. b1..., s1...등의 의미와 역할은 어떤 것인지? Bcnt1~12와 Scnt1~12는 구간마다 동일신호가 한번씩만 나오게 하기위해 변수를 지정한 것입니다. 이용에 참고하시기 바랍니다. 즐거운 하루되세요 > pinetree 님이 쓴 글입니다. > 제목 : 작동이 잘 안되네요? ....((2535연결)) > C. 기존 문의 사항 : 위 시스템을 좀 더 개선 하고자 합니다. ............. <<질문은 끝에 있습니다>> 내용은 1. 10시 이후에는 매수, 매도의 진입식에서 MACD(12,26) < MACD(12,26)[1] (또는 MACD(12,26) > MACD(12,26)[1])를 매수 : macd> macd signal 매도 : macd< macd signal 으로 수정 2. 매수 신호의 횟수를 macd> macd signal 조건 유지 하는 동안 (macd< macd signal 로 바뀌기 전) 1 회 만 유효 매도 신호의 횟수도 macd< macd signal 조건 유지 하는 동안(상 동) 1 회 만 유효 3. 10시 이후로 확장 (돌파 전고점 기준 시간대을 각각 다르게 적용) 10:00-10:30 사이 -> 전고점 시간 기준 범위는 09:00-10:00 10:30-11:00 사이 -> 전고점 시간 기준 범위는 09:00-10:30 11:00-11:30 사이 -> 전고점 시간 기준 범위는 09:30-11:00 11:30-12:00 사이 -> 전고점 시간 기준 범위는 10:00-11:30 12:00-12:30 사이 -> 전고점 시간 기준 범위는 10:30-12:00 12:30-13:00 사이 -> 전고점 시간 기준 범위는 11:00-12:30 13:00-13:30 사이 -> 전고점 시간 기준 범위는 11:30-13:00 13:30-14:00 사이 -> 전고점 시간 기준 범위는 12:00-13:30 14:00-14:30 사이 -> 전고점 시간 기준 범위는 12:30-14:00 14:30-15:00 사이 -> 전고점 시간 기준 범위는 13:00-14:30 (복잡하지만 요약하면 9:30 까지는 전일 30분 10:00 까지는 당일 전 1시간 단위 10:30 부터는 30분 단위로 전1시간 30분 단위를 말합니다) 위 시간대에서 매수는 고점 돌파(고점보다 높을 때) 매도는 저점 돌파(저점보다 낮을 때) <끝> 안녕하세요 예스스탁입니다. 죄송합니다. 식작성에 오류가 있었습니다. MACD시그널 선으로 수정하고 구간에서 신호가 한번이상 나지 않게 수정했습니다. 즐거운 하루되세요 var : prehigh(0),prelow(0); var : Bcnt1(0),Bcnt2(0),Bcnt3(0),Bcnt4(0),Bcnt5(0),Bcnt6(0), Bcnt7(0),Bcnt8(0),Bcnt9(0),Bcnt10(0),Bcnt11(0),Bcnt12(0); var : Scnt1(0),Scnt2(0),Scnt3(0),Scnt4(0),Scnt5(0),Scnt6(0), Scnt7(0),Scnt8(0),Scnt9(0),Scnt10(0),Scnt11(0),Scnt12(0); if date != date[1] then{ prehigh = highest(H[1],46); prelow = lowest(L[1],46); Bcnt1 = 0; Bcnt2 = 0; Bcnt3 = 0; Bcnt4 = 0; Bcnt5 = 0; Bcnt6 = 0; Bcnt7 = 0; Bcnt8 = 0; Bcnt9 = 0; Bcnt10 = 0; Bcnt11 = 0; Bcnt12 = 0; Scnt1 = 0; Scnt2 = 0; Scnt3 = 0; Scnt4 = 0; Scnt5 = 0; Scnt6 = 0; Scnt7 = 0; Scnt8 = 0; Scnt9 = 0; Scnt10 = 0; Scnt11 = 0; Scnt12 = 0; } if Bcnt1 < 1 and stime < 93000 and //9시 30분 전 c > prehigh and //전일 14시 30분~15시까지의 고가 MACD(12,26) > MACD(12,26)[1] and C > ma(c,5) then{ buy("B1"); Bcnt1 = 1; } if Bcnt2 < 1 and stime >= 93000 and stime < 100000 and //9시30분에서 ~ 10시 c > Timehigh(90000,92959) and //9시~9시30분전까지의 고가 MACD(12,26) > MACD(12,26)[1] and C > ma(c,5) then{ buy("B2"); Bcnt2 = 1; } if Bcnt3 < 1 and stime >= 100000 and stime < 103000 and //10시에서 ~ 10시 30분 c > Timehigh(90000,95959) and //9시~10시전까지의 고가 MACD(12,26) > ema(MACD(12,26),9) and C > ma(c,5) then{ buy("B3"); Bcnt3 =1; } if Bcnt4 < 1 and stime >= 103000 and stime < 110000 and //10시 30분에서 ~ 11시 c > Timehigh(90000,102959) and //9시~10시30분전까지의 고가 MACD(12,26) > ema(MACD(12,26),9) and C > ma(c,5) then{ buy("B4"); Bcnt4 = 1; } if Bcnt5 < 1 and stime >= 110000 and stime < 113000 and//11시에서 ~ 11시 30분 c > Timehigh(93000,105959) and //9시30분~11시전까지의 고가 MACD(12,26) > ema(MACD(12,26),9) and C > ma(c,5) then{ buy("B5"); Bcnt5 = 1; } if Bcnt6 < 1 and stime >= 113000 and stime < 120000 and //11시 30분에서 ~ 12시 c > Timehigh(100000,112959) and //10시~11시30분전까지의 고가 MACD(12,26) > ema(MACD(12,26),9) and C > ma(c,5) then{ buy("B6"); Bcnt6 = 1; } if Bcnt7 < 1 and stime >= 120000 and stime < 123000 and //12시 ~ 12시 30분 c > Timehigh(103000,115959) and //10시 30분~ 12시전까지의 고가 MACD(12,26) > ema(MACD(12,26),9) and C > ma(c,5) then{ buy("B7"); Bcnt7 = 1; } if Bcnt8 < 1 and stime >= 123000 and stime < 130000 and //12시 30분 ~ 1시 c > Timehigh(110000,122959) and //11시~ 12시 30분전까지의 고가 MACD(12,26) > ema(MACD(12,26),9) and C > ma(c,5) then{ buy("B8"); Bcnt8 = 1; } if Bcnt9 < 1 and stime >= 130000 and stime < 133000 and //1시 ~ 1시 30분 c > Timehigh(113000,125959) and //11시 30분~ 1시전까지의 고가 MACD(12,26) > ema(MACD(12,26),9) and C > ma(c,5) then{ buy("B9"); Bcnt9 = 1; } if Bcnt10< 1 and stime >= 133000 and stime < 140000 and //1시 30분 ~ 2시 c > Timehigh(120000,132959) and //12시~ 1시 30분전까지의 고가 MACD(12,26) > ema(MACD(12,26),9) and C > ma(c,5) then{ buy("B10"); Bcnt10 = 1; } if Bcnt11< 1 and stime >= 140000 and stime < 143000 and //2시 ~ 2시 30분 c > Timehigh(123000,135959) and //12시30분~ 2시전까지의 고가 MACD(12,26) > ema(MACD(12,26),9) and C > ma(c,5) then{ buy("B11"); Bcnt11 =1; } if Bcnt12< 1 and stime >= 143000 and stime < 150000 and //2시30분 ~ 3시 c > Timehigh(130000,142959) and //1시~ 2시30분전까지의 고가 MACD(12,26) > ema(MACD(12,26),9) and C > ma(c,5) then{ buy("B12"); Bcnt12 = 1; } if crossdown(c, ma(c,5)) or stime == 150000 then exitlong("매수청산"); if Scnt1 < 1 and stime < 93000 and c < prelow and MACD(12,26) < MACD(12,26)[1] and C < ma(c,5) then{ sell("S1"); Scnt1 = 1; } if Scnt2 < 1 and stime >= 93000 and stime < 100000 and c < Timelow(90000,92959) and MACD(12,26) < MACD(12,26)[1] and C < ma(c,5) then{ sell("S2"); Scnt2 = 1; } if Scnt3 < 1 and stime >= 100000 and stime < 103000 and //10시에서 ~ 10시 30분 c < Timelow(90000,95959) and //9시~10시전까지의 저가 MACD(12,26) < ema(MACD(12,26),9) and C < ma(c,5) then{ sell("S3"); Scnt3 = 1; } if Scnt4 < 1 and stime >= 103000 and stime < 110000 and //10시 30분에서 ~ 11시 c < Timelow(90000,102959) and //9시~10시30분전까지의 저가 MACD(12,26) < ema(MACD(12,26),9) and C < ma(c,5) then{ sell("S4"); Scnt4 = 1; } if Scnt5 < 1 and stime >= 110000 and stime < 113000 and//11시에서 ~ 11시 30분 c < Timelow(93000,105959) and //9시30분~11시전까지의 저가 MACD(12,26) < ema(MACD(12,26),9) and C < ma(c,5) then{ sell("S5"); Scnt5 = 1; } if Scnt6 < 1 and stime >= 113000 and stime < 120000 and //11시 30분에서 ~ 12시 c < Timelow(100000,112959) and //10시~11시30분전까지의 저가 MACD(12,26) < ema(MACD(12,26),9) and C < ma(c,5) then{ sell("S6"); Scnt6 = 1; } if Scnt7 < 1 and stime >= 120000 and stime < 123000 and //12시 ~ 12시 30분 c < Timelow(103000,115959) and //10시 30분~ 12시전까지의 저가 MACD(12,26) < ema(MACD(12,26),9) and C < ma(c,5) then{ sell("S7"); Scnt7 = 1; } if Scnt8 < 1 and stime >= 123000 and stime < 130000 and //12시 30분 ~ 1시 c < Timelow(110000,122959) and //11시~ 12시 30분전까지의 저가 MACD(12,26) < ema(MACD(12,26),9) and C < ma(c,5) then{ sell("S8"); Scnt8 = 1; } if Scnt9 < 1 and stime >= 130000 and stime < 133000 and //1시 ~ 1시 30분 c < Timelow(113000,125959) and //11시 30분~ 1시전까지의 저가 MACD(12,26) < ema(MACD(12,26),9) and C < ma(c,5) then{ sell("S9"); Scnt9 = 1; } if Scnt10 < 1 and stime >= 133000 and stime < 140000 and //1시 30분 ~ 2시 c < Timelow(120000,132959) and //12시~ 1시 30분전까지의 저가 MACD(12,26) < ema(MACD(12,26),9) and C < ma(c,5) then{ sell("S10"); Scnt10 = 1; } if Scnt11 < 1 and stime >= 140000 and stime < 143000 and //2시 ~ 2시 30분 c < Timelow(123000,135959) and //12시30분~ 2시전까지의 저가 MACD(12,26) < ema(MACD(12,26),9) and C < ma(c,5) then{ sell("S11"); Scnt11 = 1; } if Scnt12 < 1 and stime >= 143000 and stime < 150000 and //2시30분 ~ 3시 c < Timelow(130000,142959) and //1시~ 2시30분전까지의 저가 MACD(12,26) < ema(MACD(12,26),9) and C < ma(c,5) then{ sell("S12"); Scnt12 = 1; } if crossup(c,ma(c,5)) or stime == 150000 then exitshort("매도청산"); 위 답변에서 1. 9:30 -13:00 사이의 신호가 발생하지 않네요 신호가 나오지 않으니 확인이 좀 어려운데, 아마도 9시 30 분까지의 진입 신호이후 청산 신호가 13시 이후에 나오는 것같습니다. 13시 이후에는 정상적으로 작동이 되고요. 연결문 or 의 사용 횟수 제한이 아닌가 싶은데 저로서는 알수가 없네요. 2. b1..., s1...등의 의미와 역할은 어떤 것인지? <<끝>>