Skip to content

Latest commit

 

History

History
216 lines (186 loc) · 14.7 KB

betterKite.md

File metadata and controls

216 lines (186 loc) · 14.7 KB

betterKite

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to https://unlicense.org

Very simple "userscript" which adds several features to kite.zerodha.com ui (screenshots below)

  • Several features to make options trading easy like SmartLimit, Split orders, bump orders etc
  • See P&L and current value 'including' pledged stocks
  • Automatically create SL order, then 'trail' and 'save profit' by just one click.
  • 'Smart Limit' Place LIMIT orders at best offer/bid price.
  • See quantities in lots
  • See real profit based on currently holding quantity
  • See possible Nifty monthly and weekly range based on INDIA VIX
  • See realised p&l for the day
  • Avoid quantity freeze limitation, breaks bigger order into multiple orders
  • Group positions under strategies
  • For a strategy, check how much margin can be freed by taking hedge buy positions
  • See P&L for each strategy
  • See margin utilised for each position or for a strategy
  • Mark trades as reference trade or martingale
  • See your ROI
  • Get explanation of various rows in funds page
  • Filter trades by expiry in sensibull pop-up
  • Auto group strategy by scrip and expiry
  • Auto filter Watch list for scrip in positions
  • Auto add ATM +- n strike options in the watchlist based on expiry
  • Highlight position when you click on scrip in Watch list
  • Filter mis only, pe online or CE only positions
  • For a strategy, see potentially how much margin can be released by buying hedge positions savemargin
  • Margin calculation is done by 2 methods. If you use 'baseket' method (this is default) then no further action needed but if youw ant to use 'Margin Calculator' method then you need to enable CORS. Choosing which method is available in settings.
  • Check this image on enabling CORS: corsusage
  • Use Full browser width
  • Clear watchlist

Contributors

  • Amit
  • Yuva (@rbcdev)

Installation

Follow below mentioned steps


  • Enable 'Auto SL order' feature from settings. You will get option to auto create SL order when placing a new order. Once SL order is placed, in pending order section you will get button to 'trali' or 'save profit'. Trail simply increases or decreases trigger price for 'trail points'. Save profit is used when market has moved in your favor and you want to protect profit, in this case trigger price of SL trigger pending order is moved to make atleast 'save profit points'. OrderScreen pendingORder settings help1 help2

  • 'Smart Limit' Finds the best offer/bid price then ether adds or subtracts 0.05p (depending on buy or sell order) and places a LIMIT order. SmartLimit

  • You can easily execute/exit quantities higher than freeze quantity. To enable quantity freeze go to settings. Once enabled, checkbox will show below 'Sell' or 'Buy' button, enable it and place orders QuantityFeeze QuantityFeeze1 QuantityFeeze2

  • Click on quanity to see it in lots, click again to remove it lots

  • Click on any of the pnl to enable/disable this feature pnl

  • Step 1: Add Nifty 50 to Pin 1, click on Nifty value to see monthly range, click on change value to see weekly range Monthly Weekly

  • Click on Total P&L to start seeting 'Realised P&L' realised

  • Strategies are grouped in 3 ways.

    • (1) Strategies are auto grouped by script name. So all INFY strategies will be auto grouped under 'INFY'
    • (2) Strategies are auto grouped by expiry.
    • (3) Manual / custom strategies.
  • Once you select a strategy from the dropdown, only relevant positions will be shown. strategies

  • strategies2

  • You can also see strategy's P&L on the right side of dropdown.

  • You can see MARGIN required for the 'group of positions' along with P&L on top.

  • You can also see margin required for individual position at the bottom of the table.

  • marginUsage

  • Tag your reference trades and martingales for easier identification. You can give custom name and color for easy identification referenceTags

  • Quickly see total P&L of 'selected' positions. addPositions

  • "Filter" button is added next to 1,2,3,4,5 watchlist. You can use this to filter your watchlist. watchlistFilter

  • Filter positions within the sensibull interface. zerodaSensibullAnalyze zerodhaSensibullFilters


  • See P&L and current value 'including' pledged stocks pledged
  • Group your holdings in 'categories' or 'tags'
  • Small tag is shown next to your stock name indicating which category it belongs to. tags
  • Filter stocks based on category. Once filter is applied only stocks in that category will be shown in 'watchlist' or 'orders' or 'holdings' screen header
  • One stock can be in multiple categories.
  • When you click on a stock in watchlist, if same stock is present in 'holdings', screen will be scrolled automatically bringing the stock in the middle and it will be highlighted for a few seconds.


Introduces a convenence link to see "current month's" F&O P&L usage


Introduced help text on each row explaining what different rows mean. usage


Installation

Follow below mentioned steps

  • Install Tempermonkey for your browser (works on all browsers. Tested on Chrome, Vivaldi, Edge). Chrome extension link
  • Open this link in a new tab. Or copy paste https://github.com/amit0rana/betterOptionsTrading/raw/master/betterKite.user.js
  • Tampermonkey will automatically identify the file as userscript and give you option to install. (sell image below)
  • tampermonkey install
  • Click on 'Install' button.
  • You can verify the installation by clicking on Tampermonkey icon (next to address bar) and then go to 'Dashboard'. You should see 'betterKite' installed. (see below)
  • dashboard menu
  • dashboard sample
  • Now just go to https://kite.zerodha.com (refresh the page if its already open) and start using.
  • Verify that your version should be more than v2.00. Click on Tempermonkey icon, you will see version in the 'Reset Data (WARNING) menu item.

How to use

  • Once installation is done, go to 'holdings' page and you will see a dropdown next to the logo listing all your groups.
    • On holding pages, dropdown will show all the groups under which you want to keep your holding stocks
    • On Positions page, dropdown will show all the strategies.
  • you can now filter 'positions' screen and 'holdings' screen based on your selection. Watchlist will also be filtered.
  • When you click on watchlist row, if same stock is present in your holdings list, it will be highlighted and brought to focus.
  • You can enabled/disable the filter dropdown by clicking on 'Position()' or 'Holdings()' heading.

Steps for grouping your Holdings

  • Refer to images below on how to use.
  • Adding tag : Go to holdings section, click on + icon next to the stock name to add tags.
  • Removing tag: Click on tag to remove it.
  • Filtering stocks: Use the dropdown for filtering.
  • how to use
  • add remove tags

Steps for marking trades as reference trades or base trade or martingales

  • On the positions screen, each position has a + button, click on the button to add a tag. Important thing to keep in mind is the format of the tag.
  • Tag should be formated as tagName.color for example: RT.red or BS.blue etc.

Steps for custom strategies.


TODOs

  • Instructions for Violentmonkey
  • Filtering on order page
  • Let users disable analytics

Note This script tracks following events for analytics. No data is passed/stored/tracked. This only tells that action was taken.

  • Script loaded
  • Script enabled/disabled
  • Watchlist filter used
  • Tag added
  • Tag deleted
  • Filter applied