"Fib Speed Resistance Fan," automatically draws Fibonacci Speed Resistance Fan lines based on the first and third candles of the trading session. Here’s a breakdown of its functionality:
Functionality Session Start Time Identification
The script identifies the first candle at 9:15 AM using timestamp(), which ensures it captures the market's opening candle. Candle Indexing
It determines the index of the first candle (firstCandleIndex) using ta.barssince(time >= sessionStart). The third candle is found by adding two bars to the first candle's index (thirdCandleIndex = firstCandleIndex + 2). Ensuring Single Execution
A boolean flag hasDrawn ensures that the lines are drawn only once and do not update on future candles. Validating Data
It checks if the firstCandleIndex and thirdCandleIndex are valid (validSession). If conditions are met, it extracts the highs and lows of the first and third candles. Fibonacci Calculation
The script calculates a 0.75 level price between the first candle high/low and third candle low/high. This level helps in drawing intermediate Fibonacci fan lines. Drawing the Fibonacci Speed Resistance Fan
If conditions are valid and hasDrawn is false, the script draws: Main fan lines from: First candle high → Third candle low (Blue line) First candle low → Third candle high (Blue line)
ברוח TradingView אמיתית, המחבר של הסקריפט הזה פרסם אותו בקוד פתוח, כך שסוחרים יכולים להבין ולאמת אותו. כל הכבוד למחבר! אתה יכול להשתמש בו בחינם, אך שימוש חוזר בקוד זה בפרסומים כפוף לכללי הבית. אתה יכול להכניס אותו למועדפים כדי להשתמש בו בגרף.
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.