This function should give you a correct output in a circle of 360°. It is meant to be used by developers/pine-script-coders to figure out reference angles.
Conditions : 1. If the angle given to this function is in between 0-360 then it would give you the same angle without any modifications 2. If the angle given is greater than 360° - for example : 540°, - then it would output 180° which is the angle after a complete revolution. 3. If the angle given is negative, then it would go counter clockwise and give you the angle. 4. If the angle is negative and less than -360°, then it would also give you the actual correct degree after counting the revolution and flipping it to positive.
Feel free to play with it or use it if you need to. I already included some test inputs to show you how it would work.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
차트에서 빠르게 액세스하려면 이 스크립트를 즐겨찾기에 추가하세요 — 여기에서 자세히 알아보기.