Introducing coding using Google Sheets

Discussion in 'Strategy Building' started by themickey, Oct 20, 2024.

  1. themickey

    themickey

    Indexes and sectors can be added...... in this instance USA.......

    NYSEARCA:XLC Communication Services
    NYSEARCA:XLY Consumer Discretionary
    NYSEARCA:XLP Consumer Staples
    NYSEARCA:XLE Energy
    NYSEARCA:XLF Financial
    NYSEARCA:XLV Health Care
    NYSEARCA:XLI Industrial
    NYSEARCA:XLB Materials
    NYSEARCA:XLRE Real Estate
    NYSEARCA:XLk Technology
    NYSEARCA:XLU Utilities
     
    #11     Oct 20, 2024
  2. themickey

    themickey

    Want to track uranium sector.......

    URA Global X Uranium ETF
    URNM Sprott Uranium Miners ETF
    CCJ Cameco Corp
    SRUUF Sprott Physical Uranium Trust
    NXE NexGen Energy Ltd
    UEC Uranium Energy Corp.
    NLR Vaneck Uranium & Nuclear Energy ETF
    DNN Denison Mines Corp
    TSE: DML Denison Mines Corp
    TSE:EFR Energy Fuels Inc
    UUUU Energy Fuels Inc
    LEU Centrus Energy Corp
    TSE:FCU Fission Uranium Corp
    URG Ur-Energy Inc.
    ASX:URNM Betashares Global Uranium ETF
    ASX: PDN Paladin Energy Ltd
    ASX:BOE Boss Energy Ltd
    ASX: DYL Deep Yellow Limited
    ASX:SLX Silex Systems Ltd
    ASX:BMN Bannerman Energy Ltd
    ASX:LOT Lotus Resources
    ASX: PEN Peninsular Energy
     
    Last edited: Oct 20, 2024
    #12     Oct 20, 2024
  3. themickey

    themickey

    Maybe crypto......

    MSTR MicroStrategy Incorporated CRYPTO
    COIN Coinbase Global Inc CRYPTO
    GBTC Grayscale Bitcoin Trust (Btc) CRYPTO
    BITO ProShares Bitcoin Strategy ETF CRYPTO
    IBIT Blackrock ishares Bitcoin Trust ETF CRYPTO
    ARKB ARK 21Shares Bitcoin ETF CRYPTO
    BITB Bitwise Bitcoin ETF CRYPTO
    BRRR Valkyrie Bitcoin ETF CRYPTO
    BLOK Amplify Transformational Data Sharing ETF CRYPTO
    BTCO Invesco Galaxy Bitcoin ETF CRYPTO
    FBTC Fidelity Advantage Bitcoin ETF CRYPTO
    EZBC Franklin Bitcoin ETF CRYPTO
    ASX:VBTC ASX Crypto ETF CRYPTO
    ASX:CRYP ASX Crypto ETF CRYPTO
    BTF Valkyrie Bitcoin Strategy ETF CRYPTO
    BTF Valkyrie Bitcoin and Ether Strategy ETF CRYPTO
    BITQ Bitwise Crypto Industry Innovators ETF CRYPTO
    HBLK Blockchain Technologies ETF Units Class A CRYPTO
    AETH Bitwise Ethereum Strategy ETF CRYPTO
    BTCW Bitcoin Well Inc CRYPTO
    KOIN Capital Link NextGen Protocol ETF CRYPTO
    DAPP VanEck Digital Transformation ETF CRYPTO
    MARA Marathon Digital Holdings Inc CRYPTO MINER
    CLSK CleanSpark Inc CRYPTO MINER
    RIOT Riot Blockchain Inc CRYPTO MINER
    HUT Hut 8 Mining Corp CRYPTO MINER
    BITF Bitfarms Ltd CRYPTO MINER
    CIFR Cipher Mining Inc CRYPTO MINER
    BTBT Bit Digital Inc CRYPTO MINER
    CAN Canaan Inc - ADR CRYPTO MINER
    HIVE HIVE Digital Technologies Ltd CRYPTO MINER
     
    #13     Oct 20, 2024
  4. themickey

    themickey

    What you can't access on Sheets is Futures data.

    Indexes have a different formula:
    INDEXSP:SPADR [S&P Global 1200 ADR Index (USD)]
    INDEXTSI:TSXE [Canada SXE]
    INDEXBOM:SENSEX [BSE SENSEX (Bombay)]
    INDEXTSI:TXBM [S&P/TSX Global Base Metals Index]
    INDEXASX:XMM [XMM Index]

    Currencies themselves is limited. For currencies use the following:
    upload_2024-10-21_5-47-18.png

    Don't forget to put the = sign before the formula

    If you're looking for codes, use google or ask here.
     
    Last edited: Oct 20, 2024
    #14     Oct 20, 2024
  5. themickey

    themickey

    Now to look at specific formulas to assist with the watchlist.
    Below is a formula to find the closing price of BHP on 3rd January 2024
    The date is in cell D9

    upload_2024-10-21_5-58-12.png

    You can access historical data, OHLCV
    Don't forget to put the = sign before the formula
     
    #15     Oct 20, 2024
  6. Good1

    Good1

    You used to be able to get individual crypto coins prices in real time. Not sure what the status is on that now.

    It's similar to TradingView in that your code is running on their servers, rather than your desktop. You can close your laptop and it still runs.

    Most TradingView data is delayed also, unless you actually purchase a data plan. Does Google sheets offer data plan purchases for real time data?

    Excel, on the other hand, while it supports sheets of formulas online, it does not (yet?) support VBA code. You would need to install it in a place like AWS to have Excel VBA running 24/7 (unless for some reason you are able to run a desktop 24/7).
     
    #16     Oct 20, 2024
  7. themickey

    themickey

    Want to stitch cells together? Then use the concatenate formula.

    upload_2024-10-21_6-30-55.png

    Don't forget to put the = sign before the formula
     
    #17     Oct 20, 2024
  8. themickey

    themickey

    You want historical data going back however long?
    You can do that.
    You can have daily or weekly data which includes OHLCV or just individually OHLCV.

    upload_2024-10-21_7-28-47.png

    In the example above is just 6 days of data for BHP, but you can do years of data.
    The data can go horizontally or vertically, in the example above it's horizontal.
    In cell A17 is the word "all", this means you want all data.
    If you were to type in "High" this would only give you high of the day.
     
    #18     Oct 20, 2024
  9. themickey

    themickey

    upload_2024-10-21_7-35-43.png

    Here is only Highs of the day data, note cell A17 is "high"
    Cell B17 is start date.
    Cell C17 is end date
     
    #19     Oct 20, 2024
  10. themickey

    themickey

    Another feature you can use with Sheets is Sparkline charts or mini thumb sized charts.

    upload_2024-10-26_6-3-38.png

    Below is the formula for the Sparkline chart for D3.....

    upload_2024-10-26_6-9-40.png
     
    #20     Oct 25, 2024