커뮤니티

수식오류문의

프로필 이미지
회원
2014-06-09 18:06:31
180
글번호 75698
답변완료

첨부 이미지

늘 친절한 답변에 감사드립니다. 장시작후 캔들 3개의 최고가와 최저가를 4번째 봉부터 9시 10분까지 지표로 표시하고자하여 아래와 같이 하였으나 첫 2개의 캔들을 반영을 못하고 있습니다. 왜 그런지요? input : etime(091000); var : bh(0),bl(0); if time<=etime and dayindex>2 then{ bh=highest(H[dayindex-2], 3); bl=lowest(L[dayindex-2], 3); Plot13(bh,"BH",green,def,2); Plot14(bl,"BL",green,def,2); }
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-06-09 18:21:56

안녕하세요 예스스탁입니다. dayindex는 첫봉이 0으로 시작됩니다 -2를 붙이시면 두번&#51760; 봉까지 이전값 참조가 -가 붙어 계산할수 없는 구간이 됩니다. input : etime(091000); var : bh(0),bl(0); if dayindex+1 <= 3 Then{ bh = dayhigh; bl = DayLow; } if dayindex+1 >= 4 and time < 91000 then{ Plot13(bh,"BH",green,def,2); Plot14(bl,"BL",green,def,2); } 즐거운 하루되세요 > HI_we***** 님이 쓴 글입니다. > 제목 : 수식오류문의 > 늘 친절한 답변에 감사드립니다. 장시작후 캔들 3개의 최고가와 최저가를 4번째 봉부터 9시 10분까지 지표로 표시하고자하여 아래와 같이 하였으나 첫 2개의 캔들을 반영을 못하고 있습니다. 왜 그런지요? input : etime(091000); var : bh(0),bl(0); if time<=etime and dayindex>2 then{ bh=highest(H[dayindex-2], 3); bl=lowest(L[dayindex-2], 3); Plot13(bh,"BH",green,def,2); Plot14(bl,"BL",green,def,2); }