WindowFind

Description

The WindowFind method finds the window number that contains the specified indicator name.

Syntax

public WindowFind(name: string): number

Parameters

  • name: A string representing the indicator name to find

Return Value

Returns a number representing the window number containing the indicator. Returns -1 if not found.

Example

try {
  const windowNumber = this.api.WindowFind("RSI");
  if (windowNumber !== -1) {
    console.log(`RSI indicator found in window ${windowNumber}`);
  } else {
    console.log("RSI indicator not found");
  }
} catch (error) {
  console.error("Failed to find indicator window:", error.message);
}

Last updated