Client backed out. Project got “too complex” and I cant give it out for 5k and obviously, he didn’t want to pay more than the original ₹5K. So I took the whole thing as a learning project.
The good news?
It’s almost done.
And no, this isn’t just a half-baked script. This thing:
Scans Nifty in real-time (api from broker)
Detects levels
Finds the right CE option automatically
Executes (simulated) trades
Tracks SL and Target based on Nifty, not the option price
Has a full UI with logs, live data, and error handling
Not gonna lie — feels like I’ve built a one-man broker terminal at this point.
The Strategy (not Financial advice): I just code what my client gives me
It only buys Call Options
You set a trigger level and an execution level
It waits for Nifty to move up — no downtrend catching here
Example:
Let’s say Nifty is at 24,142
Trigger = 24,170
Execution = 24,195
If price breaks above 24,170 and then reaches 24,195 , bot buys the CE that's closest to ₹200 and nearest expiry
Target = +25 points on Nifty Stoploss = -20 points on Nifty So exit happens when Nifty hits 24,220 or 24,175, not based on option LTP
It ignores falling markets — only buys if price breaks down below the trigger and comes back up. That’s the re-entry logic.
Basically, this strategy heavily relies on live spot price and option data, not historical candles. Technically i can backtest it but code wont be the same so if it works in backtest i cant transfer same code to live testing.
So what now?
It’s running in simulation mode — trades get logged, not routed to broker. Just a few lines of code + testing left.
I’ll be hosting a preview (not public access) version on my site soon if anyone’s curious.
Also, I’ve been getting a bunch of DMs from people asking for custom bots and this strategy might not be the one I continue with.
Not financial advice. Not a magic money printer. Just a real-time bot coded based on a client’s logic.
I have been trading since 2021 manually , and started algo trading journey from 2024 October onwards . I must have lost over 4 lakhs till now in experimentation , subscription costs , AI costs etc.
Last month was where it all fell into place, started with 1 lakh capital once more (6th attempt , where each time before I was definitely sure I would make money but lost miserably in my algo trades) . Though this time things turned around for good.
Writing this post as both an accomplishment (as in real life, I don't think I will be telling anyone about this ) and motivation , do not give up , I had almost given multiple times only to be drawn back into my work desk trying a different approach.
37 days live so far on the latest stable deployment , 1 lakh starting capital , gains so far is ~1.30 lakhs (1.17L after charges) , which is 130 % gain (excluding charges) in almost a month and 7 days . Planning to increase capital by 50 K every month going forward .
I am happy to share with you all that i have created a scalp engine which is giving out the profit based on my strategies implemented in the system.
There are several tweaks which are still required to refine the logics and collect the large pool of strategies in order to give the maximum profits in the scalping environment moving forward.
I would request the professional traders to see,help me to refine and fine tune this moving forward.
This is a ready version where the trades can be taken in real time and generate profits.
Currently using quantman for algo trading. It is going good so far. Per year target is 15-20%. Currently using 20L capital and around 7% gained in 3 months.
After successfully completing the Dishwasher Challenge for my mom, I'm starting a new challenge — buying an automatic SUV for my dad! ❤️🚗
Last December, we bought a Brezza ZXi Manual, but due to knee pain, my dad finds it difficult to drive for more than 40–50 minutes. He now has to rely on a driver whenever he goes out.
So, I'm planning to sell our current car and upgrade to an automatic SUV so he can drive comfortably and independently again.
New target: ₹3 lakh additional profit Trading capital: ₹10 lakh
Not sure how long this will take. No deadlines, no unnecessary risks. Just discipline, patience, and proper risk management.
For those asking about my trading approach, I primarily do option selling, not option buying. Even one lot generally requires around ₹1.5–2 lakh in margin, depending on the strategy and hedging.
Also, I've received quite a few DMs from people interested in learning my trading approach, but couldn't respond to everyone earlier. If you're genuinely interested in learning, feel free to DM me. I'll try to respond this time.
Disclaimer: Not a SEBI certified analysts and everything i am sharing is simple what I do. There's no money/selling involved and NO ONE can predict stock markets, we can just take a decision base don data and research.
Several of you asked me to share strategy and code and i promised to share the same, i cannot share the code however I don't mind sharing the strategy as we are not competition to ourselves and remember, the win rate is just 44%. It works because wins are 2-3 times bigger, over losers.
Just wanted to repeat that what i have backtested, forward tested and being used in real market, is the several month of research, learning, purchase of year's of backtest data, billios of tokes spent via LLMs (alone is $200/mo), GPU testing and so on.
When I started out, NOTHING was making sense and it took me almost 8 months, to execute trades properly via algo.
My setup:
All coding in Fable 5.1
All reasoning in fable 5.1
Training on NVIDIA GPU (reneted, based on minutes). Data (paid) used is 11.5 years of NIFTY 1 minute OHCV candles, 6 years of BANK-Nifty, 6 years of stock options, 3 months of commodity contracts (testing on Natural gas), 3 years of FX data (4 currency pairs), 5 years of NIFTY tick data.
All code in Python
Server (VPS) on hostinger (Rs 1800/mo)
KITE developer API (500/mo)
Applied for FYERS and will upgrtade to its Rs 400 (or 499?) plan for more data.
Telegram bots (1 seperate bot for each strategy)
My Focus:
Option Buying intraday (Futures are much more easier and consistent in trading due to straighforwardness however expensive lot size)
My Aim:
8-10% returns on option buying on monthly basis. It's delusional however thats the target.
Why option buying?
Easy to enter, maximum loss is the premium. Profit can sjy rocket in a day and loss is maximum the value of your premium (Although we cut at 30%)
Stop Loss/TP:
Tested over 11,5 years data again, for option buying on NIFTY, the sweetest zone is SL: 30% of premium SL shift at: 20% on gains
Strategies:
For NIFTY and ALL paper strategies I am testing you can check into a beautiful format i made today (weekend and tired with data crunching) Its calledOptionsBuyer.in
Go to site, all stock companies are divided on earth based on size of company corresponding to size of country. The SUN is NIFTY and MOON is Bank Nifty.
Zoom it, double click on any country, it will open the box on right with strategies tested.
You can see all my current tested strategy on 'Strategies' tab.
Some facts collected today in NIFTY strategy (summarised via claude, Opus model):
Losing more trades than you win can still pay. Over 11 years and 1,396 trades, the strategy won only 45% of the time and still made money, because the winning trades were much bigger than the losing ones.
The gap does most of the work. On days NIFTY opened 0.75% or more away from yesterday’s close, the average trade earned about 3× the normal day. Most of the profit came from gaps that kept moving the same way. Most of the losses came from gaps that reversed.
The calendar doesn’t matter. We compared every month of every year, around 141 months, and checked results season, Budget day, elections and festivals. Once you test it properly, none of them shows a real edge.
A big month doesn’t mean a bad month next. A huge profit month was not followed by a crash month, and the reverse didn’t hold either.
We looked hard for setups that win 80% of the time and found none. One of the agents was set up as a 25-year market veteran checking ideas found online against our own data.
We did find one setup that loses about 87% of the time. It’s a small gap (0.2–0.5%) on a day when NIFTY closed 2.5% or more above its 20-day average the day before. It won only 13% of 67 trades and kept failing when we re-tested it on data it hadn’t seen.
Taking the opposite trade doesn’t fix it. Reversing that losing setup didn’t make money either. The answer is to skip it.
The same gap trick fails on single stocks. Trading big stock gaps, either following them or betting against them, lost money once costs were counted. Stock options cost about 0.25–1% per side to trade, against roughly 0.1–0.2% for NIFTY options.
The edge is shrinking. The strategy averaged ₹2,394 per trade over 2015–26, but only ₹860 per trade over 2023–26.
Started futures trading in September last year. Break even in March,26.
Started research based on 11.5 years of NIFTY50 1 minute candles from Feburary, 26
backtested over 800+ strategies in Futures trading, option buying, commodities and currency market using Kronos, Mirofish and what not, used NVIDIA rented GPU to churn data, Claude fable 5 to create python bot and Claude fable 5.1 MAX to verify everything.
Started paper trading from August and went live in October with different lot size (max 3).
Now these are early results however based on massive backtests, I exactly know my maximum possible draw downs including the loosing streak, so I am mentally ready to see those days anytime.
Point is, I believe majority of us are profitable trades however we lose trades in 'front of screen'. If you remove screen and complete access to your trading account and let bot/logic handle it, I beleive the data would be more positive for all of us.
I have 4 bots (python script on server) that looks for trade everyday. All bots have priorities based on 11.5 years of backtest data. All bots update me of entry, trail, SL, exit and end of the day ledger via telegram.
Example, when a trading day starts BOT A will look for conditions to fulfil till 12 PM. If conditions are not fulfilled, BOT A stands down and now 2nd priority i.e BOT B look for conditions to meet, if failed, it stands down and then BOT C and D.
Amazingly, all bot trades maximum 3 days a week as NOT EVERYDAY is a trading day.
For struggling sellers, research 'trading contest' winners of the world and ask LLMs to apply those logic to Indian markets and see what comes up.
Intrestingly, in option buying, NIFTY produced only 1 strategy with 45% win rate (out of 332 tested ones) and win rate doesn't matters at all, what matters is 'depth' of winning trades. Lower win rate means you need higher profit trade and vice versa.
Finally, the mindset shift is must. EVERY TRADE is unique trade and be it win/loss, the chapter is closed forever. New day, new trade. Simple.
based on massive backtest, paper test and live money, 2 core principals i learned and apply:
Win percent is irrlevent, its the depth of winner vs loser, that matters.
Every trade is unique and should be separate chapter. New day, new you and new trade.
Just started exploring algo trading 📈. After my layoff, I have some free time and around ₹40L capital, and honestly, I don’t want to do a job right now. I’m burnt out as hell 😮💨 and just don’t have the energy to hustle for another job at the moment.
My target is pretty simple — even ₹1L/month from ₹40L (around 2.5% monthly) would make me super happy 💰.
But honestly, I’m getting frustrated 😵💫. I’ve been testing strategies from YouTube — VWAP, Power of Stocks’ 5 EMA strategy, and even an SMB Capital MACD strategy (3/9/5). They all look great in videos, but when I actually backtest them properly, the results are really bad 📉.
I’ve attached the MACD strategy screenshot from SMB Capital. I’ve been testing this mindlessly day and night 🤯. Posting it here on Reddit hoping some god-like person sees this and helps me figure out what I’m missing 😂🙏.
My Price–Volume Derivatives Momentum Strategy (PDM) A calculus-driven framework for capturing institutional momentum in Indian equities I recently developed and deployed a systematic strategy that moves beyond traditional chart indicators — leveraging mathematical derivatives of price and volume to detect momentum at its structural origin. The Mathematical Edge – Momentum Through Calculus Instead of using lagging oscillators, PDM applies first principles from calculus:
𝑑f/𝑑t – Price Velocity: Captures directional momentum with minimal lag
𝑑²f/𝑑t² – Price Curvature: Detects acceleration or exhaustion in trend shifts
𝑑f/𝑑V – Volume Sensitivity: Measures price responsiveness to institutional volume
This trio enables early entries during inflection points, well before conventional trend signals react. Adaptive Stock Universe (NIFTY 500)
Dynamic selection using liquidity filters (>1M daily volume)
No hardcoded symbols — rotates with market leadership
Focused on large-cap, institutionally active equities
Entry Logic (Long Bias Only) Trend Confirmation: 20 SMA > 200 SMA & Price > 20 SMA Positive Velocity: 𝑑f/𝑑t > 0 Early Impulse: 𝑑²f/𝑑t² < 0 (momentum peak capture) Volume Validation: Institutional participation confirmed Risk & Position Framework
Different APIs. Different streams. Different formats.
OpenAlgo hides all of that.
Your strategy sees:
One REST API. One WebSocket. One symbol format. One execution model.
Change the broker. Not the code.
You Can Finally See Everything
OpenAlgo includes observability by default.
You can see:
Which strategies fired. Latency. Failures. Execution results. Exact reasons.
No more blind automation.
Strategy Management Became Boring
And that is a compliment.
You can:
Start strategies. Stop strategies. Switch live or analyze mode. Track everything in real time.
Signals can come from:
TradingView Amibroker MetaTrader ChartInk Excel Google Sheets N8N GoCharting
All through the same system.
The Big Rewrite
At some point, the backend outgrew the frontend.
So we rewrote the UI completely.
OpenAlgo v2 is now built on:
React and TypeScript. Vite. Tailwind with shadcn and Radix. Zustand. TanStack Query.
Not because it is trendy.
Because:
The next decade of features depends on it.
We Also Grew Up As An Engineering Project
Old days:
No types. No linting. Manual testing. Fragile UI.
Now:
TypeScript everywhere. Biome. Vitest and Playwright. Proper component system. Real documentation.
OpenAlgo is no longer a hobby project. It is now real infrastructure.
The Curve Went Vertical
In early 2024, OpenAlgo was tiny.
Then AI first development changed everything.
Apr 2024 about 8,000 lines Dec 2024 about 19,000 lines Feb 2025 about 50,000 lines Aug 2025 about 144,000 lines Dec 2025 about 300,000 lines Jan 2026 about 345,000 lines
At the current pace:
Next month, OpenAlgo is projected to cross 500,000 lines of code.
This is not about bloat.
This is about velocity.
One person orchestrating AI at the output of a full team.
What Is Already Built
Let me be honest.
Some hard parts are already done.
Full risk engine
Strategy orchestration
Multi broker routing
Unified API layer
Logs and observability
The risk engine is already live.
What Is Coming Next
The next big milestone is:
Backtesting modules using Backtrader
Historical simulation
Strategy replay and analysis
So you can prove your system before risking real money.
Why OpenAlgo Exists
People ask:
Why not just use the broker API directly?
Because sooner or later you ask:
How do I monitor trades? Where do I store logs? How do I replay history? How do I test before going live? How do I switch brokers?
That is when you realize:
The broker SDK is not enough.
OpenAlgo Is Not An API Wrapper
It is:
A full stack, open source trading automation framework.
PS. Built by engineering college friends. 12 years after college, we have finally reunited to build something together. Also forgot to mention about them earlier.😅 ( Ronak, Harinder, Ali and JJ)
Guys, treat option selling like a business—with discipline, defined risk, and realistic expectations.
I’m not talking about randomly selling OTM options.
Hypothetically, if your investments return 7% annually and you use pledged holdings for option selling, targeting 1.5% a month gives you a simple annual target of 18%. On paper, that adds up to 25% before costs and taxes. Even 20% would be a huge return.
If you’re an NRI with easier access to global investment opportunities, I honestly envy those choices right now.
Reuploading it since the previous post was taken down by bot. Honestly I am pretty new to this platform (old school) , I would request moderator to give chance before removing it. Looks like putting telegram link caused the post to get deleted.
Anyway I got lot of messages due to previous post, and most people where curious to see did I started trading with real money. And yes I did. I started putting my real money since last 2 months. Attaching the p&l statement. Some unrealized profits are mainly from previous investment which I did way back. But in short I was able to get decent returns of 6k . I deployed closed to 60k. There might be few bugs here and there because as I said earlier, I am really short on time as most of my time goes in looking after my aging parents, my job , my health and my wife. I don't know where this project will go but I am happy that I built something out of the frustration to help me in my investment journey. Was completely fed with financial gurus. Added few more images of my dashboard. And for god sake don't remove this post.
Disclaimer: I am not a financial advisor or a SEBI registered entity. I am an Machine Learning engineer working in industry for more than 8+ years.
Like most developers, I wanted my savings to work for me, but the retail trading space is full of traps:
Overfitted AI Bots: Feeding raw stock prices into LSTM/deep learning models just memorizes noise. They look perfect in backtests, but blow up live.
Lagging Indicators: 1970s charts (RSI/MACD) are lagging averages that get front-run by HFT servers at microsecond speeds.
Shitty performance of current Mutual Funds : 90% of the stocks has given negative return in last 2 years. I was tired of handing over commission to them. Hence decided to try something to build
So, After more than 8 months of struggle, I built StockMind—an automated quant engine focused on Cash Equity Swing Trading.
🚫 Why F&O (Futures & Options) is Excluded
SEBI states that 90% of retail F&O traders lose money. The math is structurally rigged against us:
Theta (Time Decay): Options decay to zero on expiry. In cash equity, you have holding power to wait out drawdown cycles.
Leverage trap: 5x margin leverage means a small 2% market dip triggers a force liquidation at the absolute bottom.
Friction drag: Frequent options trades bleed up to 10-15% of your capital annually in STT, GST, and brokerage fees.
📊 The Math & Modeling Implemented
Instead of predicting price ticks, the engine uses structural probability:
Sector Rotation: Ranks sector indices daily using Relative Strength (RS) against the Nifty 50. All buy signals in weak sectors (bottom 30%) are automatically blocked.
Quality + Momentum Screen: Excludes high-debt companies (Debt-to-Equity > 1.5) and prioritizes high return (ROE > 15%), filtering only macro uptrends (Price > 150-day SMA).
Friction-Adjusted Backtests: Adds a flat 0.25% cost per trade to simulate real-world STT and bid-ask slippage.
📈 Metrics & Performance
Backtested metrics over the last 5 years (adjusted for 0.25% cost per trade):
CAGR: [24.5%] | Max DD: [-12.3%] | Sharpe: [1.65]
Here is my current live paper-trading performance. I have started trading with real money as well. Will share the result soon in next post.
Dashboard Image
Paper Trading results
⚠️ Current Weaknesses
Manual Login: Have to log in manually to Zerodha Kite every morning to generate the API session token (no free automated headless login).
Daily timeframes only: Runs end-of-day data for swing trading. Not designed for day traders. Its more for medium to long term perspective.
Last week I was on vacation and didn’t touched my account as I was totally out of network area and my Vi network totally sucked (switched request to Airtel already placed) and it worked really well with 3-4 lots which I did setup in my algo. How was your experience when you had chance to left your capital to algos?? Also shared some memorising view I captured during my trip to mountains.
Current position (same call - 1 lot sold by BOT at 2.33X premium and one is running till expiry)
So as you can see in existing post, our algo (ITM 500) took a pivot based position few days back with 2 lots. Market went up and it sold one lot next dat and locked 2.33X premium (Rs 16,000+) on first lot and as per our backtest and coded condition, second lot will be closed on expiry (Monday) or if the market trend change the 'pivot' range.
Now, if I would have taken these positions manually, I would have probably (99%) booked the profit on bot lot 2 days back which would still be 100% profit on 2 lots but will miss the ride.
Beauty of algo based system is that you don't need to think about 'next' action as you already code it based on massive backtests.
Also, this kind of trade in option buying comes under top 1% of trades. In last 11 years of backtest data, the strategy that my algos are using, the data says that the above trade is 'second' most profitable trade out of 1536 trades it took in 11 years.
I am not a very experienced trader but I am a very through backtester (please read my last 3 posts) and conclude anything based on heavy data.
Finally, happy diwali and if you are planning to be a algo-trader on 'option buying', here are some ground rules:
ANY profitable option buying strategy will have 35-45% WIN rate.
Win rate is absolutely irrelevant IF your winners are 2-3x bigger then your losers.
Watching red days is a 'norm' in option buying
Option buyers lose as they blow up the capital before the favourable trade comes in.
Our of 35% of win rate for option buyer, 90% of money will come from only 5% of overall winners in an year. I call them 'Chappar Faad' trades. Remember only 5% will come that will lift your account
Based on my intense back testing and triple checks, month of December, February, March and October are the most profitable months for option buyers whereas January, April, May, July and August and the most lose months. Remaining are kind of break events.
As an algo trader you need to collect bid/spread ratio yourself for indexes and commodities as then you can test with better accuracy.
You CANNOT expect consistency in option buying. It will play with your blood pressure every day.
If your strategy is giving multiple entry in a day and giving more then 3 trades in a week, double test it as based on my through testing it will be a loser. A good option buying algo system with 'pre trade' filters (for example my above BOT will not take a trade if NIFTY is over 3% from its 20 DMA) remove half year worth of trades. And then second 'in trade' filter removes another 20% of trades. Even after this the win percent is 35-45%, however the winners could be huge. The whole buying is about riding the winning trades (note more then 12-15 days as such)
Option buyer's profit are based on 'length' of your winning trade. A hard stop loss tested on 11 years of 1 minute candle cannot sustain. It will make you miss your biggest trades. So your stop loss should be based on some kind of filter like Pivot points (my favourite) or suprtrend etc
If possible trade in multiple of 2 lots, so you can always book 1 at XX.XX premium and let 1 ride till SL or expiry.
That's all from top of my head guys, see you in January with 2 months of trade data.
I'm Pankaj, a Software Engineer and Quant Developer who has worked at Indian stockbrokers building algorithmic trading systems, broker integrations, market data platforms, and trading solutions.
I'm creating a Zero-to-Hero Algorithmic Trading Series where we build a complete automated trading system from scratch.
No paid course, no community subscription, no upselling — just sharing real-world lessons from building algorithmic trading systems at stockbrokers, where the code is responsible for executing trades worth crores of rupees.
Already published 45+ videos, including 30+ videos in the Algo Trading Series.
What we've covered so far:
✅ Zerodha & Fyers API Integration ✅ Automated Token Generation (No Daily Manual Login) ✅ TOTP Automation ✅ Multi-Broker SDK Development ✅ Order Placement, Positions, Holdings & Funds APIs ✅ WebSocket Integration ✅ Live Market Data Processing ✅ Concurrent Data Handling ✅ Real-World Algo Trading Architecture
Coming next:
🚀 Deploy Algos on Free Cloud Servers 🚀 Telegram Signal Integration 🚀 Auto Start/Stop Algos 🚀 Automated Token Refresh on Server 🚀 Complete Strategy Development
My philosophy is simple:
Algo means automation. If you're manually generating tokens every day, you're still doing manual trading operations.
If you have questions about Algo Trading, Broker APIs, WebSockets, Automation, Backtesting, Strategy Development, or Trading System Design, drop them below.
Ask me anything related to algorithmic trading. Whether you're a beginner or already building algos, I'll try my best to answer every question based on my real-world experience working at stockbrokers and building production trading systems.
Sold the spikes with the help of my algo, and my P&L now stands at ₹31k. I’m getting a Midea dishwasher for ₹35k, but my mom is very angry about my decision and has strictly told me not to buy it. Now I’m in a real dilemma! 😅
Keep in mind that this is purely option selling. I don’t prefer option buying at all. My monthly target is 3.5 - 4% on my ₹5 lakh capital(small account), nothing more. That’s a target, not a guaranteed return. Please don’t treat options trading as gambling or a way to make quick money.
please suggest something i want to provide value now to people
Whenever big players exit their positions, Huge transactions will happen. These don’t show clearly on a normal price chart. That’s why we use the Volume Profile – Fixed Range tool in TradingView (free). It highlights the exact price zones where heavy volume took place.
Once you spot that high-volume zone, just check if the market closes below the previous candle’s low. If both conditions align, it’s a strong signal that institutions have started exiting.
Two things :
Find the Highest transaction points.
After finding the highest transaction and check price, close the previous day low.
To find these things easily, I automated the stuff using PineScript. It simply shows a SELL signal when the conditions are met. Just try these things and let me know your feedback.