Loading...
Loading...
OpenAlgo indicator expert. Use when user asks about technical indicators, charting, plotting indicators, creating custom indicators, building dashboards, real-time feeds, scanning stocks, indicator combinations, or using openalgo.ta. Also triggers for indicator functions (sma, ema, rsi, macd, supertrend, bollinger, atr, adx, ichimoku, stochastic, obv, vwap, crossover, crossunder, exrem).
npx skill4agent add marketcalls/openalgo-indicator-skills indicator-expertclient.history()client.quotes()client.depth()client.connect()subscribe_ltpsubscribe_quotesubscribe_depthtemplate="plotly_dark"dash-bootstrap-componentsst.plotly_chart()@njit(cache=True, nogil=True).envpython-dotenvfind_dotenv()ta.exrem().fillna(False)template="plotly_dark"xaxis type="category"@njit(cache=True, nogil=True)fastmath=Trueclient.connect()client.subscribe_ltp()subscribe_quote()subscribe_depth().envfind_dotenv()| Market | Data Source | Method | Example Symbols |
|---|---|---|---|
| India (equity) | OpenAlgo | | SBIN, RELIANCE, INFY |
| India (index) | OpenAlgo | | NIFTY, BANKNIFTY |
| India (F&O) | OpenAlgo | | NIFTY30DEC25FUT |
| US/Global | yfinance | | AAPL, MSFT, SPY |
| Method | Purpose | Returns |
|---|---|---|
| OHLCV candles | DataFrame (timestamp, open, high, low, close, volume) |
| Real-time snapshot | Dict (open, high, low, ltp, bid, ask, prev_close, volume) |
| Multi-symbol quotes | List of quote dicts |
| Market depth (L5) | Dict (bids, asks, ohlc, volume, oi) |
| Available intervals | Dict (minutes, hours, days, weeks, months) |
| WebSocket connect | None (sets up WS connection) |
| Live LTP stream | Callback with |
| Live quote stream | Callback with |
| Live depth stream | Callback with |
from openalgo import tata.smata.emata.wmata.demata.temata.hmata.vwmata.almata.kamata.zlemata.t3ta.framata.supertrendta.ichimokuta.chande_kroll_stopta.trimata.mcginleyta.vidyata.alligatorta.ma_envelopesta.rsita.macdta.stochasticta.ccita.williams_rta.bopta.elder_rayta.fisherta.crsita.atrta.bbandsta.keltnerta.donchianta.chaikin_volatilityta.natrta.rvita.ultimate_oscillatorta.true_rangeta.massindexta.bb_percentta.bb_widthta.chandelier_exitta.historical_volatilityta.ulcer_indexta.starcta.obvta.obv_smoothedta.vwapta.mfita.adlta.cmfta.emvta.force_indexta.nvita.pvita.voloscta.vrocta.kvota.pvtta.cmota.trixta.uo_oscillatorta.awesome_oscillatorta.accelerator_oscillatorta.ppota.pota.dpota.aroon_oscillatorta.stoch_rsita.rvi_oscillatorta.chota.chopta.kstta.tsita.vortexta.gator_oscillatorta.stcta.coppockta.rocta.linregta.lrslopeta.correlationta.betata.varianceta.tsfta.medianta.modeta.median_bandsta.adxta.dmita.aroonta.pivot_pointsta.sarta.williams_fractalsta.rwita.crossoverta.crossunderta.crossta.highestta.lowestta.changeta.rocta.stdevta.exremta.flipta.valuewhenta.risingta.fallingrules/| Rule File | Topic |
|---|---|
| indicator-catalog | Complete 100+ indicator reference with signatures and parameters |
| data-fetching | OpenAlgo history/quotes/depth, yfinance, data normalization |
| plotting | Plotly candlestick, overlay, subplot, multi-panel charts |
| custom-indicators | Building custom indicators with Numba + NumPy |
| websocket-feeds | Real-time LTP/Quote/Depth streaming via WebSocket |
| numba-optimization | Numba JIT patterns, cache, nogil, NaN handling |
| dashboard-patterns | Plotly Dash web applications with callbacks |
| streamlit-patterns | Streamlit web applications with sidebar, metrics, plotly charts |
| multi-timeframe | Multi-timeframe indicator analysis |
| signal-generation | Signal generation, cleaning, crossover/crossunder |
| indicator-combinations | Combining indicators for confluence analysis |
| symbol-format | OpenAlgo symbol format, exchange codes, index symbols |
| Template | Path | Description |
|---|---|---|
| EMA Chart | | EMA overlay on candlestick |
| RSI Chart | | RSI with overbought/oversold zones |
| MACD Chart | | MACD line, signal, histogram |
| Supertrend | | Supertrend overlay with direction coloring |
| Bollinger | | Bollinger Bands with squeeze detection |
| Multi-Indicator | | Candlestick + EMA + RSI + MACD + Volume |
| Basic Dashboard | | Single-symbol Plotly Dash app |
| Multi Dashboard | | Multi-symbol multi-timeframe dashboard |
| Streamlit Basic | | Single-symbol Streamlit app |
| Streamlit Multi | | Multi-timeframe Streamlit app |
| Custom Indicator | | Numba custom indicator template |
| Live Feed | | WebSocket real-time indicator |
| Scanner | | Multi-symbol indicator scanner |
import os
from datetime import datetime, timedelta
from pathlib import Path
import numpy as np
import pandas as pd
import plotly.graph_objects as go
from plotly.subplots import make_subplots
from dotenv import find_dotenv, load_dotenv
from openalgo import api, ta
# --- Config ---
script_dir = Path(__file__).resolve().parent
load_dotenv(find_dotenv(), override=False)
SYMBOL = "SBIN"
EXCHANGE = "NSE"
INTERVAL = "D"
# --- Fetch Data ---
client = api(
api_key=os.getenv("OPENALGO_API_KEY"),
host=os.getenv("OPENALGO_HOST", "http://127.0.0.1:5000"),
)
end_date = datetime.now().date()
start_date = end_date - timedelta(days=365)
df = client.history(
symbol=SYMBOL, exchange=EXCHANGE, interval=INTERVAL,
start_date=start_date.strftime("%Y-%m-%d"),
end_date=end_date.strftime("%Y-%m-%d"),
)
if "timestamp" in df.columns:
df["timestamp"] = pd.to_datetime(df["timestamp"])
df = df.set_index("timestamp")
else:
df.index = pd.to_datetime(df.index)
df = df.sort_index()
if df.index.tz is not None:
df.index = df.index.tz_convert(None)
close = df["close"]
high = df["high"]
low = df["low"]
volume = df["volume"]
# --- Compute Indicators ---
ema_20 = ta.ema(close, 20)
rsi_14 = ta.rsi(close, 14)
# --- Chart ---
fig = make_subplots(
rows=2, cols=1, shared_xaxes=True,
row_heights=[0.7, 0.3], vertical_spacing=0.03,
subplot_titles=[f"{SYMBOL} Price + EMA(20)", "RSI(14)"],
)
# Candlestick
x_labels = df.index.strftime("%Y-%m-%d")
fig.add_trace(go.Candlestick(
x=x_labels, open=df["open"], high=high, low=low, close=close,
name="Price",
), row=1, col=1)
# EMA overlay
fig.add_trace(go.Scatter(
x=x_labels, y=ema_20, mode="lines",
name="EMA(20)", line=dict(color="cyan", width=1.5),
), row=1, col=1)
# RSI subplot
fig.add_trace(go.Scatter(
x=x_labels, y=rsi_14, mode="lines",
name="RSI(14)", line=dict(color="yellow", width=1.5),
), row=2, col=1)
fig.add_hline(y=70, line_dash="dash", line_color="red", row=2, col=1)
fig.add_hline(y=30, line_dash="dash", line_color="green", row=2, col=1)
fig.update_layout(
template="plotly_dark", title=f"{SYMBOL} Technical Analysis",
xaxis_rangeslider_visible=False, xaxis_type="category",
xaxis2_type="category", height=700,
)
fig.show()