Skip to content

Parent Scripting Function

By Optuma Team · Updated 2017-10-18

The PARENT() function is similar to the Security() function but returns the core source of what ever tool it is added onto. (E.g. Apply a Show View on the Volume tool, the volume tools source will be the chart).

Scripting Example (Show View applied to a Volume tool)

// Parent() returns the chart data, as the chart data is the parent of the volume tool.
Data1 = Parent();
Close(Data1) > MA(Data1)

SEC2

Another Example in Scripting…

Apply a Moving Average on Volume tool, and apply a Show View on that Moving Average, the Parent() would return the volume values.

// Parent() returns the parent of the Moving Average which is the Volume tool
// Security() can be used to directly access the chart data in this case
Data1 = Parent();
Data2 = Security();
Close(Data1) > MA(Data1) and ATR(Data2) > 1

Choose which categories of cookies you allow. Strictly-necessary cookies are always on. You can change this any time via the "Cookie Settings" link in the footer.

  • Functional

    Remember preferences like dismissed banners and your dark-mode choice.

  • Analytics

    Help us understand how the site is used so we can improve it.

  • Marketing

    Measure our advertising and help us reach people who may be interested in Optuma.