Login Page - Create Account

Support Board


Date/Time: Sat, 04 May 2024 10:59:14 +0000



Post From: Question about how sc.GetBarHasClosedStatus() works

[2017-07-22 00:20:21]
CustomIndicators - Posts: 126
As I was trying to say in my last post, sc.UpdateStartIndex has been removed from my code. I'm not using it anymore.

I an attempt to get my code finding pivot points, I did change the if statement to:

if (sc.GetBarHasClosedStatus() == BHCS_BAR_HAS_NOT_CLOSED)

Interestingly, when I went to apply the study to the charts (16 linked charts with study linking selected), they loaded onto the charts much faster then when I didn't use this if statement at all. It usually freezes SierraChart for a good 1-2 minutes while applying the studies to each chart. When using BHCS_BAR_HAS_NOT_CLOSED, all studies were applied successfully within 5 seconds. Perhaps you have BHCS_BAR_HAS_CLOSED and BHCS_BAR_HAS_NOT_CLOSED switched around? I expected their effects to be completely reversed due to their names, but using BHCS_BAR_HAS_NOT_CLOSED in my if statement, I've gotten a massive performance boost over all. With this change, I'm finding all pivot points successfully in backtests.