{"id":106783,"date":"2021-10-13T08:15:30","date_gmt":"2021-10-13T12:15:30","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=106783"},"modified":"2022-11-21T09:48:23","modified_gmt":"2022-11-21T14:48:23","slug":"price-action-trading-concepts-part-iii","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/price-action-trading-concepts-part-iii\/","title":{"rendered":"Price Action Trading Concepts \u2013 Part III"},"content":{"rendered":"\n<p><em>See\u00a0<a href=\"\/campus\/ibkr-quant-news\/price-action-trading-concepts-part-i\/\">Part I<\/a>\u00a0for an overview of price action trading and the different types of charts and <a href=\"\/campus\/ibkr-quant-news\/price-action-trading-concepts-part-ii\/\">Part II<\/a> to get insight on the concept of support and resistance.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"identifying-support-and-resistance-using-python\">Identifying support and resistance using Python<\/h2>\n\n\n\n<p>The first step in our approach is to import necessary libraries and get the asset data.<\/p>\n\n\n\n<p>We will be focusing on the close price data of HINDUNILVR.NS for performing the support and resistance analysis. We fetch the asset\u2019s OHLCV data from Yahoo! Finance and store it in a dataframe as shown below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Import Libraries\nimport numpy as np\nimport pandas as pd\nimport yfinance as yf\nfrom math import sqrt\nimport matplotlib.pyplot as plt\n\n# Set the start and end date\nstart = '2018-01-01\u00b0\nend = \u20182021-07-12\n\n# Set the ticker\nsymbol = \"HINDUNTLVR.NS*\n\n# Get the data from Yahoo! Finance\ndf = yf.dounload(symbol, start, end)\n\n# Disply the data\ndf.tail()<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><a href=\"https:\/\/gist.github.com\/quantra-go-algo\/b91f24287e84a8301315ce04cc217486#file-fetch-data-py\" target=\"_blank\" rel=\"noreferrer noopener\">Fetch data.py<\/a>&nbsp;hosted with \u2764 by&nbsp;<a href=\"https:\/\/github.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub<\/a><\/code><\/pre>\n\n\n\n<p>The last 5 rows of our data can be displayed using the df.tail() command.<\/p>\n\n\n\n<p>Output:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Date<\/td><td>Open<\/td><td>High<\/td><td>Low<\/td><td>Close<\/td><td>Adj Close<\/td><td>Volume<\/td><\/tr><tr><td>2021-07-05<\/td><td>2499.000000<\/td><td>2513.399902<\/td><td>2485.050049<\/td><td>2499.050049<\/td><td>2499.050049<\/td><td>761700<\/td><\/tr><tr><td>2021-07-06<\/td><td>2490.000000<\/td><td>2497.949951<\/td><td>2469.000000<\/td><td>2472.500000<\/td><td>2472.500000<\/td><td>461782<\/td><\/tr><tr><td>2021-07-07<\/td><td>2458.000000<\/td><td>2490.800049<\/td><td>2445.850098<\/td><td>2481.649902<\/td><td>2481.649902<\/td><td>623145<\/td><\/tr><tr><td>2021-07-08<\/td><td>2462.199951<\/td><td>2469.750000<\/td><td>2438.449951<\/td><td>2447.550049<\/td><td>2447.550049<\/td><td>1114426<\/td><\/tr><tr><td>2021-07-09<\/td><td>2440.000000<\/td><td>2464.500000<\/td><td>2438.449951<\/td><td>2451.449951<\/td><td>2451.449951<\/td><td>538094<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>To get a visual representation of the close price data, we will use various functions of the matplotlib library.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Plot the close price data\nseries = df&#91;\u2018Close\u2019]\nseries. index = np.arange(series.shape&#91;@])\n\nplt. figure(figsize=(15, 7))\nplt.title(symbol)\n\nplt.xlabel (\"Days\")\nplt.ylabel(\"Price\u2019)\nplt.plot(series, label-symbol)\n\nplt.legend()\nplt.show()<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><a href=\"https:\/\/gist.github.com\/quantra-go-algo\/583d12eced0ac0bf2185dd261a141570#file-plot-py\" target=\"_blank\" rel=\"noreferrer noopener\">Plot.py<\/a>&nbsp;hosted with \u2764 by&nbsp;<a href=\"https:\/\/github.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub<\/a><\/code><\/pre>\n\n\n\n<p>Here\u2019s the graph highlighting the close price of the asset:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/close-price-asset-quantinsit.png\" alt=\"\" class=\"wp-image-106812 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center\"><em>Close price<\/em><\/p>\n\n\n\n<p>Now since we have all our data in place, the next step is to identify the swing highs and the swing lows in the above price graph. An easier way to do this is to identify the local minima and local maxima points.<\/p>\n\n\n\n<p>To identify the local minima and maxima points, we will first need to smoothen the price graph. This can be achieved using the savgol.filter function from the scipy.signal library. To learn more about this function, you can visit the documentation page&nbsp;<a href=\"https:\/\/docs.scipy.org\/doc\/scipy\/reference\/generated\/scipy.signal.savgol_filter.html\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Create smooth graph of close price data\nfrom scipy.signal import savgol_filter\n\n# To find amount of data in months\nmonth_diff = series.shape&#91;0] \/\/ 30\n# We need value to be greater than 0\nif month_diff == 0:\n    month_diff = 1\n\n# Algo to determine smoothness\nsmooth = int(2 * month diff + 3)\n\n# Smooth price data\npoints = savgol_filter(series, smooth, 7)\n\n# Plot the smooth price graph over default price graph\nplt. figure(figsize=(15,7))\n\nplt.title(symbol)\n\nplt.xlabel (\"Days\")\n\nplt.ylabel(\"Price\u2019)\n\n# Close price data\nplt.plot(series, label-symbol)\n\n# Smooth close price data\nplt.plot(points, label=f'Smooth {symbol}\")\n\nplt.legend()\nplt.show()<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><a href=\"https:\/\/gist.github.com\/quantra-go-algo\/3b0a1048c651066f7fd26fde97624b2d#file-smooth-graph-py\" target=\"_blank\" rel=\"noreferrer noopener\">Smooth graph.py<\/a>&nbsp;hosted with \u2764 by&nbsp;<a href=\"https:\/\/github.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub<\/a><\/code><\/pre>\n\n\n\n<p><em>Stay tuned for the next installment of this series to learn how to plot and compare the normal close price graph with the smoothened close price graph<\/em><\/p>\n\n\n\n<p>For additional insight on this topic visit QuantInsti blog:&nbsp;<a href=\"https:\/\/blog.quantinsti.com\/price-action-trading\/\">https:\/\/blog.quantinsti.com\/price-action-trading\/<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The first step in identifying support and resistance using Python is to import necessary libraries and get the asset data.<\/p>\n","protected":false},"author":689,"featured_media":83281,"comment_status":"closed","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[339,343,349,338,350,341,344],"tags":[4676,10393,9865,10394,10500,865,10499,10391,1225,1224,10501,10390,595,445,10396,10502,1291,10392,10395,6674],"contributors-categories":[13654],"class_list":{"0":"post-106783","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-data-science","8":"category-programing-languages","9":"category-python-development","10":"category-ibkr-quant-news","11":"category-quant-asia-pacific","12":"category-quant-development","13":"category-quant-regions","14":"tag-bollinger-bands","15":"tag-candlestick-charts","16":"tag-candlestick-pattern-recognition","17":"tag-downtrend-market-trend","18":"tag-fetch-data-py","19":"tag-github","20":"tag-matplotlib-pyplot","21":"tag-moving-averages","22":"tag-numpy","23":"tag-pandas","24":"tag-plot-py","25":"tag-price-action-trading-concepts","26":"tag-python","27":"tag-rsi","28":"tag-sideways-market-trend","29":"tag-smooth-graph-py","30":"tag-technical-analysis","31":"tag-trendlines","32":"tag-uptrend-market-trend","33":"tag-yfinance","34":"contributors-categories-quantinsti"},"pp_statuses_selecting_workflow":false,"pp_workflow_action":"current","pp_status_selection":"publish","acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v27.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Price Action Trading Concepts \u2013 Part III | IBKR Quant<\/title>\n<meta name=\"description\" content=\"The first step in identifying support and resistance using Python is to import necessary libraries and get the asset data.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/106783\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Price Action Trading Concepts \u2013 Part III | IBKR Quant Blog\" \/>\n<meta property=\"og:description\" content=\"The first step in identifying support and resistance using Python is to import necessary libraries and get the asset data.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/price-action-trading-concepts-part-iii\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-13T12:15:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-21T14:48:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/04\/python-tile.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"563\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Kevin Patrao\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kevin Patrao\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t    \"@context\": \"https:\\\/\\\/schema.org\",\n\t    \"@graph\": [\n\t        {\n\t            \"@type\": \"NewsArticle\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/price-action-trading-concepts-part-iii\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/price-action-trading-concepts-part-iii\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Kevin Patrao\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/68e55b62ba4d9056240fe5ec50a0e68a\"\n\t            },\n\t            \"headline\": \"Price Action Trading Concepts \u2013 Part III\",\n\t            \"datePublished\": \"2021-10-13T12:15:30+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:48:23+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/price-action-trading-concepts-part-iii\\\/\"\n\t            },\n\t            \"wordCount\": 290,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/price-action-trading-concepts-part-iii\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2021\\\/04\\\/python-tile.jpg\",\n\t            \"keywords\": [\n\t                \"Bollinger Bands\",\n\t                \"candlestick charts\",\n\t                \"Candlestick Pattern Recognition\",\n\t                \"Downtrend market trend\",\n\t                \"Fetch data.py\",\n\t                \"GitHub\",\n\t                \"matplotlib.pyplot\",\n\t                \"Moving Averages\",\n\t                \"NumPy\",\n\t                \"Pandas\",\n\t                \"Plot.py\",\n\t                \"Price Action Trading Concepts\",\n\t                \"Python\",\n\t                \"rsi\",\n\t                \"Sideways market trend\",\n\t                \"Smooth graph.py\",\n\t                \"technical analysis\",\n\t                \"trendlines\",\n\t                \"Uptrend market trend\",\n\t                \"yfinance\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Programming Languages\",\n\t                \"Python Development\",\n\t                \"Quant\",\n\t                \"Quant Asia Pacific\",\n\t                \"Quant Development\",\n\t                \"Quant Regions\"\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/price-action-trading-concepts-part-iii\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/price-action-trading-concepts-part-iii\\\/\",\n\t            \"name\": \"Price Action Trading Concepts \u2013 Part III | IBKR Quant Blog\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/price-action-trading-concepts-part-iii\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/price-action-trading-concepts-part-iii\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2021\\\/04\\\/python-tile.jpg\",\n\t            \"datePublished\": \"2021-10-13T12:15:30+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:48:23+00:00\",\n\t            \"description\": \"The first step in identifying support and resistance using Python is to import necessary libraries and get the asset data.\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/price-action-trading-concepts-part-iii\\\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/price-action-trading-concepts-part-iii\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2021\\\/04\\\/python-tile.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2021\\\/04\\\/python-tile.jpg\",\n\t            \"width\": 1000,\n\t            \"height\": 563,\n\t            \"caption\": \"Python\"\n\t        },\n\t        {\n\t            \"@type\": \"WebSite\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"name\": \"IBKR Campus US\",\n\t            \"description\": \"Financial Education from Interactive Brokers\",\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"SearchAction\",\n\t                    \"target\": {\n\t                        \"@type\": \"EntryPoint\",\n\t                        \"urlTemplate\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/?s={search_term_string}\"\n\t                    },\n\t                    \"query-input\": {\n\t                        \"@type\": \"PropertyValueSpecification\",\n\t                        \"valueRequired\": true,\n\t                        \"valueName\": \"search_term_string\"\n\t                    }\n\t                }\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"Organization\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\",\n\t            \"name\": \"Interactive Brokers\",\n\t            \"alternateName\": \"IBKR\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"logo\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\",\n\t                \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"width\": 669,\n\t                \"height\": 669,\n\t                \"caption\": \"Interactive Brokers\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\"\n\t            },\n\t            \"publishingPrinciples\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/about-ibkr-campus\\\/\",\n\t            \"ethicsPolicy\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/cyber-security-notice\\\/\"\n\t        },\n\t        {\n\t            \"@type\": \"Person\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/68e55b62ba4d9056240fe5ec50a0e68a\",\n\t            \"name\": \"Kevin Patrao\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/kevinpatrao\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Price Action Trading Concepts \u2013 Part III | IBKR Quant","description":"The first step in identifying support and resistance using Python is to import necessary libraries and get the asset data.","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:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/106783\/","og_locale":"en_US","og_type":"article","og_title":"Price Action Trading Concepts \u2013 Part III | IBKR Quant Blog","og_description":"The first step in identifying support and resistance using Python is to import necessary libraries and get the asset data.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/price-action-trading-concepts-part-iii\/","og_site_name":"IBKR Campus US","article_published_time":"2021-10-13T12:15:30+00:00","article_modified_time":"2022-11-21T14:48:23+00:00","og_image":[{"width":1000,"height":563,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/04\/python-tile.jpg","type":"image\/jpeg"}],"author":"Kevin Patrao","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kevin Patrao","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/price-action-trading-concepts-part-iii\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/price-action-trading-concepts-part-iii\/"},"author":{"name":"Kevin Patrao","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/68e55b62ba4d9056240fe5ec50a0e68a"},"headline":"Price Action Trading Concepts \u2013 Part III","datePublished":"2021-10-13T12:15:30+00:00","dateModified":"2022-11-21T14:48:23+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/price-action-trading-concepts-part-iii\/"},"wordCount":290,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/price-action-trading-concepts-part-iii\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/04\/python-tile.jpg","keywords":["Bollinger Bands","candlestick charts","Candlestick Pattern Recognition","Downtrend market trend","Fetch data.py","GitHub","matplotlib.pyplot","Moving Averages","NumPy","Pandas","Plot.py","Price Action Trading Concepts","Python","rsi","Sideways market trend","Smooth graph.py","technical analysis","trendlines","Uptrend market trend","yfinance"],"articleSection":["Data Science","Programming Languages","Python Development","Quant","Quant Asia Pacific","Quant Development","Quant Regions"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/price-action-trading-concepts-part-iii\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/price-action-trading-concepts-part-iii\/","name":"Price Action Trading Concepts \u2013 Part III | IBKR Quant Blog","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/price-action-trading-concepts-part-iii\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/price-action-trading-concepts-part-iii\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/04\/python-tile.jpg","datePublished":"2021-10-13T12:15:30+00:00","dateModified":"2022-11-21T14:48:23+00:00","description":"The first step in identifying support and resistance using Python is to import necessary libraries and get the asset data.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/price-action-trading-concepts-part-iii\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/price-action-trading-concepts-part-iii\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/04\/python-tile.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/04\/python-tile.jpg","width":1000,"height":563,"caption":"Python"},{"@type":"WebSite","@id":"https:\/\/ibkrcampus.com\/campus\/#website","url":"https:\/\/ibkrcampus.com\/campus\/","name":"IBKR Campus US","description":"Financial Education from Interactive Brokers","publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ibkrcampus.com\/campus\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ibkrcampus.com\/campus\/#organization","name":"Interactive Brokers","alternateName":"IBKR","url":"https:\/\/ibkrcampus.com\/campus\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","width":669,"height":669,"caption":"Interactive Brokers"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/"},"publishingPrinciples":"https:\/\/www.interactivebrokers.com\/campus\/about-ibkr-campus\/","ethicsPolicy":"https:\/\/www.interactivebrokers.com\/campus\/cyber-security-notice\/"},{"@type":"Person","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/68e55b62ba4d9056240fe5ec50a0e68a","name":"Kevin Patrao","url":"https:\/\/www.interactivebrokers.com\/campus\/author\/kevinpatrao\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/04\/python-tile.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/106783","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/users\/689"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=106783"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/106783\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/83281"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=106783"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=106783"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=106783"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=106783"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}