def handle_new_bar(data, emit, atoms):
l_ma = data.SMA(ln=200) # no additional configuration is needed
s_ma = data.EMA(ln=20, previous=True)
open_ma = data.SMA(ln=50, data_type="open")
# you can also access specific bands or lines on indicators that support them
upper_bband = data.BBANDS(band="upper", ln=20, stds=3)
- 1.Indicators are precomputed when you click "Run Test"
- 2.All indicators, both platform and custom, are displayed on the test results chart.
- 3.Using an indicator is simple — just access the data through the data argument as shown above.