커뮤니티

함수 수식 오류 검증 부탁드립니다

프로필 이미지
topliss
2020-08-22 13:47:25
1018
글번호 141695
답변완료
일전에 문의 드린 BarSince 함수를 시그널메이커에서 차용해서 만들어 봣는대요... 무엇이 문제인지 제대로 검증이 안되네요. 작동가능하도록 수정 부탁드립니다. Input: conditions(LogicalSeries); Vars : BarsCount(0); if BarIndex == 1 then { if conditions then BarsCount = 0; else BarsCount = 1; } else { if conditions then BarsCount = 0; else BarsCount = BarsCount + 1; } BarSince = BarsCount;
사용자 함수
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-08-24 16:00:21

안녕하세요 예스스탁입니다. 올려주신 수식에 문제가 없습니다. 그래도 함수로 만드셔서 사용하시면 됩니다. 사용자함수명 : BarSince 반환값형 : 숫자형 Input: conditions(LogicalSeries); Vars : BarsCount(0); if BarIndex == 1 then { if conditions then BarsCount = 0; else BarsCount = 1; } else { if conditions then BarsCount = 0; else BarsCount = BarsCount + 1; } BarSince = BarsCount; 즐거운 하루되세요 > topliss 님이 쓴 글입니다. > 제목 : 함수 수식 오류 검증 부탁드립니다 > 일전에 문의 드린 BarSince 함수를 시그널메이커에서 차용해서 만들어 봣는대요... 무엇이 문제인지 제대로 검증이 안되네요. 작동가능하도록 수정 부탁드립니다. Input: conditions(LogicalSeries); Vars : BarsCount(0); if BarIndex == 1 then { if conditions then BarsCount = 0; else BarsCount = 1; } else { if conditions then BarsCount = 0; else BarsCount = BarsCount + 1; } BarSince = BarsCount;