Skip to content

user-defined types (UDTs) support? #49

@jwernisch

Description

@jwernisch

First off, great runtime! Most of the initial pineScripts we tested work as expected.

However, I am having some issues with more complex scripts. It seems I am unable to create an instance of the UDT or assign values. Using a stripped down example, the code below results in a TypeError: Settings.new is not a function error:

type Settings
float source

Settings settings =
Settings.new(
input.source(title='Source', defval=close, group="General Settings", tooltip="Source of the input data")
)

Are UDTs currently supported (v0.7.3) or am I doing something incorrectly?
Is there an alternative way to write this code? Any documentation that I am missing?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions