Hi, just to update this works if you use Bar instead of Data.

if (Bar<=LookBack) {
return 0.0;
}
else {
Calculate
}