Once PostPone = 0
Once BuyingConditionsAreSet = 0
Once AllMyBuyingConditionsMeet = 0
It Not BuyingConditionsAreSet then
// Sort out Buying Conditions here. If they are met, end with :
BuyingConditionsAreSet = 1
AllMyBuyingConditionsMeet = 1
endif
If AllMyBuyingConditionsMeet then
PostPone = 2
Endif
[...]
If AllMyBuyingConditionsMeet then
If not OnMarket and PostPone = 0 then
Buy xyz Shares At Market
BuyingConditionsSet = 0 // Reset.
AllMyBuyingConditionsMeet = 0 // Reset.
ElsIf Not OnMarket and PostPone > 0 then
PostPone = PostPone -1 // Now wait for the next call. 2 actually.
endif
endif
// BuyingConditionsSet and AllMyBuyingConditionsMeet seem redundant (do the same)
// but "underway" at downcounting PostPone, you may feel that conditions are
// not right anymore (the 3 of 1-2-3 never occurs), meaning that the conditions
// have been "set" all right, but you won't Enter. On the other hand, once
// you have definitely set the conditions, you may not want to look back and
// just wait 2 bars regardless. So it is a bit how you want all happening.