NasserHumood

Reference Angle Function - for developers

█ OVERVIEW

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.

To get access to any of my scripts feel free to visit my website :
gannbox.com

you can also contact me on Twitter :
twitter.com/Nasser_Humood

Or through TradingView's direct messages.
نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟