Login Page - Create Account

Support Board


Date/Time: Mon, 06 May 2024 18:26:36 +0000



Post From: ACSIL - trailing stop loss and orders

[2019-09-17 11:44:58]
User907968 - Posts: 802

// Data processing once the bar has closed.

if(sc.GetBarHasClosedStatus(Index-1)==BHCS_BAR_HAS_CLOSED)

I'm not sure this piece of code is doing what you intend, maybe that is contributing to the unexpected behaviour?

sc.GetBarHasClosedStatus()

The code block above will always evaluate to true, as by definition the bar prior to sc.Index is always closed.