• Scan candle,  stock market

    Python Script to Identify Doji Candlestick Patterns

    A Doji candlestick is a special type of candlestick pattern in the stock market that shows indecision between buyers and sellers. When doji candlestick forms, it indicates that the market opens and closes at the same price. This means there is equality and indecision between buyers and sellers, with no one controlling the market How a Doji Candle Looks Line-by-Line Explanation 1. Importing Libraries 2. Change Current Working Directory 3. Generate Trading Session Opens the file access_token.txt and reads the access token (used for authenticated API calls). Reads API key & secret from api_key.txt and splits into a list.Example: ["your_api_key", "your_api_secret"] Creates a KiteConnect object with your API key. Sets…

  • stock market

    How to fetch historical data using kite connect

    Algo Trading is a method of trading in the stock market where computer programs automatically place buy and sell orders based on pre-defined rules. These rules are created using mathematical models, technical indicators, or market conditions. Explanation Learn how to use the Zerodha Kite Connect API in Python to fetch historical stock data. This step-by-step guide explains each line of code Importing Required Libraries Change Working Directory Generate Trading Session Fetch All NSE Instruments Helper Function: Fetch Instrument Token Fetch Historical OHLC Data 1.instrument = fetchInstrument(instrument_df, ticker)→ Finds the instrument token for the stock. 2. kite.historical_data(...) 3. Converts the returned JSON data into a Pandas DataFrame. 4. data.set_index("date", inplace=True)→ Sets the…