TradexCodez
← Options Trader | tradexcodez.com | Strategy in Trade, Precision in Code
TradexCodez

TradexCodez Option Trader

User & Training Guide — EA v1.89

Live options chain · One-click strategies · Payoff diagrams · Automatic stop-loss and target protection · Live P&L — all on one MT5 chart.

1. Overview

TradexCodez Option Trader turns the chart of any stock, index, or future into a complete options trading desk inside MetaTrader 5. You see the live option chain of that instrument, buy or sell any strike with one click, place ready-made strategies, view their profit graphs, and protect every trade with automatic stop-loss and target handling. Orders are sent to your broker through the TradexCodez Bridge running on your computer — nothing is simulated inside MT5.

1.1 What you need

#RequirementDetails
1.1MT5 terminalWith the TradexBridgeData EA running (this is your live data feed)
1.2TradexCodez BridgeThe bridge for your broker — Zerodha Kite Connect at launch; Angel One, Flattrade, Shoonya, Dhan and Fyers in final testing — connected with your broker's data API and upgraded to the Option Trader command set (v1.89)
1.3TradexCodez Option Trader EAAttached on the chart of the instrument whose options you want to trade
1.4MT5 settingsKeep 'Allow Algo Trading' and 'Allow DLL imports' turned ON. Both are required for the data feed and the panel to work — do not switch them off
1.5ConnectionBridge address 127.0.0.1, port 5556 (defaults — change only if you changed them in the bridge)

When the EA starts it checks the bridge. The footer shows Bridge online (PONG) when everything is connected.

2. Panel tour

TradexCodez Options Trader panel in MT5 — settings, protection, strategies, EXIT ALL, live option chain and P&L footer

Figure 1 — the full panel: settings, protection, strategies, EXIT ALL, live chain, and the P&L / status footer.

3. Input reference

InputDefaultWhat it does
InpHost / InpCmdPort127.0.0.1 / 5556Where the bridge is listening
InpTimeoutMs6000How long to wait for an order reply (milliseconds)
InpLots1Lots per click — automatically multiplied by the option's lot size
InpOrderTypeMARKETOrder type for single-strike entries only. All exits and all strategy legs always go as market orders with price protection, per our safety standards
InpProductMISMIS (intraday) or NRML (carry forward)
InpExpiryNEARESTNearest or next expiry — also a button on the panel
InpWing2Distance between strategy legs, in strikes (1 to 5)
InpProtUnitsPTSStop/target units: premium points, or percent of your entry price
InpSL / InpTP / InpTSL0Stop-loss, target, trailing stop. 0 means off
InpProtPollSec2Protection status poll (seconds)
InpModeLIVELIVE (real orders) or PAPER — simulated on the bridge with realistic bid/ask fills. Also a large toggle button on the panel
InpPaperCapital200000Virtual capital for paper mode (sent to the bridge when paper is activated)
InpChainPollMs300Chain price refresh in milliseconds
InpPnlPollMs300P&L line and positions-popup refresh in milliseconds
InpFallbackPolls2Safety net: after this many confirmed breaches the EA itself sends the exit
InpPanelX / InpPanelY20 / 40Panel position on the chart
InpPanelScale1.0Makes the whole panel bigger or smaller (0.7 to 1.8)
InpDebounceSec2Ignores accidental double-clicks inside this window
InpChainOntrueShow the option chain at start (also a panel button)
InpChainDepth5Strikes shown on EACH side of ATM. 1 to 10 — up to 21 rows
InpChainChartTFM5Timeframe used when you open an option's own chart
InpChartBtnLETTERLook of the chart-open button: C, arrow, bars, or triangle

4. The live option chain

Anatomy of a single live option chain row in the TradexCodez Options Trader MT5 panel

Figure 2 — one chain row, explained.

The chain shows the strikes around the current price, refreshed several times a second (default 300 ms). The at-the-money strike is gold; prices turn green when they tick up and red when they tick down. When the market moves to a new at-the-money strike, the chain re-centers by itself.

B buys that exact strike instantly. S sells it. C opens that option's own price chart in MT5. Smart order handling: if you already hold the opposite position in the same option series, your click squares it off instead of opening a new trade. The chain can never freeze your chart — it refreshes on a timer and backs off automatically if the bridge is busy.

5. Automatic protection (SL / TP / TSL)

Two layers of automatic protection — stop-loss, target and trailing stop — in TradexCodez Options Trader

Figure 3 — two layers of protection.

Type your stop-loss, target, and/or trailing stop before clicking B or S (0 = off), and pick the units: premium points, or percent of your entry price. The moment your order fills, the bridge starts watching every tick and fires the exit the instant a level is hit. The EA is the second layer: it independently checks every 2 seconds and sends the exit itself if the first layer ever misses. All protective exits go as market orders with price protection, in line with our safety standards.

6. One-click strategies

Eight professional, defined-risk strategies. One click sends the whole strategy; the bridge places every leg for you — protective (buy) legs first, and if any leg is rejected it automatically unwinds what was already filled and tells you exactly what happened.

ButtonMarket viewLegs (w = Wing)You pay / receive
Bull Call SpRisingBuy CE at-the-money, sell CE w strikes higherPay (debit)
Bull Put SpRisingSell PE at-the-money, buy PE w strikes lowerReceive (credit)
Bear Put SpFallingBuy PE at-the-money, sell PE w strikes lowerPay (debit)
Bear Call SpFallingSell CE at-the-money, buy CE w strikes higherReceive (credit)
Iron CondorRange-boundSell CE +w and PE −w, buy CE +2w and PE −2wReceive (credit)
StraddleBig move either wayBuy CE and PE at-the-moneyPay (debit)
Call ButterflyPin near ATMBuy CE ATM−w, sell 2× CE ATM, buy CE ATM+wPay (debit)
Iron ButterflyPin near ATMSell CE and PE ATM, buy CE +w and PE −wReceive (credit)

The butterflies’ middle leg is automatically doubled (2× lots) — one order, correct quantity. Before ANY strategy or sold option is placed, the bridge runs an upfront margin check (full-basket requirement with hedge benefit plus a safety buffer): if funds are short it replies with the exact need/have/short numbers and places nothing.

Margin note: the credit strategies carry sold options, so your broker's seller margin applies. Stops and targets are not attached to strategy legs — these structures limit risk by design; use EXIT ALL to close them.

7. Payoff diagrams

Iron Condor payoff diagram at expiry, drawn from live option prices in MetaTrader 5

Figure 4 — Iron Condor payoff from live prices.

Press [P] next to any strategy to see its profit picture at expiry, drawn from live option prices. Green is your profit zone, red is loss, the gold line is the current market price — with maximum profit, maximum loss, net cost or credit, and exact breakeven levels below. For Iron Condor keep InpChainDepth at least 2 × Wing.

8. EXIT ALL and the live P&L line

EXIT ALL is your fire escape: one click closes every open option position of this instrument — all expiries, intraday and carry, calls and puts — each as a market order with price protection. The PnL: line is your running profit for the day on this instrument, in rupees, including profits already booked — refreshed every 2 seconds and instantly after every trade.

8b. Paper trading and the positions viewer

The panel starts in LIVE mode. One click on the MODE button switches to PAPER: the panel tints amber, every status is prefixed [PAPER], and all orders are simulated on the bridge with realistic bid/ask fills (buys at ask, sells at bid — you pay the real spread) against your virtual paper capital. Everything works identically in paper — strategies, stops, EXIT ALL, P&L — making it the safe way to learn the panel before trading live.

The POS button opens the positions viewer for the current mode: every open position with quantity, average price, live price, and colored profit, plus the total — refreshing in realtime while open. In paper mode it also shows your capital: Cap / Used / Free.

Automatic reset: if your positions are closed outside the panel (broker app, another tool, or a close-all script), the panel notices within a few seconds, clears the leftover stop/target rules, and resets its display — no stale positions, no orphaned protections.

9. Troubleshooting

What you seeWhat it means and what to do
Bridge NOT reachableThe bridge program is not running, or the address/port doesn't match. Start the bridge and re-attach the EA
Chain: no reply — retrying every 15sThe bridge is up but didn't answer the chain request. Check the bridge window for errors; the panel keeps retrying by itself
Chain: no options for (symbol)No options could be found for this instrument. Confirm options actually trade on it, and that your bridge has the latest Option Trader upgrade
Payoff: leg beyond chainYour Wing is too wide for the visible chain. Raise InpChainDepth to at least 2 × Wing
PnL: --The bridge hasn't answered the P&L request — usually an older bridge version or an expired broker session. Log in again or update the bridge
PARTIAL FILL — CHECK POSITIONS!One strategy leg was rejected and the bridge unwound the rest. Open your broker position book and verify before trying again
Ignored (debounce)You clicked twice quickly — the second click is ignored on purpose
Chart open failedThe option's chart wasn't ready yet. Wait a second and press C again

10. Frequently asked questions

What is paper mode?

A full simulation running on the bridge with realistic bid/ask fills against virtual capital. The panel starts in LIVE; one click on the MODE button switches to paper (amber panel, [PAPER] on every message). Perfect for learning the panel risk-free.

Does the EA place orders inside MT5?

No. MT5 is your screen; every order travels through the TradexCodez Bridge straight to your broker. What you see in your broker app is the truth.

Which brokers are supported?

At launch, Zerodha Kite Connect. Support for Angel One, Flattrade, Shoonya, Dhan and Fyers is built and in final testing, releasing progressively. Each licence is configured for one broker of your choice.

Will the chain slow down or freeze my charts?

No. It refreshes on a light timer (about three times a second) and backs off automatically if the bridge is busy. It does not consume your live-feed symbol quota.

Can I use it on a stock chart, not just NIFTY?

Yes — attach it on any instrument that has listed options: index, stock, or commodity future.

What happens to my stop-loss if the bridge or my PC restarts?

Protection rules are saved on disk and reload when the bridge restarts. While the bridge is completely offline no orders can reach the broker, so always keep your broker app handy as a manual backup.

Why are all exits market orders?

Speed and certainty. A protective exit that sits unfilled is not protection. Market orders with price protection are our safety standard.

How many strikes can the chain show?

Up to 10 each side of at-the-money — 21 rows. Set InpChainDepth.

Can I run it on several charts at once?

Yes, one panel per instrument. Keep it to a handful of chain charts so your broker's data limits are respected.

The payoff shows -- for a price. Why?

That strike hasn't traded or quoted yet in this session. Wait for the next refresh.

Iron Condor was rejected — why?

Almost always seller margin. The bridge unwound any filled legs automatically; add margin or reduce lots and try again.

11. Custom development by TradexCodez

Everything in this guide was built in-house — and we build for clients too. If you can describe your edge, we can code it:

ServiceWhat we deliver
Custom indicatorsYour trading logic as a clean, non-repainting MT5 indicator with alerts
Custom Expert AdvisorsPanel tools, one-click executors, and rule-based EAs tailored to your workflow
Autotrading botsFully automated strategies using SEBI-registered broker APIs (Zerodha Kite Connect, with Angel One, Flattrade, Shoonya, Dhan and Fyers releasing progressively) with risk controls built in
Broker API bridgesLive data and order routing between MT5 and your broker, like the Universal Bridge that powers this product
Dashboards & scannersOptions scanners, market dashboards, and monitoring tools

Every deliverable ships with documentation and support. Start a conversation at https://www.tradexcodez.com — tell us what you trade and how, and we'll propose the build.

12. Support

✉ support@tradexcodez.com
WhatsApp · 98846 57226
Telegram · @tradexcodezcommunity

TradexCodez is a registered MSME with the Government of India under the Udyam scheme. Udyam Registration No.: UDYAM-TN-08-0141162

Disclaimer. Trading in derivatives involves substantial risk of loss and is not suitable for everyone. TradexCodez Option Trader is a software tool, not investment advice, and TradexCodez does not guarantee any profit, performance, order execution, data accuracy, or uninterrupted operation. Markets, brokers, data feeds, internet connections, and computers can and do fail; you alone are responsible for every trade placed through the software and for monitoring your positions with your broker. Our software undergoes extensive testing before release, but no testing can cover every market condition. By using this software you accept that TradexCodez, its owner, and its associates shall not be liable for any direct or indirect loss arising from its use. Please trade responsibly and only with risk capital.