Login Page - Create Account

Support Board


Date/Time: Mon, 20 May 2024 19:33:17 +0000



Post From: ASCII study coding question

[2024-04-12 18:26:32]
User395175 - Posts: 71
Hi, if i want my study to run only one time when the most recent bar just closed and before new bar added and use the most recent closed bar data, how should i define this condition in code? (i dont want study to be run during study fully recalculation, i want it to run only when the bar is updated during living trading or replay mode), i use auto-looping

if (sc.Index == sc.ArraySize - 1) {
...
}

or

if (sc.Index == sc.ArraySize - 2) {
...
}

?
Date Time Of Last Edit: 2024-04-12 18:28:41