OPEN-SOURCE SCRIPT
jjjjjjjj

Explanation of the Script
Bullish and Bearish Candles: The function isBullishOrderBlock() checks if a candle is "bullish" in nature (based on body size to range ratio). Similarly, isBearishOrderBlock() checks for bearish candles.
Order Block Length and Threshold: length is the number of bars to scan for an order block, and threshold sets how strong a candle needs to be to be considered an order block.
Detection: The loop searches backward through the bars to find strong bullish and bearish order blocks, marking the price points where the strong moves happened.
Plotting: The plotshape() function is used to plot arrows or labels on the chart to mark where bullish or bearish order blocks are identified.
Improving and Customizing
Highlighting Blocks: Instead of just marking a point, you can plot horizontal boxes or shaded regions using box.new() to visually highlight the order block zone.
Use of Different Timeframes: You can modify the script to look for order blocks across multiple timeframes to increase accuracy.
Complex Rules: Depending on your strategy, you may want to add additional rules, such as looking for price to return to the order block area before confirming the strength of the block.
Bullish and Bearish Candles: The function isBullishOrderBlock() checks if a candle is "bullish" in nature (based on body size to range ratio). Similarly, isBearishOrderBlock() checks for bearish candles.
Order Block Length and Threshold: length is the number of bars to scan for an order block, and threshold sets how strong a candle needs to be to be considered an order block.
Detection: The loop searches backward through the bars to find strong bullish and bearish order blocks, marking the price points where the strong moves happened.
Plotting: The plotshape() function is used to plot arrows or labels on the chart to mark where bullish or bearish order blocks are identified.
Improving and Customizing
Highlighting Blocks: Instead of just marking a point, you can plot horizontal boxes or shaded regions using box.new() to visually highlight the order block zone.
Use of Different Timeframes: You can modify the script to look for order blocks across multiple timeframes to increase accuracy.
Complex Rules: Depending on your strategy, you may want to add additional rules, such as looking for price to return to the order block area before confirming the strength of the block.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.