How to Start Automated Trading in Zerodha Pi?

How To Start Automated Trading In Zerodha Pi

A few clients ask me how to start automated trading in the Zerodha Pi platform. For them, I have prepared this post where you can get an in-depth idea of how you can start auto trading or Algo trading in the Zerodha Pi platform. Before trading in the Pi platform, you must know how to download, install and log in to the terminal.

Automated Trading in Zerodha Pi – Directly Writing Expert Advisor Codes

  • This is a much simpler process and can be practised by even newcomers.
  • There is a list of ready-to-use expert advisors that are already available to use. Open the Zerodha expert advisors page by clicking here.
  • Run your Zerodha Pi. Open your favourite chart and attach expert advisors (EA) there.
  • Create a new expert advisor by clicking Artificial Intelligence –> Create new expert advisor.
  • You can also attach or edit a ready-made EA to your chart.
  • You can backtest your codes of expert advisor or take it into live trading also.
  • Or, you can also use ready-made expert advisors from the Zerodha Expert Advisors page.
  • There can be some charges for semi-automated and fully automated trading.
  • For detailed information on the charges and expert advisor, you can write a mail to [email protected] OR post your queries to the Trading QNA site.
Auto Trading In Zerodha

First Step – Attach an Expert Advisor to Chart

So if you decided to auto-trade on the Pi platform by directly writing code to the platform, the first step is you need to attach an expert advisor to a chart and generate alerts on the basis of the same. You can attach an expert advisor to a chart by opening a chart and then clicking Artificial Intelligence -> Apply Expert Advisors. In this process, you can also edit any EA as per the image as shown above. The EAs will now generate automated alerts as shown below.

Intraday Alerts

Executing the Trades

You can simply click on the buy or sell buttons and the trades will get executed in the exchange. Check the image below where we are clicking a SELL button to execute a sell order generated by our EA.

Executing The Order

And once the SELL button is clicked the short sell order window gets opened. If you click submit the order will be sent to the exchange and will ultimately get executed as per opportunity.

Auto Trading in Zerodha Pi

By default, retail traders can do only this kind of semi-automated trading. This process is very simple and you need not take any exchange permission also to execute semi-automated trades. This semi-automation eliminates your emotion and helps you to trade using formula-based logic without using complex technology.

However, if you want fully automated trading need to provide NCFM / NISM certificate to Zerodha and approve your strategy from the exchange. Remember, approving your strategy may take at least one month.

Case 2: Automated Trading in Zerodha Pi – Using Pi Bridge

Using Zerodha Pi Bridge, Zerodha Pi can be connected to your favourite charting language like Amibroker, or Ninja Trader OR even you can write your trading logic in your favourite programming languages like C#, Python or Perl and fire your trades directly into Zerodha Pi. You can also utilize or code two-way updates to and from Zerodha Pi. One way you can fire orders and on the other way, you can get order updates, modify or delete orders or get your position updates.

Like the previous process, here also you can trade using generated alerts from platforms like AmiBroker, Metastock, etc. The alerts will be available the same under the alerts menu in Pi. You can trade semi-automated using the same process. For fully automated trading in Zerodha Pi once again you need to have a dealer’s terminal by submitting your NCFM / NISM certificates to Zerodha. Here also, you need to approve your strategy from the exchange.

Pi Bridge

Previously for accessing Pi Bridge, you needed to log in to your back office Q and activate it from the Pi section of Q. This process has now changed. Now you need to log in to and raise a support ticket there to enable Pi bridge.

Activating Pi Bridge

Remember there can be some charges for using Zerodha Pi Bridge. For detailed information on the charges of Pi Bridge, you can also write a mail to [email protected]. You may also post your queries to the Trading QNA site.

However, trading with Pi Bridge is not for newcomers as it requires some programming knowledge. You need to know writing codes on AmiBroker or other charting platforms and also to connect these platforms with the Zerodha terminal using API functions.


So we have seen that using these techniques one can start automated trading in Zerodha platforms. This technique will help you in eliminating your emotions from trading. You can now follow the same trading technique that the FIIS and DIIS and big hedge funds use. I will love to answer your queries on auto trading in Pi.

15 thoughts on “How to Start Automated Trading in Zerodha Pi?”

    1. Suriya, first take a NCFM exam and get your certificate done from NSE in cash and FNO segment. Next apply to Zerodha with your certificate and sample strategy. It will take around 1 month to get your strategy approved from exchange and Zerodha will help you in this. Once that is done you can start full auto trading. The monthly charge for this payable to Zerodha is Rs. 6000 approx. Check with them for final charges.

  1. i want to buy 3,000 contracts of bankinfty in one go, will auto trading help, because there is a limit of 62 contracts by nse, or is there any other way of executing 3000 contracts in one go.I would appreciate your answer. Thank You

  2. book profit when price goes to 0.30% of stock value from traded price. Plz write script for Zerodha pi back testing.


    Isn’t this too little too late? Fully automated trading still remains a pipe dream due to the stonewalling by the authority. I have Ami code though it needs help. I don’t know how to peoceed. Your world of undecipherable names of different systems reminds me of Harry Potter stories.

    1. Actually Mr. Chatterjee, till now automated trading has not taken full wings due to exchange issues in many cases. Anyway for algo trading with AmiBroker one need to have good programming knowledge. So for retailers, it’s better to try simple logics written on the Pi platform and test them. Till now I feel very few companies offer professional help on automated trading. But their charges are very high. So we encourage people to do the trial and error with simple logics at their end only. We all know, no gain without pain. 🙂

  4. Dear Sir,
    Happy to note that you are keeping your watch to new comers.
    I am very much confused with different terminals of Zerodha. Amibroker, Pi, Kite …….
    What way I should go about and confidently do some good trading. I have experience in trading with sharekhan’s terminal., SBi terminal etc. at present I am with UPSTOX and Zwerodha. I am a big looser. No money with me now. Tell me what way I should move slowly with Rs.1000 only slowly.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top