Actions
Defining an Action
def action(shimoku_client: Client):
#code [...]
shimoku_client.run()indicator_action_id = shimoku_client.actions.create_action(
name="Your action name",
code=open("MyAction.py", "r").read(),
overwrite=True,
)Snackbars
def action(shimoku_client: Client):
global_front_end_connection.snackbar_info(
"Starting action"
)
#code [...]
if variable1 is None: #let variable be any important value
global_front_end_connection.snackbar_error("Variable1 must have a value!")
return
global_front_end_connection.snackbar_info("Plotting the results")
#plotting code [...]
shimoku_client.run()
global_front_end_connection.snackbar_success(
"End of action"
)Implementation Examples
Simple Indicator Update

Damping Harmonic Oscillator

Linear Regression

Requests

Handling Errors
Last updated
Was this helpful?