Login Page - Create Account

Support Board


Date/Time: Mon, 25 Nov 2024 02:38:06 +0000



Post From: ASCII study coding question

[2024-04-12 20:53:48]
User719512 - Posts: 264
See the sample in \SierraChart\ACS_Source\TradingSystem.cpp


  // Run the below code only on the last bar
  if (sc.Index < sc.ArraySize-1)
    return;

So that handles that condition.

Testing only for when a bar is closed as as you have above:

if (sc.IsFullRecalculation!=1 && sc.GetBarHasClosedStatus()==BHCS_BAR_HAS_CLOSED)

Test your code. Write some messages and see if they work as you want them to under live/replay. I think you have all the info you need to succeed here.