Here's how you can do that:
First of all, there is a built in indicator called 'Woody' that has a calculation line named 'BxBW'. When that indicator is added to a chart it will calculate %B x Bandwidth and plot it for the currently selected chart symbol:
But the trick is to get an entry or exit signal generated for any symbol when this indicator is <=0 for the TVIX. To fix a script to the TVIX rather than changing based on chart symbol, the following script can be used:
Code: Select all
MyCalc: FML('TVIX', 'Woody[BxBW]');
Note also that TVIX must be in the currently chosen symbol list for this to work.
To turn this into a scan for when the value <= 0, you can use the following:
Code: Select all
MyCalc:= FML('TVIX', 'Woody[BxBW]');
event: MyCalc <= 0;