I want a Python program that connects to the Dhan trading platform and takes over once I have manually entered a position and placed its initial stop-loss. The tool must read every executed order—Intraday, CNC or GTT—in Equity, FNO and MCX, calculate the distance between entry and stop (1 R), and run the same management logic on each position, even when several positions exist in the same script. Core flow • On reaching +1 R, exit roughly half the size of the position, rounding in favour of the larger half (e.g. qty 3 ➜ exit 2). • Immediately move the remaining stop to the entry price. • Keep trailing the stop in full-R steps: at +2 R move stop to +1 R, at +3 R move to +2 R, and so on, until the stop is hit or I close the trade. Interface & alerts – A small desktop UI must list every live order and log each management event in real time. – Each event (partial exit, stop-loss shift, final exit) should trigger a popup window that stays open until I close it manually. – I will be able to maintain a watch-list in the UI, and the algo must handle all symbols in that list concurrently without cross-interference. Technical notes • Clean, well-commented Python code that uses the official Dhan API. • Independent processing threads or asynchronous handling so multiple orders in the same or different scripts never block each other. • Deliver source code, requirements.txt, brief setup guide, and a quick demo showing the strategy working on test orders. Acceptance will be based on the strategy behaving exactly as described, the UI updating correctly, and the popups firing for every defined event.