{"id":3958,"date":"2023-11-22T13:54:57","date_gmt":"2023-11-22T13:54:57","guid":{"rendered":"https:\/\/eodhd.com\/financial-academy\/?p=3958"},"modified":"2025-02-05T13:37:53","modified_gmt":"2025-02-05T13:37:53","slug":"how-to-trade-using-the-fibonacci-time-zones-with-python","status":"publish","type":"post","link":"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python","title":{"rendered":"How to Trade using the Fibonacci Time Zones with Python"},"content":{"rendered":"\n<p>Last year I wrote a popular article on the Fibonacci Sequence and how it&#8217;s used in trading (it can be <a href=\"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/fibonacci-sequence-in-trading-with-python\/\" target=\"_blank\" rel=\"noreferrer noopener\">found here<\/a>). The article introduced two topics, namely <a href=\"https:\/\/www.investopedia.com\/terms\/f\/fibonacciretracement.asp\" target=\"_blank\" rel=\"noreferrer noopener\">Fibonacci Retracement Levels<\/a> and <a href=\"https:\/\/www.investopedia.com\/terms\/f\/fibonacciextensions.asp\" target=\"_blank\" rel=\"noreferrer noopener\">Fibonacci Extension Levels<\/a>. There are two additional topics called <a href=\"https:\/\/www.investopedia.com\/terms\/f\/fibonaccitimezones.asp\" target=\"_blank\" rel=\"noreferrer noopener\">Fibonacci Time Zones<\/a> and <a href=\"https:\/\/www.investopedia.com\/terms\/f\/fibonaccifan.asp\" target=\"_blank\" rel=\"noreferrer noopener\">Fibonacci Arcs and Fans<\/a> that are interesting as well. This article will cover Fibonacci Time Zones using data from the <a href=\"https:\/\/eodhd.com\/financial-apis\/python-financial-libraries-and-code-samples\/\" target=\"_blank\" rel=\"noreferrer noopener\">EODHD APIs Python library<\/a>.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><a class=\"maxbutton-1 maxbutton maxbutton-subscribe-to-api external-css btn\" href=\"https:\/\/eodhd.com\/register\"><span class='mb-text'>Register &amp; Get Data<\/span><\/a><\/p>\n\n\n\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-the-fibonacci-sequence\">What is the Fibonacci Sequence?<\/h2>\n\n\n\n<p>The Fibonacci Sequence is a series of numbers where each number is the sum of the two preceding numbers, usually starting from 0. The sequence is as follows: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, etc.<\/p>\n\n\n\n<p>The Fibonacci Sequence is remarkably prevalent in nature, often signifying an underlying order in biological structures and phenomena. Here are just a few examples:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>The spiral pattern of leaves around a stem of plants.<\/li>\n\n\n\n<li>Number of petals on a variety of flowers E.g., 3, 5, 21, 34, 55, 89, etc.<\/li>\n\n\n\n<li>Tree branches forming every 5th row of bark.<\/li>\n\n\n\n<li>The spirals on and inside fruit and vegetables.<\/li>\n\n\n\n<li>Animals that have spiral shells.<\/li>\n\n\n\n<li>Some animals reproduce in numbers that follow the Fibonacci sequence.<\/li>\n\n\n\n<li>The DNA molecule, the fundamental building block of life, measures 34 angstroms long by 21 angstroms wide for each full cycle of its double helix spiral, both Fibonacci numbers.<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"800\" src=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/11\/AdobeStock_83591388_s.jpg\" alt=\"\" class=\"wp-image-3983\"\/><figcaption class=\"wp-element-caption\">Licensed Image from Adobe Stock<\/figcaption><\/figure>\n<\/div>\n\n\n<p>These occurrences are often related to the concept of the &#8220;golden ratio&#8221; (approximately 1.618), a closely related concept where the ratio of two consecutive Fibonacci numbers approximates the golden ratio, especially as the sequence progresses. The &#8220;golden ratio&#8221; was covered in my previous article when calculating the Fibonacci Retracement and Extension levels.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-is-the-fibonacci-sequence-used-in-trading\">How is the Fibonacci Sequence used in Trading?<\/h2>\n\n\n\n<p>It&#8217;s not just nature where the Fibonacci Sequence and the &#8220;golden ratio&#8221; has been identified. There is a strong correlation with financial markets and it&#8217;s often used as a tool in technical analysis.<\/p>\n\n\n\n<p>It&#8217;s important to understand that, like all technical analysis tools, Fibonacci methods are not a guarantee of future market movements. It is used to gauge potential future events based on historical patterns and should always be used in conjunction with other analysis methods and sound risk management strategies.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-let-s-look-at-an-example\">Let&#8217;s look at an example&#8230;<\/h2>\n\n\n\n<p>For this tutorial I&#8217;m going to retrieve Apple&#8217;s (AAPL) hourly data using the <a href=\"https:\/\/eodhd.com\/financial-apis\/python-financial-libraries-and-code-samples\/\" target=\"_blank\" rel=\"noreferrer noopener\">EODHD APIs Python library<\/a>. If you don&#8217;t already have a <a href=\"https:\/\/eodhd.com\/cp\/settings\" target=\"_blank\" rel=\"noreferrer noopener\">subscription with EODHD APIs<\/a>, you will need to obtain an <a href=\"https:\/\/eodhd.com\/cp\/settings\" target=\"_blank\" rel=\"noreferrer noopener\">API Token<\/a>.<br><br>You will want to install (or upgrade) the following Python libraries for this tutorial.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code lang=\"python\" class=\"language-python\">$ python3 -m pip install eodhd pandas mplfinance matplotlib -U<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>Create yourself a config.py with your API key.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code lang=\"python\" class=\"language-python\">API_KEY=\"<em>&lt;YOUR_KEY&gt;<\/em>\"<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>We then will want to instantiate the API.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code lang=\"python\" class=\"language-python\">api = APIClient(cfg.API_KEY)<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p class=\"has-text-align-center\"><a class=\"maxbutton-1 maxbutton maxbutton-subscribe-to-api external-css btn\" href=\"https:\/\/eodhd.com\/register\"><span class='mb-text'>Register &amp; Get Data<\/span><\/a><\/p>\n\n\n\n<p>Create our first function that will retrieve our OHLC (Open, High, Low, Close) data for Apple (AAPL) using the EODHD API. The Pandas dataframe returned via the API is a time series with the timestamp reflected as the index. I actually want to use this as a column for plotting the data, so I will copy the &#8220;datetime&#8221; index to a &#8220;datetime&#8221; column.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code lang=\"python\" class=\"language-python\">def get_ohlc_data():\n    df = api.get_historical_data(\"AAPL\", \"1h\")\n    df[\"datetime\"] = df.index\n    return df<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>We then need a function that will identify the significant highs and lows. This is done by calculating the rolling minimum and maximum value.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code lang=\"python\" class=\"language-python\">def find_significant_points(ohlc_data, window=10):\n    ohlc_data[\"rolling_max\"] = ohlc_data[\"high\"].rolling(window=window).max()\n    ohlc_data[\"rolling_min\"] = ohlc_data[\"low\"].rolling(window=window).min()\n    significant_highs = ohlc_data[ohlc_data[\"high\"] == ohlc_data[\"rolling_max\"]]\n    significant_lows = ohlc_data[ohlc_data[\"low\"] == ohlc_data[\"rolling_min\"]]\n    return significant_highs, significant_lows<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>Once we have our significant highs and lows we want to calculate the Fibonacci Time Zones using the sequence. I have omitted the proceeding 0 and 1, and I have only plotted up to 89. You can adjust this more or less than you need but it&#8217;s about right.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code lang=\"python\" class=\"language-python\">def fibonacci_intervals(start_date, num_periods=100):\n    fib_sequence = [1, 2, 3, 5, 8, 13, 21, 34, 55, 89]  # etc.\n    intervals = [\n        start_date + pd.Timedelta(days=x) for x in fib_sequence if x &lt;= num_periods\n    ]\n    return intervals<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>The next step is optional but I always like to see the data visually. This function will plot the pricing data, including the significant highs and lows, and potential Fibonacci reversal points.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code lang=\"python\" class=\"language-python\">def plot_fibonacci_with_ohlc(\n    ohlc_data, significant_highs, significant_lows, fib_intervals\n):\n    ohlc_data[\"date_num\"] = mdates.date2num(ohlc_data[\"datetime\"])\n    fig, ax = plt.subplots(figsize=(12, 6))\n\n    candlestick_ohlc(\n        ax,\n        ohlc_data[[\"date_num\", \"open\", \"high\", \"low\", \"close\"]].values,\n        width=0.6,\n        colorup=\"green\",\n        colordown=\"red\",\n    )\n\n    for date in fib_intervals:\n        ax.axvline(x=mdates.date2num(date), color=\"blue\", linestyle=\"--\", lw=0.5)\n\n    ax.scatter(\n        mdates.date2num(significant_highs[\"datetime\"]),\n        significant_highs[\"high\"],\n        marker=\"^\",\n        color=\"green\",\n        label=\"Significant Highs\",\n    )\n    ax.scatter(\n        mdates.date2num(significant_lows[\"datetime\"]),\n        significant_lows[\"low\"],\n        marker=\"v\",\n        color=\"red\",\n        label=\"Significant Lows\",\n    )\n\n    ax.xaxis_date()\n    ax.xaxis.set_major_formatter(mdates.DateFormatter(\"%Y-%m-%d\"))\n    plt.xticks(rotation=45)\n    plt.xlabel(\"Date\")\n    plt.ylabel(\"Price\")\n    plt.title(\"OHLC Data with Fibonacci Timing Intervals\")\n    plt.legend()\n    plt.tight_layout()\n    plt.show()<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>This code will retrieve the OHLC data and calculate the significant highs and lows. I&#8217;m printing it to the screen for demonstration purposes.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code lang=\"python\" class=\"language-python\">ohlc_data = get_ohlc_data()\nhighs, lows = find_significant_points(ohlc_data)\n\nprint(\"Significant Highs:\")\nprint(highs)\n\nprint(\"\\nSignificant Lows:\")\nprint(lows)<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2440\" height=\"1262\" src=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/11\/Fibonacci-Timing-Pattern-Highs-and-Lows.png\" alt=\"\" class=\"wp-image-3968\"\/><figcaption class=\"wp-element-caption\">Screenshot by Author<\/figcaption><\/figure>\n<\/div>\n\n\n<p>What we will do now is take the first significant high and calculate the Fibonacci timing intervals from there. The 0 reflects the first significant high.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code lang=\"python\" class=\"language-python\">start_date = highs.iloc[0][\"datetime\"]  # first significant high\nfib_intervals = fibonacci_intervals(start_date)\n\nprint(\"Fibonacci Timing Intervals from start date\", start_date)\nfor date in fib_intervals:\n    print(date)<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"874\" height=\"306\" src=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/11\/Fibonacci-Timing-Pattern-First-High-1.png\" alt=\"\" class=\"wp-image-3974\"\/><figcaption class=\"wp-element-caption\">Screenshot by Author<\/figcaption><\/figure>\n<\/div>\n\n\n<p>We can now visualise it with Matplotlib like this.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code lang=\"python\" class=\"language-python\">plot_fibonacci_with_ohlc(ohlc_data, highs, lows, fib_intervals)<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"600\" src=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/11\/Fibonacci-Timing-Pattern-Graph.png\" alt=\"\" class=\"wp-image-3977\"\/><figcaption class=\"wp-element-caption\">Screenshot by Author<\/figcaption><\/figure>\n<\/div>\n\n\n<p>This graph is displaying the Apple hourly candlestick data with a scattergraph overlaid showing the significant highs in green and significant lows in red. It&#8217;s also showing the Fibonacci intervals from the first significant high.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><a class=\"maxbutton-1 maxbutton maxbutton-subscribe-to-api external-css btn\" href=\"https:\/\/eodhd.com\/register\"><span class='mb-text'>Register &amp; Get Data<\/span><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n\n\n\n<p>Using the Fibonacci sequence has been shown to be effective, but it&#8217;s not advisable to use it in isolation. Always apply additional technical analysis to strengthen the conclusion of a buy or sell signal.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last year I wrote a popular article on the Fibonacci Sequence and how it&#8217;s used in trading (it can be found here). The article introduced two topics, namely Fibonacci Retracement Levels and Fibonacci Extension Levels. There are two additional topics called Fibonacci Time Zones and Fibonacci Arcs and Fans that are interesting as well. This [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":3977,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[59],"tags":[],"coding-language":[30],"ready-to-go-solution":[56],"qualification":[31,32],"financial-apis-category":[36],"financial-apis-manuals":[38,40],"class_list":["post-3958","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technical-analysis-examples","coding-language-python","ready-to-go-solution-eodhd-python-financial-library","qualification-experienced","qualification-guru","financial-apis-category-stock-market-prices","financial-apis-manuals-intraday","financial-apis-manuals-technical-indicators","has_thumb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.9 (Yoast SEO v26.7) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Trade using the Fibonacci Time Zones with Python | EODHD APIs Academy<\/title>\n<meta name=\"description\" content=\"Unlock the power of Fibonacci Time Zones in trading. Learn how to use this powerful tool to make accurate market predictions\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Trade using the Fibonacci Time Zones with Python\" \/>\n<meta property=\"og:description\" content=\"Unlock the power of Fibonacci Time Zones in trading. Learn how to use this powerful tool to make accurate market predictions\" \/>\n<meta property=\"og:url\" content=\"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python\" \/>\n<meta property=\"og:site_name\" content=\"Financial Academy\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/eodhistoricaldata\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-22T13:54:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-05T13:37:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/11\/Fibonacci-Timing-Pattern-Graph.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Michael Whittle\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@EOD_data\" \/>\n<meta name=\"twitter:site\" content=\"@EOD_data\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Michael Whittle\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python#article\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python\"},\"author\":{\"name\":\"Michael Whittle\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad\"},\"headline\":\"How to Trade using the Fibonacci Time Zones with Python\",\"datePublished\":\"2023-11-22T13:54:57+00:00\",\"dateModified\":\"2025-02-05T13:37:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python\"},\"wordCount\":760,\"publisher\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#organization\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/11\/Fibonacci-Timing-Pattern-Graph.png\",\"articleSection\":[\"Technical Analysis Examples\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python\",\"name\":\"How to Trade using the Fibonacci Time Zones with Python | EODHD APIs Academy\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python#primaryimage\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/11\/Fibonacci-Timing-Pattern-Graph.png\",\"datePublished\":\"2023-11-22T13:54:57+00:00\",\"dateModified\":\"2025-02-05T13:37:53+00:00\",\"description\":\"Unlock the power of Fibonacci Time Zones in trading. Learn how to use this powerful tool to make accurate market predictions\",\"breadcrumb\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python#primaryimage\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/11\/Fibonacci-Timing-Pattern-Graph.png\",\"contentUrl\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/11\/Fibonacci-Timing-Pattern-Graph.png\",\"width\":1200,\"height\":600},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/eodhd.com\/financial-academy\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Trade using the Fibonacci Time Zones with Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#website\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/\",\"name\":\"Financial APIs Academy | EODHD\",\"description\":\"Financial Stock Market Academy\",\"publisher\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/eodhd.com\/financial-academy\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#organization\",\"name\":\"EODHD (EOD Historical Data)\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png\",\"contentUrl\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png\",\"width\":159,\"height\":82,\"caption\":\"EODHD (EOD Historical Data)\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/eodhistoricaldata\",\"https:\/\/x.com\/EOD_data\",\"https:\/\/www.reddit.com\/r\/EODHistoricalData\/\",\"https:\/\/eod-historical-data.medium.com\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad\",\"name\":\"Michael Whittle\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5076af85c7ee0445454257247cad4970ae8cf5d7d4940d2b32c521f51c0a0f5a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5076af85c7ee0445454257247cad4970ae8cf5d7d4940d2b32c521f51c0a0f5a?s=96&d=mm&r=g\",\"caption\":\"Michael Whittle\"},\"description\":\"Solution architect, developer, and analyst with over 20+ years experience (TOP author on Medium).\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/author\/michaelwhittle\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Trade using the Fibonacci Time Zones with Python | EODHD APIs Academy","description":"Unlock the power of Fibonacci Time Zones in trading. Learn how to use this powerful tool to make accurate market predictions","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python","og_locale":"en_US","og_type":"article","og_title":"How to Trade using the Fibonacci Time Zones with Python","og_description":"Unlock the power of Fibonacci Time Zones in trading. Learn how to use this powerful tool to make accurate market predictions","og_url":"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python","og_site_name":"Financial Academy","article_publisher":"https:\/\/www.facebook.com\/eodhistoricaldata","article_published_time":"2023-11-22T13:54:57+00:00","article_modified_time":"2025-02-05T13:37:53+00:00","og_image":[{"width":1200,"height":600,"url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/11\/Fibonacci-Timing-Pattern-Graph.png","type":"image\/png"}],"author":"Michael Whittle","twitter_card":"summary_large_image","twitter_creator":"@EOD_data","twitter_site":"@EOD_data","twitter_misc":{"Written by":"Michael Whittle","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python#article","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python"},"author":{"name":"Michael Whittle","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad"},"headline":"How to Trade using the Fibonacci Time Zones with Python","datePublished":"2023-11-22T13:54:57+00:00","dateModified":"2025-02-05T13:37:53+00:00","mainEntityOfPage":{"@id":"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python"},"wordCount":760,"publisher":{"@id":"https:\/\/eodhd.com\/financial-academy\/#organization"},"image":{"@id":"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python#primaryimage"},"thumbnailUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/11\/Fibonacci-Timing-Pattern-Graph.png","articleSection":["Technical Analysis Examples"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python","url":"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python","name":"How to Trade using the Fibonacci Time Zones with Python | EODHD APIs Academy","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-academy\/#website"},"primaryImageOfPage":{"@id":"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python#primaryimage"},"image":{"@id":"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python#primaryimage"},"thumbnailUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/11\/Fibonacci-Timing-Pattern-Graph.png","datePublished":"2023-11-22T13:54:57+00:00","dateModified":"2025-02-05T13:37:53+00:00","description":"Unlock the power of Fibonacci Time Zones in trading. Learn how to use this powerful tool to make accurate market predictions","breadcrumb":{"@id":"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python#primaryimage","url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/11\/Fibonacci-Timing-Pattern-Graph.png","contentUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/11\/Fibonacci-Timing-Pattern-Graph.png","width":1200,"height":600},{"@type":"BreadcrumbList","@id":"https:\/\/eodhd.com\/financial-academy\/technical-analysis-examples\/how-to-trade-using-the-fibonacci-time-zones-with-python#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/eodhd.com\/financial-academy\/"},{"@type":"ListItem","position":2,"name":"How to Trade using the Fibonacci Time Zones with Python"}]},{"@type":"WebSite","@id":"https:\/\/eodhd.com\/financial-academy\/#website","url":"https:\/\/eodhd.com\/financial-academy\/","name":"Financial APIs Academy | EODHD","description":"Financial Stock Market Academy","publisher":{"@id":"https:\/\/eodhd.com\/financial-academy\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/eodhd.com\/financial-academy\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/eodhd.com\/financial-academy\/#organization","name":"EODHD (EOD Historical Data)","url":"https:\/\/eodhd.com\/financial-academy\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/logo\/image\/","url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png","contentUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png","width":159,"height":82,"caption":"EODHD (EOD Historical Data)"},"image":{"@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/eodhistoricaldata","https:\/\/x.com\/EOD_data","https:\/\/www.reddit.com\/r\/EODHistoricalData\/","https:\/\/eod-historical-data.medium.com\/"]},{"@type":"Person","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad","name":"Michael Whittle","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5076af85c7ee0445454257247cad4970ae8cf5d7d4940d2b32c521f51c0a0f5a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5076af85c7ee0445454257247cad4970ae8cf5d7d4940d2b32c521f51c0a0f5a?s=96&d=mm&r=g","caption":"Michael Whittle"},"description":"Solution architect, developer, and analyst with over 20+ years experience (TOP author on Medium).","url":"https:\/\/eodhd.com\/financial-academy\/author\/michaelwhittle"}]}},"jetpack_featured_media_url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/11\/Fibonacci-Timing-Pattern-Graph.png","jetpack_shortlink":"https:\/\/wp.me\/pdOdVT-11Q","jetpack_sharing_enabled":true,"acf":[],"_links":{"self":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/3958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/comments?post=3958"}],"version-history":[{"count":18,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/3958\/revisions"}],"predecessor-version":[{"id":6293,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/3958\/revisions\/6293"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/media\/3977"}],"wp:attachment":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/media?parent=3958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/categories?post=3958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/tags?post=3958"},{"taxonomy":"coding-language","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/coding-language?post=3958"},{"taxonomy":"ready-to-go-solution","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/ready-to-go-solution?post=3958"},{"taxonomy":"qualification","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/qualification?post=3958"},{"taxonomy":"financial-apis-category","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/financial-apis-category?post=3958"},{"taxonomy":"financial-apis-manuals","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/financial-apis-manuals?post=3958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}