indicator-expert
Original:🇺🇸 English
Translated
13 scriptsChecked / no sensitive code detected
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).
4installs
Added on
NPX Install
npx skill4agent add marketcalls/openalgo-indicator-skills indicator-expertTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →OpenAlgo Indicator Expert Skill
Environment
- Python with openalgo, pandas, numpy, plotly, dash, streamlit, numba
- Data sources: OpenAlgo (Indian markets via ,
client.history(),client.quotes()), yfinance (US/Global)client.depth() - Real-time: OpenAlgo WebSocket (,
client.connect(),subscribe_ltp,subscribe_quote)subscribe_depth - Indicators: openalgo.ta (ALWAYS — 100+ Numba-optimized indicators)
- Charts: Plotly with
template="plotly_dark" - Dashboards: Plotly Dash with OR Streamlit with
dash-bootstrap-componentsst.plotly_chart() - Custom indicators: Numba + NumPy
@njit(cache=True, nogil=True) - API keys loaded from single root via
.env+python-dotenv— never hardcode keysfind_dotenv() - Scripts go in appropriate directories (charts/, dashboards/, custom_indicators/, scanners/) created on-demand
- Never use icons/emojis in code or logger output
Critical Rules
- ALWAYS use openalgo.ta for ALL technical indicators. Never reimplement what already exists in the library.
- Data normalization: Always convert DataFrame index to datetime, sort, and strip timezone after fetching.
- Signal cleaning: Always use after generating raw buy/sell signals. Always
ta.exrem()before exrem..fillna(False) - Plotly dark theme: All charts use with
template="plotly_dark"for candlesticks.xaxis type="category" - Numba for custom indicators: Use — never
@njit(cache=True, nogil=True)(breaks NaN handling).fastmath=True - Input flexibility: openalgo.ta accepts numpy arrays, pandas Series, or lists. Output matches input type.
- WebSocket feeds: Use ,
client.connect()/client.subscribe_ltp()/subscribe_quote()for real-time data.subscribe_depth() - Environment: Load from project root via
.env— never hardcode API keys.find_dotenv() - Market detection: If symbol looks Indian (SBIN, RELIANCE, NIFTY), use OpenAlgo. If US (AAPL, MSFT), use yfinance.
- Always explain chart outputs in plain language so traders understand what the indicator shows.
Data Source Priority
| 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 |
OpenAlgo API Methods for Data
| 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 |
Indicator Library Reference
All indicators accessed via :
from openalgo import taTrend (20)
ta.smata.emata.wmata.demata.temata.hmata.vwmata.almata.kamata.zlemata.t3ta.framata.supertrendta.ichimokuta.chande_kroll_stopta.trimata.mcginleyta.vidyata.alligatorta.ma_envelopesMomentum (9)
ta.rsita.macdta.stochasticta.ccita.williams_rta.bopta.elder_rayta.fisherta.crsiVolatility (16)
ta.atrta.bbandsta.keltnerta.donchianta.chaikin_volatilityta.natrta.rvita.ultimate_oscillatorta.true_rangeta.massindexta.bb_percentta.bb_widthta.chandelier_exitta.historical_volatilityta.ulcer_indexta.starcVolume (14)
ta.obvta.obv_smoothedta.vwapta.mfita.adlta.cmfta.emvta.force_indexta.nvita.pvita.voloscta.vrocta.kvota.pvtOscillators (20+)
ta.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.rocStatistical (9)
ta.linregta.lrslopeta.correlationta.betata.varianceta.tsfta.medianta.modeta.median_bandsHybrid (6+)
ta.adxta.dmita.aroonta.pivot_pointsta.sarta.williams_fractalsta.rwiUtilities
ta.crossoverta.crossunderta.crossta.highestta.lowestta.changeta.rocta.stdevta.exremta.flipta.valuewhenta.risingta.fallingModular Rule Files
Detailed reference for each topic is in :
rules/| 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 |
Chart Templates (in rules/assets/)
| 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 |
Quick Template: Standard Indicator Chart Script
python
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()