<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ilyaz K</title>
    <description>The latest articles on DEV Community by Ilyaz K (@iamkazi2050).</description>
    <link>https://dev.to/iamkazi2050</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4259479%2F83425ecb-4599-4d4f-9236-08cd9905e42d.png</url>
      <title>DEV Community: Ilyaz K</title>
      <link>https://dev.to/iamkazi2050</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/iamkazi2050"/>
    <language>en</language>
    <item>
      <title>Automating Trades on the Saudi Stock Market: A Planning Checklist</title>
      <dc:creator>Ilyaz K</dc:creator>
      <pubDate>Mon, 23 Nov 2026 00:55:14 +0000</pubDate>
      <link>https://dev.to/iamkazi2050/automating-trades-on-the-saudi-stock-market-a-planning-checklist-3kel</link>
      <guid>https://dev.to/iamkazi2050/automating-trades-on-the-saudi-stock-market-a-planning-checklist-3kel</guid>
      <description>&lt;p&gt;Interest in automated trading has grown across the Gulf, and Tadawul is often the first market Saudi investors want to automate. Before anyone writes code, a few practical questions decide what is possible and what is not.&lt;/p&gt;

&lt;p&gt;This is a planning checklist, not investment advice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with your broker's API
&lt;/h2&gt;

&lt;p&gt;Automation needs an official way to send orders. Ask your broker directly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Do they offer an API or a FIX connection to retail or professional clients?&lt;/li&gt;
&lt;li&gt;Is there a paper trading or test environment?&lt;/li&gt;
&lt;li&gt;What are the request limits, and which order types does the API accept?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the broker offers no API, automation is limited to alerts and manual execution. Screen-clicking tools that imitate a person are fragile and may break the broker's terms.&lt;/p&gt;

&lt;h2&gt;
  
  
  Know the market hours and the auction
&lt;/h2&gt;

&lt;p&gt;Tadawul runs a pre-open session with an auction before continuous trading, and a closing auction at the end of the day. An automated rule that works in continuous trading may behave differently in an auction. Use the exchange's published schedule in your code instead of fixed times, and plan for holidays.&lt;/p&gt;

&lt;h2&gt;
  
  
  Price limits and tick sizes
&lt;/h2&gt;

&lt;p&gt;Saudi equities have daily price fluctuation limits and tick size rules by price band. Orders outside those limits are rejected. Your system should round prices to valid ticks and treat a limit-up or limit-down day as a special case.&lt;/p&gt;

&lt;h2&gt;
  
  
  Signals: TradingView, Telegram or your own rules
&lt;/h2&gt;

&lt;p&gt;Many traders already follow signals in TradingView or a Telegram group. Turning those into orders needs a parser, symbol mapping (TradingView symbols differ from broker codes), and protection against duplicate messages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Language and reporting
&lt;/h2&gt;

&lt;p&gt;If the people who review the trades read Arabic, build the reports and alerts in Arabic from the start. Clear daily reports make it easier to spot a rule that misbehaves.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test before real money
&lt;/h2&gt;

&lt;p&gt;Run the logic on historical data, then on paper trading if your broker offers it, then with small sizes. Compare every automated order with what the rule should have done.&lt;/p&gt;

&lt;h2&gt;
  
  
  Help with building it
&lt;/h2&gt;

&lt;p&gt;At &lt;a href="https://algokhaleej.com/saudi-stock-market-automation/" rel="noopener noreferrer"&gt;AlgoKhaleej&lt;/a&gt; we plan and build trading automation for traders in Saudi Arabia and the wider Gulf, in Arabic and English.&lt;/p&gt;

&lt;p&gt;All trading carries risk. Automation follows its rules exactly, so check the rules carefully.&lt;/p&gt;

</description>
      <category>api</category>
      <category>automation</category>
      <category>fintech</category>
    </item>
    <item>
      <title>Automating Zerodha Kite Orders with Python: What to Plan Before You Code</title>
      <dc:creator>Ilyaz K</dc:creator>
      <pubDate>Mon, 23 Nov 2026 00:50:22 +0000</pubDate>
      <link>https://dev.to/iamkazi2050/automating-zerodha-kite-orders-with-python-what-to-plan-before-you-code-4fmj</link>
      <guid>https://dev.to/iamkazi2050/automating-zerodha-kite-orders-with-python-what-to-plan-before-you-code-4fmj</guid>
      <description>&lt;p&gt;Indian traders often start automation with a short Python script and the Kite Connect API. The first order goes through in an afternoon. The problems show up later: the token that expires every morning, the order that fails at 9:15 because of a price band, the script that keeps running after a network drop and sends the same order twice.&lt;/p&gt;

&lt;p&gt;Here is what to plan before you write the trading logic.&lt;/p&gt;

&lt;h2&gt;
  
  
  The daily login
&lt;/h2&gt;

&lt;p&gt;Kite Connect access tokens are valid for one trading day. Your system needs a clear morning step: the login, the request token, and the exchange for an access token. Decide who does it and when. If it is a person, put it in a checklist. If it is automated, keep the credentials outside the code and log every login attempt.&lt;/p&gt;

&lt;h2&gt;
  
  
  Order types and product codes
&lt;/h2&gt;

&lt;p&gt;Write down, per strategy, which product you use (MIS for intraday, CNC for delivery, NRML for F&amp;amp;O carry) and which order type (market, limit, SL, SL-M). Exchanges and brokers reject some combinations, and the error text arrives as a string you need to handle, not ignore.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rate limits and retries
&lt;/h2&gt;

&lt;p&gt;The API limits how many requests you can send per second. A loop that checks positions on every tick will hit that limit. Batch your reads, and give every order a unique tag so a retry after a timeout can check whether the first attempt already went through.&lt;/p&gt;

&lt;h2&gt;
  
  
  Market hours and special sessions
&lt;/h2&gt;

&lt;p&gt;Pre-open, normal market, closing session, and the occasional special trading session on a weekend all behave differently. Your scheduler should know the exchange calendar instead of assuming 9:15 to 15:30 every weekday.&lt;/p&gt;

&lt;h2&gt;
  
  
  Signals from outside
&lt;/h2&gt;

&lt;p&gt;Many traders want orders to come from TradingView alerts or a Telegram channel rather than from their own script. That adds a parser and a webhook endpoint, and it needs the same care: duplicate alerts, symbol names that differ from NSE trading symbols, and lot sizes for F&amp;amp;O contracts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Logging that helps later
&lt;/h2&gt;

&lt;p&gt;Store every signal, every order request, and every broker reply with timestamps. When something goes wrong at 10:02 on a busy day, this log is the only way to know whether the signal, the code or the broker caused it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting it built
&lt;/h2&gt;

&lt;p&gt;At &lt;a href="https://algodevelop.com/" rel="noopener noreferrer"&gt;AlgoDevelop&lt;/a&gt; we build broker automation for Zerodha, Upstox, Angel One, Fyers and other Indian brokers, plus MT4/MT5 Expert Advisors and signal copiers. Each project comes with the source code.&lt;/p&gt;

&lt;p&gt;Test with small quantities first. Automation repeats mistakes as quickly as it repeats good trades.&lt;/p&gt;

</description>
      <category>api</category>
      <category>automation</category>
      <category>fintech</category>
      <category>python</category>
    </item>
    <item>
      <title>Parsing Telegram Trading Signals: The Edge Cases That Break Copiers</title>
      <dc:creator>Ilyaz K</dc:creator>
      <pubDate>Mon, 23 Nov 2026 00:49:41 +0000</pubDate>
      <link>https://dev.to/iamkazi2050/parsing-telegram-trading-signals-the-edge-cases-that-break-copiers-3ilm</link>
      <guid>https://dev.to/iamkazi2050/parsing-telegram-trading-signals-the-edge-cases-that-break-copiers-3ilm</guid>
      <description>&lt;p&gt;If you have ever tried to turn Telegram trading signals into orders, you know the first version takes an evening. A regex finds BUY or SELL, a symbol, an entry, a stop loss and a take profit. It works on the ten messages you tested.&lt;/p&gt;

&lt;p&gt;Then the channel posts something else. Here are the cases that broke our early parsers, and how we handle them now.&lt;/p&gt;

&lt;h2&gt;
  
  
  Several take profits in one message
&lt;/h2&gt;

&lt;p&gt;Many signals list TP1, TP2 and TP3. You have to decide what that means: one trade closed in parts, or three trades with one TP each. Neither is wrong, but the copier and the user must agree. We treat it as a setting per channel.&lt;/p&gt;

&lt;h2&gt;
  
  
  The stop loss arrives later
&lt;/h2&gt;

&lt;p&gt;"XAUUSD buy now" comes first, and "SL 2338" arrives two minutes later as a reply. If the parser opens a trade from the first message, it has to attach the stop from the reply to that same trade. That means tracking which message each reply points to, not only reading messages in order.&lt;/p&gt;

&lt;h2&gt;
  
  
  Edits instead of new messages
&lt;/h2&gt;

&lt;p&gt;Admins edit messages to fix a typo in the entry price. Telegram sends that as an edit event. A copier that ignores edits keeps the wrong price; one that treats edits as new signals opens a duplicate. The right move is to update the open order or pending trade linked to that message.&lt;/p&gt;

&lt;h2&gt;
  
  
  Words that look like actions
&lt;/h2&gt;

&lt;p&gt;"Close half", "move SL to entry", "cancel the sell limit", "book profits". These are management commands, not new signals. Keep a separate list of them, and match them to the trade they refer to, usually by reply or by symbol when there is only one open trade on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Symbol names
&lt;/h2&gt;

&lt;p&gt;Channels write GOLD, XAU, XAUUSD or "gold". Brokers use XAUUSD, XAUUSD.m or GOLD.i. Normalise the channel side to one internal symbol, then map that to each account's broker symbol.&lt;/p&gt;

&lt;h2&gt;
  
  
  Numbers in the wrong place
&lt;/h2&gt;

&lt;p&gt;"BUY 1.0850 SL 30 pips TP 60 pips" mixes prices and distances. Store which kind each number is before converting, and convert pips per symbol, because a pip on gold is not a pip on EURUSD.&lt;/p&gt;

&lt;h2&gt;
  
  
  Show your work
&lt;/h2&gt;

&lt;p&gt;The most useful feature we added was not a better regex. It was a log that shows, for each message, what the parser understood and what it did. When a user asks why a trade did not open, the answer is right there.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this ended up
&lt;/h2&gt;

&lt;p&gt;This work became &lt;a href="https://tpcopier.com/" rel="noopener noreferrer"&gt;TPcopier&lt;/a&gt;, a cloud copier that reads Telegram, WhatsApp and Discord signals and places them on MT4/MT5 and binary broker accounts. If you are building your own parser, the cases above are a good test list.&lt;/p&gt;

</description>
      <category>backend</category>
      <category>fintech</category>
      <category>softwaredevelopment</category>
    </item>
  </channel>
</rss>
