mbahia13
(Mandeep)
1
Hi,
I am trying to put together a script which shows a Bollinger Band Breakout which follows a squeeze.
Squeeze on:
UBB = BB(BARS=20, STDDEV=2.000000).
UpperLine; LBB = BB(BARS=20, STDDEV=2.000000).
LowerLine ; VERGENCE(UBB, LBB, LOOKBACK=5);
Breakout:
close() crossesabove bb();
Question how do I link the 2 scripts so that the squeeze has been ON for at least the last 1-2 days.
cheers
Mandeep
Bearski79
(Matthew Humphreys)
2
Hi,
If you have the SqueezeOn code setup as a saved script you can use the Script() function to reference it in other setups.
For example, to make sure the Squeeze On code has been true for the last 2 bars when the Breakout occurs you could use something like this:
V1 = Script(SqueezeOn);
V2 = close() crossesabove bb();
V1 == 1 and V1[1] == 1 and V2 == 1
For more information on the Script() function please refer to the following article:
https://help.optuma.com/kb/faq.php?id=723