You are here:
< All Topics

Similar to the CondRef function but with second condition to reset the value without waiting for the first condition to be true.

BLOCKREF(locked value if condition 1=True, new value if condition 2=True, Condition1, Condition2)

Example: If Buy is true, BuyAmount will be equal to value of close at that bar. The value is kept even Buy is no longer true. Value will be only reset by second condition or when first condition will be evaluated to true again. When Sell is True, BuyAmount will be equal to zero.

Set BuyAmount = BLOCKREF(close,0,Buy,Sell)

Previous CONDREF Function
Next STOP & TSTOP Function
Table of Contents