TickAtlas
Beginner ~10 min

Excel Integration

Pull live indicator data into Microsoft Excel using VBA custom functions or Power Query.

Option 1: VBA Custom Function

Press Alt+F11 to open VBA Editor, insert a new Module, and paste:

bash
Function CLAW(symbol As String, indicator As String, timeframe As String) As Variant
    Dim url As String
    Dim apiKey As String
    Dim http As Object

    apiKey = "YOUR_API_KEY"
    url = "https://tickatlas.com/v1/indicator" & _
          "?symbol=" & symbol & _
          "&indicator=" & indicator & _
          "&timeframe=" & timeframe

    Set http = CreateObject("MSXML2.XMLHTTP")
    http.Open "GET", url, False
    http.setRequestHeader "X-API-Key", apiKey
    http.Send

    If http.Status = 200 Then
        ' Parse JSON (requires VBA-JSON or manual parsing)
        Dim json As String
        json = http.responseText
        ' Extract value between "value": and next comma
        Dim pos1 As Long, pos2 As Long
        pos1 = InStr(json, """value"":") + 8
        pos2 = InStr(pos1, json, ",")
        CLAW = CDbl(Mid(json, pos1, pos2 - pos1))
    Else
        CLAW = "Error: " & http.Status
    End If
End Function

' Usage: =CLAW("EURUSD","RSI_14","H1")

Option 2: Power Query

Go to Data > Get Data > From Other Sources > Blank Query, then open Advanced Editor:

bash
let
    ApiKey = "YOUR_API_KEY",
    Symbol = "EURUSD",
    Indicator = "RSI_14",
    Timeframe = "H1",
    Url = "https://tickatlas.com/v1/indicator?symbol="
        & Symbol & "&indicator=" & Indicator & "&timeframe=" & Timeframe,
    Source = Json.Document(
        Web.Contents(Url, [Headers=[#"X-API-Key"=ApiKey]])
    ),
    Value = Source[value]
in
    Value

Related