79318284

Date: 2024-12-30 18:11:37
Score: 1
Natty:
Report link

I was able to get the solution.

second_bar = bar_index - ta.valuewhen(AB_crossover==true and nz(AB_crossover[1], false)==false, bar_index, 1)

third parameter is key.

0: last condition
1: last second condition
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: QuantPilot