I would like to use an Integer counter to limit the amount of times a specific trade can be triggered intra-bar.
If my integer in Variables is "private int C1 = 0;" Am I correct with increasing the counter in the following method?
if (BS1 != null && BS1 == execution.Order)
{
if (execution.Order.OrderState == OrderState.Filled)
{
C1 = C1 +1;
}
}
I am using (IsFirstTickOfBar) to reset the counter for each bar.
I'm looking forward to your reply,
GLFX005
Comment