커뮤니티

수식부탁합니다

프로필 이미지
영웅456
2017-04-06 12:52:58
192
글번호 108535
답변완료
안녕 하세요 수식 정정 부탁 드립니다 해외선물 자동매매식 만들고 있습니다 12시부터 새벽3시 사이에 조건a 조건b 만족할때 매수 인데요 이수식을 12시부터 23시까지는 그대로 하고 23시부터 03시 사이에는 조건a를 빼고 조건b만 만족하면 매수할수 있게 부탁 드립니다 시간 설정을 어떻게 할지 몰라서요 ㅠ 부탁 드립니다 input : sto1(12),sto2(5),sto3(5); var : stok(0),stod(0); stok = StochasticsK(sto1,sto2); stod = StochasticsD(sto1,sto2,sto3); if stime >= 120000 or stime < 030000 then{ if 조건a and 조건b and crossup(stod,20) Then buy("매수"); } --------------------------- if stime >= 120000 or stime < 230000 then{ if 조건a and 조건b and crossup(stod,20) Then buy("매수"); } if stime >= 230001 or stime < 030000 then{ if 조건b and crossup(stod,20) Then buy("매수"); } 이렇게 하니까 신호가 이상하게 나와버리네요 ㅋ
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-04-07 11:22:29

안녕하세요 예스스탁입니다. 12시부터 23시까지는 or가 아닌 and로 연결해야 합니다. stime >= 120000 and stime < 230000 수정한 식입니다. input : sto1(12),sto2(5),sto3(5); var : stok(0),stod(0); stok = StochasticsK(sto1,sto2); stod = StochasticsD(sto1,sto2,sto3); if stime >= 120000 and stime < 230000 then{ if 조건a and 조건b and crossup(stod,20) Then buy("매수1"); } if stime >= 230000 or stime < 030000 then{ if 조건b and crossup(stod,20) Then buy("매수2"); } 즐거운 하루되세요 > 영웅456 님이 쓴 글입니다. > 제목 : 수식부탁합니다 > 안녕 하세요 수식 정정 부탁 드립니다 해외선물 자동매매식 만들고 있습니다 12시부터 새벽3시 사이에 조건a 조건b 만족할때 매수 인데요 이수식을 12시부터 23시까지는 그대로 하고 23시부터 03시 사이에는 조건a를 빼고 조건b만 만족하면 매수할수 있게 부탁 드립니다 시간 설정을 어떻게 할지 몰라서요 ㅠ 부탁 드립니다 input : sto1(12),sto2(5),sto3(5); var : stok(0),stod(0); stok = StochasticsK(sto1,sto2); stod = StochasticsD(sto1,sto2,sto3); if stime >= 120000 or stime < 030000 then{ if 조건a and 조건b and crossup(stod,20) Then buy("매수"); } --------------------------- if stime >= 120000 or stime < 230000 then{ if 조건a and 조건b and crossup(stod,20) Then buy("매수"); } if stime >= 230001 or stime < 030000 then{ if 조건b and crossup(stod,20) Then buy("매수"); } 이렇게 하니까 신호가 이상하게 나와버리네요 ㅋ