HasContractChangeEvent ( String rootSymbol);
Returns true if active futures contract has changed; false, otherwise.
|rootSymbol||current symbol||Defines the root symbol.|
def change = open - close;
AddVerticalLine(HasContractChangeevent(), "Change is " + change);
This example script draws a vertical line at the point where active contract change has occurred. It also displays the difference between the first Open after active contract change and last Close price of previously active contract. Note that this example only makes sense when automatic contract change adjustments for futures is disabled (see the Futures Settings article for details).