session
Syntax
Parameters
Return Value
Example
//@version=1S
// This is the setup function.
// Here you can define the input parameters for the indicator.
init = () => {
// Example: Market session input
input.session(
'Trading Session',
'0930-1600',
undefined, // auto id: "tradingsession"
'Choose the active trading hours',
'Sessions',
'session-row'
);
}
// This is the main function. It is called every time a new candle is received.
// Here you can calculate the indicator values and draw the indicator on the chart.
onTick = (length, _moment, _, ta, inputs) => {
};Result

Last updated