OPEN-SOURCE SCRIPT

Crossover Counter

Explanation:
Crossover Detection: We detect the crossover of the 20-period and 50-period moving averages using ta.crossover().
Tracking Price Movement: After the crossover, we start tracking the price to check if it moves up or down by 2%. If an up movement occurs before a down movement, we increment the positive counter. If a down movement occurs first, we increment the negative counter.
Reset Condition: Once either a 2% up or down move is detected, we stop tracking until the next crossover.
Table Display: A table shows the counts of positive and negative events.
CyclesMoving AveragesPine utilities

نص برمجي مفتوح المصدر

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

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

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