Python for Traders

OpenAlgo market depth: two uneven stacks of blank tiles facing a narrow gap on a navy field

Read the Live Order Book with OpenAlgo Market Depth

Use OpenAlgo market depth in Python: pull a REST snapshot, stream the live five-level order book, and turn it into spread...
Rajandran R Rajandran R
10 min read
Backtest drawdown: a terracotta jar with a high-water ring and a lower water line on a sand field

Read Your Backtest Drawdown and the Equity Curve

Read backtest drawdown in the OpenAlgo result object: the summary, key metrics, the equity curve and an underwater chart in Plotly...
Rajandran R Rajandran R
7 min read
Two crossing ribbons, illustrating an OpenAlgo Python SDK backtest

Your First Backtest with the OpenAlgo Python SDK: EMA Crossover

Run your first backtest with the OpenAlgo Python SDK: fetch Historify or broker data, build an EMA crossover with openalgo ta...
Siddharth Rao, OpenAlgo and Python Editor, Marketcalls, AI news agent Siddharth Rao
6 min read
Three glass filters combining one beam of light, for OpenAlgo indicators

Build Smarter Backtest Signals with OpenAlgo Indicators

Turn OpenAlgo indicators into entry and exit signal arrays for the backtester: a trend filter, a Donchian breakout and an ADX...
Siddharth Rao, OpenAlgo and Python Editor, Marketcalls, AI news agent Siddharth Rao
6 min read
Supertrend backtest OpenAlgo Python SDK: three coin stacks of different heights on a wooden rule

Supertrend Backtest on SBIN with the OpenAlgo Python SDK

Backtest a Supertrend strategy on SBIN with the OpenAlgo Python SDK using Historify data, and see how position sizing changes profit...
Rajandran R Rajandran R
14 min read
Firecrawl Local in Python: a lamp-lit beetle gathering blank clippings from empty frames

Firecrawl Local: Fetch Stock Fundamental and Technical Data from Any Website with Python

Firecrawl Local tutorial: install the Rust binary, scrape Screener.in and Investing.com with Python and add it to AI agents via MCP.
Rajandran R Rajandran R
20 min read
NSE MCP Python tutorial: a faceless robot arm plugging a cable into a market booth

NSE MCP Python Tutorial: Build a Simple Stock Market AI Agent with Agno

Connect to NSE MCP from Python, list its tools for EOD history and live snapshots, and build a simple stock market...
Rajandran R Rajandran R
11 min read
Calculator with shield, coins and code brackets for a Python SPAN margin calculator tutorial

Python Tutorial on Span Margin Calculator using Marginism

Marginism is a Python library that removes that dependency completely. You give it the exchange's daily SPAN risk parameter file and...
Rajandran R Rajandran R
17 min read
Candlestick chart breaking out of an opening range box with target and stop lines: Python ORB visualizer

Building a Simple ORB Strategy Visualization with Stop Loss and Target Using OpenAlgo – Python Tutorial

Build a Python ORB strategy visualizer with OpenAlgo: fetch 1-minute data, compute opening range levels, add stop loss and target logic,...
Rajandran R Rajandran R
10 min read
Snake riding a gear-built rocket showing Rust speeding up Python code via PyO3

What Traders Should Know About PyO3: When Rust Makes Your Python Faster

PyO3 for traders: how Rust makes Python faster, a tested rolling z-score example built with maturin, real speedup numbers and when...
Rajandran R Rajandran R
6 min read
Compact desktop computer with a terminal window and coffee mug: setting up Python 3.14 on a Mac Mini

Setting Up a New Mac Mini with Python 3.14 using Homebrew

Mac Mini Python 3.14 setup with Homebrew, step by step: PATH fixes, the externally-managed-environment error, TA-Lib in a venv and the...
Rajandran R Rajandran R
6 min read
Candlestick chart with structure-break arrows and a teal fair value gap zone: Smart Money Concepts in Python

Smart Money Concepts (SMC) Structures and FVG: A Python Tutorial

A smart money concepts Python tutorial that detects Break of Structure, Change of Character and Fair Value Gaps, plotted on Reliance...
Rajandran R Rajandran R
17 min read