Adding this function to the F2 (Insert Snippet) Menu:
#region BOOL FLAGS:
#region SCOPE: CLASS | doOnce Bool Flag Class Scope Variables
private bool doOnce = false;
#endregion
#region SCOPE: OnBarUpdate() ACTION BLOCK — SUB-SCOPE: IF STATEMENT CONDITION BLOCK | SET doOnce Bool Flag
if (<YOUR CONDITIONS HERE>
&& (doOnce == false) )
{
doOnce = true;
}
#endregion
#region SCOPE: OnBarUpdate() ACTION BLOCK — SUB-SCOPE: IF STATEMENT ACTION BLOCK | RESET doOnce Bool Flag
if (IsFirstTickOfBar)
{
doOnce = false;
}
#endregion
#endregion

Comment