Skip to main content

register_namespace_objects

Function register_namespace_objects 

Source
pub fn register_namespace_objects<O: PineOutput + LogOutput + PlotOutput + LabelOutput + BoxOutput + InputOutput + LineOutput + TableOutput + MetadataOutput + GlobalOutput + AlertConditionOutput + FillOutput + DrawingOutput>(
    version: PineVersion,
    syminfo: Option<SymInfo>,
    timeframe: Option<Timeframe>,
) -> (HashMap<String, Value<O>>, Vec<PerBarAdvance<O>>)
Expand description

Register all builtin namespaces as objects and global functions Returns namespace objects to be loaded as variables (e.g., “array”, “str”, “ta”) and global builtin functions (e.g., “na”) Each member stores the builtin function pointer as Value::BuiltinFunction

This uses DefaultPineOutput for now. Full generic support will be added when the BuiltinFunction macro is updated to support generic output types.