Why python?
(Relatively) easy to learn
Lots of libraries (ready to use program snippets)
Large userbase, so lots of books, articles, knowledge all around the world
Financial program compatibility: Interactive Brokers Trader Workstation (IBKR TWS) / MetaTrader 5 (MT5) for example
Why not python?
(Relatively) slow compared to C++ / Rust / C# / Go / etc.
If the platform supports another language
TradingView > PineScript
TrendSpider > JavaScript
MultiCharts > .Net / EasyLanguage (Python on its way)
TradeStation > EasyLanguage
Installation (Windows)
(Method 1) Go to https://www.python.org/ > Downloads > Download for Windows
Next > next > next … finish
windows + r > cmd > python
(Method 2) If python is not installed, then you may install from microsoft store starting from this step: windows + r > cmd > python
Using python from the web
There are lots of ‘online python compilers’, which you may search google for online python compilers, some of which are:
https://www.tutorialspoint.com/compilers/online-python-compiler.htm
https://www.programiz.com/python-programming/online-compiler/
Printing something to the console
type
print('hi')
Congrats.. You are a python programmer
Using variables
Now let’s have a variable (a virtual box that carries info), load the variable, print the variable
x (have the variable)
= (load the variable)
‘hello’ (with some info)
Text is covered between single or double quotes: ‘hello’ or “hello”
We may also load numbers: integers (3, 5, 8) or decimals (3.4, 5.7, 2.0)
x = 'hello'
Now we can use x instead of ‘hello’
print(x)