Creating a trading system from scratch

How many lines of code you are comfortable with


  • Total voters
    61
For everybody watching this thread, the present method of executing trades via notebook is not recommended.
The right way is to turn them into python scripts, which I would cover soon.
Also, create 2 separate copies of the system, one for live trading and one for backtesting.
We would soon turn our complex code into something more simple so that we coud just present our backtesting rules for the system to perform the rest.
Also, get used to the payoff concept I introduced somewhere in the middle of this thread.

The original system proposed in the post has been now changed so that
  1. We place orders only when the price is below open
  2. We place only STOP LOSS LIMIT orders so that our stock is picked at exactly the price we expect
  3. We exclude open = high cases from the results
  4. Added commission
This would improve our returns and also provide more realistic backtesting results
have you changed it ?because couldnt find in the normal repo of tutorial/tradingsystem/SystemNew.ipynb
 

UberMachine

Well-Known Member
Placing orders in Kite.

I have modified the system so that you could also place orders on Kite. Existing users can git pull or
  1. Download the template.html file and the SystemNew notebook.
  2. Sign up for Kite publisher API key at kite trade. Its free and enter it in the notebook
  3. Just run the notebook; It would create a zerodha_order.html with the necessary details. Just click the submit button, log into your account and place your orders
If you don't want to change your existing notebook, then copy and paste the code for zerodha at the end if your existing notebook
 

pannet1

Well-Known Member
Thank @UberMachine for this tutorial and the codes.

Can you clarify how to automate it with Zerodha.

I am on Manjaro and use only Kite.

Thanks.
imtiaz,

try to dump manjaro for arch ...or something else (i use mx linux). 2 reasons

1) someone in linux telegram channel mentioned that its a chinese spyware
2) one fine day after update i was unable to boot (some kernel issue)

cheers
 

VJAY

Well-Known Member
Placing orders in Kite.

I have modified the system so that you could also place orders on Kite. Existing users can git pull or
  1. Download the template.html file and the SystemNew notebook.
  2. Sign up for Kite publisher API key at kite trade. Its free and enter it in the notebook
  3. Just run the notebook; It would create a zerodha_order.html with the necessary details. Just click the submit button, log into your account and place your orders
If you don't want to change your existing notebook, then copy and paste the code for zerodha at the end if your existing notebook
Dear UB,
Thanks for sharing .....can you please explain what we need to enter in notebook?:confusedd:
1538790257312.png
 
Last edited:

Similar threads