Skip to content

Plot

Plot a line on the chart

Method

tm.plot(value, title, color, overlay)

Inputs

ParameterArgument typeDescriptionDefault Value
valuepd.Series or int or float or boolValue to plot-
titlestrTitle of the plot-
colorstrColor of the plot-
overlayboolWhether to overlay the plot on the chart or notTrue

Outputs

None

Example usage

strategy.py
import tradomate as tm
@tm.strategy()
def my_strategy(config: tm.TradomateConfig, data: tm.TradomateData):
# Plot a line on the chart
tm.plot(100, title="My line", color="red", overlay=True)