Beginner3-5 min readTopic 3 of 20

    Systematic Trading Without Writing Code

    Rohit Singh

    Mr. Chartist · SEBI RA

    Module Progress
    0/20
    Module

    Systematic trading means every decision you take was written down before the market opened. Automated trading means a machine places the order. They are two different things, and only the first one is compulsory. A rulebook on a single sheet of paper, executed by hand on the NSE cash market, is systematic trading in full — the code, if it ever arrives, only changes who presses the button. Start here, because the problem that ruins most traders is not that they could not program the idea. It is that they did not have one written down.

    Six slots that make a rulebook executable, and the seventh — the do-nothing clause — that most traders never write and then improvise under pressure.A rulebook card with six filled slots - universe, setup condition, trigger, size, stop and exit - each showing what the slot is for and an example entry. A seventh slot below, drawn with a dashed caution border, holds the do-nothing clause that most rulebooks leave blank.THE RULEBOOKSix slots. A blank slot is a decision you will end up improvising under pressure.1UniverseWhich instruments you will even look atliquid names you can exit in one order2Setup conditionThe state the chart must already be in30+ candle range, support held 3 times3TriggerThe single event that starts the tradedaily close above the range high4SizeHow many shares - from risk, not belief0.5% of equity / stop distance5StopThe price that proves the idea wrongbelow the last swing low in the range6Exit / targetHow the trade ends when it worksrange height above the breakout7Do nothing when...The slot most rulebooks omit, and the one discipline actually breaks in.open gaps past your entryan event lands the same sessionalready at maximum open riskWritten before the session, the seventh slot is a rule. Decided during it, it is a mood.
    Six slots that make a rulebook executable, and the seventh — the do-nothing clause — that most traders never write and then improvise under pressure.

    What is the difference between systematic and automated trading?

    A systematic trader has a rule. An automated trader has a rule plus a machine that fires it. Those are separable, and they fail for entirely different reasons.

    If your rule is vague, automating it does not fix it — it industrialises the vagueness. Software has to be told exactly what 'good volume' means, exactly which candle counts as the trigger, and exactly what to do when the market opens above your entry. If you cannot answer those in words, you cannot answer them in Python either.

    That is the whole case for starting without code. Writing the rulebook is the hard, useful, transferable work. The automation layer is plumbing, and plumbing is easy to hire, buy or learn later.

    DiscretionarySystematic, executed by handAutomated
    Decision madeDuring the session, in front of the chartBefore the session, on paperBefore the session, in code
    Order placed byYouYouA program via a broker API
    Can be reviewed laterOnly as a memoryYes — the rule and the deviation are both on recordYes, from logs
    Fails becauseMood, news, boredom, revengeYou overrode your own ruleA bug, a bad fill, a dead connection
    PrerequisiteNoneA written rulebookA written rulebook, plus programming and infrastructure

    Note — Read the table columns as a sequence, not a ranking. Column three is not a lesser version of column four — it is the thing column four is built out of. Skipping it means automating a rule nobody ever tested by following it.

    Why does a rule have to be written before it can be followed?

    Here is the test that decides whether a rule is finished. Hand your written rule to another trader who has never seen your chart. Both of you mark, independently, the exact price at which you would buy. If the two marks are not the same price, the rule is not a rule yet — it is a description of a feeling.

    Most trading rules die at the first version. 'Buy when it breaks out on good volume' contains three undefined terms: what a breakout is, what makes volume good, and when 'buy' happens — at the signal, at the close, or at the next open. Each undefined term is a gap you will fill differently on a confident day than on a scared one.

    The same idea rewritten four times. Each rewrite removes one undefined term until two independent readers place the identical order — and then skip the identical days.Four versions of the same trading rule. Two traders read each version independently and mark where they would buy. Version one leaves them 36 rupees apart, version two six rupees apart, version three lands them on the identical fill, and version four adds the do-nothing clause so they also skip the same days.The same rule, read by two traderswhere each one actually buysv1Buy when it breaks out on good volume.AB36.00 apartv2Buy when the daily close is above the high of arange at least 30 candles long.AB6.00 apartv3...buy at next open, stop below the range low,size = 0.5% of equity divided by stop distance.ABsame fillv4...and skip the trade entirely when the open isalready past the entry by more than the stop.A: NO TRADEB: NO TRADEsame skips tooA rule is finished when the gap closes - not when it sounds convincing.
    The same idea rewritten four times. Each rewrite removes one undefined term until two independent readers place the identical order — and then skip the identical days.

    How do you rewrite a vague rule into an executable one?

    1. 1

      Name the noun

      'Breakout' is not a noun a spreadsheet understands. 'A daily close above the highest high of the last 30 candles' is. Every word that would need explaining to a stranger has to be replaced with a countable thing.

    2. 2

      Fix the timeframe and the moment

      The signal appears on the daily close. The order goes at the next open. Say that. A rule that does not name the moment of execution silently lets you enter at the best price of the day in hindsight.

    3. 3

      Put a number on every adjective

      'Good volume' becomes 'session volume at least 1.5 times the average of the previous 20 sessions'. You are not claiming that number is correct. You are claiming it is now testable, which the adjective never was.

    4. 4

      Attach the stop to structure, not to comfort

      'Below the low of the range' is a chart fact. 'A 2% stop' is a statement about your tolerance, and it will place your exit inside ordinary noise on some instruments and miles away on others.

    5. 5

      Write the do-nothing case

      State the conditions under which the rule fires and you still do not trade. This is the clause nobody writes, and the one that everyone improvises at 9:16 in the morning.

    6. 6

      Hand it to a second reader

      If they cannot place your order without asking you a question, go back to step one. A rule is finished when the questions stop, not when it sounds convincing.

    What are the six parts of a trading rulebook?

    A rulebook is not a philosophy. It is six slots, and a blank slot is a decision you will end up making under pressure with money on the line.

    1. Universe
    Which instruments you will even look at. On NSE this usually means a liquid, defined list — an index constituent set, or names where you can enter and exit in a single order without moving the price. Trading illiquid counters systematically is how a good rule meets a bad fill.
    2. Setup condition
    The state the chart must already be in before you take any interest. A base of a stated minimum length; a support zone that has held a stated number of times. This is the filter, not the trigger, and it should reject most of the screen most days.
    3. Trigger
    The single event that starts the trade. One event, on one timeframe, with the execution moment named. If your trigger has an 'or' in it, you have two rules and you should test them separately.
    4. Size
    How many shares, derived from risk and the stop distance — never from conviction. Once the stop is known, size stops being an opinion and becomes arithmetic.
    5. Stop
    The price that proves the idea wrong, taken from the chart. It is written before the entry, not after the position starts moving.
    6. Exit
    How the trade ends when it works — a level, a trail rule, a time limit, or a combination. A rulebook with an entry and no exit is not a system; it is a way of accumulating open positions.

    What is the seventh slot most rulebooks leave blank?

    The do-nothing clause. Written before the session, it is a rule. Decided during the session, it is a mood.

    It should name the specific situations in which the trigger fires and you still stand down: when the open has already gapped past your entry so the stop distance no longer matches the plan, when a scheduled event — a result, a policy decision, an index rebalance — lands on the same session, when you are already carrying the maximum open risk you allow yourself across all positions.

    Notice what these have in common. None of them is about whether the trade will work. All of them are about whether this instance still matches the rule you tested.

    Watch out — The most expensive habit in systematic trading is not a bad rule. It is a good rule with a silent exception — the trade you took because 'this one is obviously different'. Every exception you allow yourself makes your record unreadable, because you can no longer tell whether the rule failed or you did.

    What does a written rulebook actually look like?

    Below is a specimen. Read every line as an example of the FORM a rule takes, not as a strategy to run. It has not been tested, it is not published, and it is not a recommendation to buy or sell anything. Its only job is to show what 'unambiguous' looks like on the page.

    1. UNIVERSE — index-constituent NSE cash stocks where the median daily traded value has been comfortably above the size I intend to trade, reviewed monthly.
    2. SETUP — the daily chart has spent at least 30 candles inside a range whose height is under 12% of the range high.
    3. TRIGGER — a daily close above the range high. Nothing intraday counts.
    4. EXECUTION — market order at the next session's open, single order, no averaging.
    5. STOP — the lowest low inside the range, placed as a stop order at entry, never widened.
    6. SIZE — 0.5% of trading capital divided by the distance from entry to stop, rounded down.
    7. EXIT — a target one range-height above the breakout level, or an exit at the close if price has not held above the range high after 10 candles.
    8. DO NOTHING WHEN — the open is already beyond the entry by more than the planned stop distance; a scheduled result or board meeting falls in the holding window; total open risk across all positions is already at 2% of capital.

    Example — This specimen is an illustration of structure only. The numbers in it — 30 candles, 12%, 0.5%, 10 candles — are placeholders chosen to make the form legible. Nobody should trade them, and the next topic in this module is entirely about how you would find out whether numbers like these mean anything at all.

    How does the size line turn into rupees?

    The fourth slot is the one beginners treat as an afterthought and professionals treat as the only slot that is not negotiable. It is arithmetic once the stop exists.

    Shares = (Capital × Risk per trade %) ÷ (Entry price − Stop price)
    • Capital — the money in the trading account, not your net worth and not your notional exposure.
    • Risk per trade % — the share of capital this single idea may cost you. The rulebook fixes it once and does not renegotiate it per trade.
    • Entry price — where the rule says you get filled, which is the next open in the specimen above.
    • Stop price — the level from the chart that proves the idea wrong.

    Why does the same risk buy different position sizes?

    Take ₹4,00,000 of trading capital and a 0.5% risk line. That is ₹2,000 on this idea, whatever happens.

    On one chart the entry is ₹800 and the range low sits at ₹760. The stop distance is ₹40, so ₹2,000 ÷ ₹40 = 50 shares — an exposure of ₹40,000.

    On another chart the entry is ₹800 and the range low sits at ₹790. The stop distance is ₹10, so ₹2,000 ÷ ₹10 = 200 shares — an exposure of ₹1,60,000.

    Four times the position, identical risk. That inversion is the whole point, and it is the reason the rulebook writes the stop before the size. A trader who sizes by conviction gets this backwards, taking the largest position exactly when the stop is furthest away.

    Example — Illustrative arithmetic with round numbers, deliberately not attached to any real stock on any real date. Brokerage, STT, exchange charges, stamp duty and GST are ignored here and are not ignorable in practice — costs get a topic of their own later in this module.

    Where do alerts and conditional orders fit?

    Between hand execution and full automation there is a middle ground that requires no programming at all, and for most retail traders in India it is the right stopping point for a long time.

    The first half is alerting. A charting platform such as TradingView lets you attach a condition to a chart — a close above a level, a crossing, a custom screener condition — and be notified when it fires. The alert does not trade. It removes the need to watch, which removes the boredom that produces unplanned trades.

    The second half is broker-side conditional orders. Most Indian brokers offer some combination of stop-loss orders, stop-loss-market orders, bracket or cover orders where the stop and target are attached at entry, and good-till-triggered orders that sit at the broker for weeks waiting for a price. These place the exit before you have any emotional stake in it, which is the entire benefit.

    LayerWhat it removesWhat it does not removeCoding needed
    Written rulebookImprovisationThe need to be present and to obey itNone
    Chart alertsScreen-watching and boredom tradesYour discretion at the moment of the orderNone
    Broker conditional / GTT ordersHesitation on the exit; the manual stop you 'meant to place'Gap risk — the order triggers, it does not guarantee your priceNone
    API automationHuman latency and the missed signalEvery risk above, plus infrastructure and bug riskYes, and a registered framework — covered later in this module

    Note — Platforms are named here as factual examples of a category, not as recommendations, and none of the features listed is exclusive to any one of them. Check the exact order types, validity rules and charges with your own broker before relying on them — they differ between brokers and change over time.

    What are the honest limits of the no-code approach?

    • A conditional order triggers at a price, it does not fill at one. If a stock gaps below your stop on results, your stop-loss-market order sells at whatever the market offers, which can be far worse than the level you wrote down.
    • Good-till-triggered orders sit at the broker, not at the exchange, and their validity, their behaviour around corporate actions and their treatment on expiry differ by broker. Read your own broker's terms rather than assuming.
    • Corporate actions rewrite the price series. A bonus, a split or a demerger changes the raw price your alert level was drawn on, and a level you set months ago can be meaningless the morning after the ex-date.
    • You are still the execution engine. If the rule fires on a day you are travelling, in a meeting, or simply not looking, the trade does not happen — and a system missing a random subset of its signals is not the system you thought you were running.
    • Hand execution is not free of latency. Anything whose edge depends on being fast is not available to you at this layer, and you should not pretend otherwise by trading it slowly.
    • The rulebook cannot make an untested idea good. Writing something down precisely makes it testable; it does not make it true.

    What would tell you this approach is not working?

    Every honest method has to say what would prove it wrong. For a hand-executed rulebook, these are the failures — and note that none of them is a losing trade, because a losing trade is a normal output of a working system.

    • You cannot reconstruct, from your own notes, why you took a trade. The record has stopped being a record.
    • Your log shows trades that do not match any written rule, or rule-triggers that you skipped without the do-nothing clause covering them. That is a discipline failure, and it invalidates everything the log would otherwise tell you.
    • You changed a parameter mid-run. Whatever the record showed before the change no longer describes what you are doing now.
    • Your realised fills are consistently far from the price the rule assumed. The rule is not executable at your size or in that instrument, whatever the chart says.
    • The rule fires so rarely that you have no meaningful body of decisions to judge — or so often that you cannot execute it by hand honestly. Both mean the rulebook does not fit the human running it.
    • You are widening stops after entry. At that moment the sixth slot is fiction and the position size you calculated was fiction too.

    Watch out — There is one failure that looks like success: a rule you keep quietly adjusting until the recent trades look better. That is not improvement, it is redrawing the target around the arrow, and the next topic — The Systematic Research Workflow — exists specifically to give you a defence against it.

    When is it legitimate to change the rulebook?

    A rulebook that never changes is not a virtue; markets and your own circumstances both move. What matters is when the change is made and how it is recorded.

    Change it between runs, never during one. Set a review date in advance — after a stated number of sessions, or at a fixed point in the calendar — and make every amendment on that date, in writing, with the reason and the date of the change. The old version stays in the file; you do not overwrite it, because the trades taken under it were taken under it.

    The rule for the reason is stricter than most people expect. 'The last three trades lost' is not a reason — a run of losses is an ordinary output of a working system. 'The stop distance I specified is systematically smaller than the daily range on these instruments, so I am being taken out by noise before the idea has resolved' is a reason, because it describes a defect in the specification rather than a preference about the outcome.

    And if the change is really a new idea rather than a repair, treat it as one. That means running it through a research process of its own — which is exactly what the next topic in this module sets out.

    Pro tip — Date every version of the page. A rulebook with a version history is a document you can hold yourself to; a rulebook you edit silently is a document that will always appear to agree with whatever you just did.

    How should a beginner start this week?

    From nothing to a working rulebook

    • Write one idea you already trade as a single sentence. Do not improve it yet — capture what you actually do.
    • Fill the six slots for it. Wherever you cannot fill a slot, you have just found the decision you have been improvising.
    • Add the seventh slot. Name at least three situations in which the trigger fires and you stand down anyway.
    • Give the whole page to someone else and ask them where they would buy, where they would exit, and how many shares. Rewrite until their answers match yours.
    • Run it on paper for a stated number of sessions, logging every trigger — including the ones you did not take, and why.
    • Only then consider alerts, and only after alerts consider conditional orders. Add one layer at a time so you always know which layer broke.
    • Do not touch the parameters during the run. Changing them mid-way destroys the only evidence the run was producing.

    Key points

    Systematic means the decision was written before the session. Automated means a machine fires it. Only the first is compulsory.
    A rule is finished when two independent readers place the identical order — not when it sounds convincing.
    Six slots make a rulebook: universe, setup, trigger, size, stop, exit.
    The seventh slot — do nothing when — is the one most traders leave blank and then improvise.
    The stop comes from the chart, and the stop sets the size. Conviction never sets the size.
    Identical risk buys very different position sizes, because the stop distance changes.
    Chart alerts remove screen-watching; broker conditional orders remove hesitation on the exit.
    A triggered order is not a filled price — gap risk survives every no-code layer.
    A losing trade is not a system failure. An unlogged trade, or a widened stop, is.
    Every specimen rule on this page is an illustration of form, not a strategy to trade.

    Pro tip — Keep the rulebook to one page and read it out loud before the session opens. Anything you find yourself explaining as you read — 'well, unless it gaps' — is a missing clause, not a nuance. Write it into the page that evening, date the change, and do not apply it retroactively to trades already taken. This page is education, not investment advice.

    Frequently asked questions

    Can you do algo trading without coding in India?

    You can trade systematically without writing a line of code, and that is the part most people mean. A written rulebook, chart alerts and broker-side conditional orders cover it. Genuine automation — a program submitting orders to the exchange through a broker API — is a different thing, carries its own regulatory framework for retail participants, and is covered separately in this module. Being systematic is available to everyone; being automated is not the prerequisite for it.

    Is manual trading with rules the same as algorithmic trading?

    No, and the distinction is worth keeping. Algorithmic trading means the algorithm places the order. Systematic trading means every decision was specified in advance. A hand-executed rulebook is fully systematic and not at all automated. The advantage of starting there is that the rulebook is the input to any future automation, so none of the work is wasted.

    What should a trading rulebook contain?

    Six slots: the universe of instruments you will consider, the setup condition the chart must already satisfy, the single trigger event with its execution moment named, the position size derived from risk, the stop taken from chart structure, and the exit. Then a seventh — the conditions under which the trigger fires and you deliberately do nothing. A blank slot is a decision you will improvise under pressure.

    Can TradingView alerts place orders on NSE?

    Treat an alert as a notification, not an order. Some brokers and third-party bridges offer integrations that act on incoming alerts, but the moment an external service can place orders in your account you have left the no-code layer and taken on connectivity, authentication and failure-mode risk, plus whatever registration requirements apply. Verify what your own broker permits and what the current regulatory framework requires before wiring anything to your account.

    What is the difference between a GTT order and a stop-loss order?

    A stop-loss order is placed for the current session and typically dies at the close. A good-till-triggered order rests with the broker across many sessions and is submitted to the exchange only when your price condition is met. Neither guarantees a fill price — both convert into live orders at trigger, so a gap can fill you far from the level you wrote. Validity periods, corporate-action handling and charges vary by broker.

    How many rules should a trading system have?

    As few as make it unambiguous. The test is not the count, it is whether a second reader following the page places the identical order. Rules added to explain away past losses are the ones to be suspicious of — each one narrows the system to fit history it has already seen, and that is a research failure rather than a refinement.

    Do I need a backtest before trading a rulebook by hand?

    You need some evidence, and forward-logging every trigger in real time is a legitimate form of it — slower than a backtest but free of the hindsight problems that make casual backtests misleading. What is not acceptable is no evidence at all. Writing a rule down makes it testable; it does not make it true.