[B]VulcanClassic[/B] thanks for PM - I was unable to send you one but could send a reply to yours okay.![:confused: :confused:](https://forums.babypips.com/images/emoji/twitter/confused.png?v=5)
Below is the code for the squeeze indicator for DealBook. There is an input setting that you will probably want to play around with: squeeze = 1.5 [my original setting].
You can make small changes to see how it changes the sensitivity. Then decide by the effect, relative to squeezes on the chart above, where you want to leave it.
It is set to match Bollinger Band setting of 20 periods - but can be changed by P1.
As usual open a new page in ChartStudio, then copy and paste the code below. Save and Install; then you can use it from DealBook.
Ken.
///////////////////////////////////////////////
indicator AAA_squeeze_v1;
// contact ken doubleU for any problems
input squeeze = 1.5, P1 = 20, deviations = 2, P2 = 4, P3 = 15,
starc_factor = 1 ;
/* change the setting of ‘squeeze’ by small amounts
to effect the sensitivity. Judge the result by comparison
with the actual squeeze on the chart. */
draw ratio(“ratio”,histogram,dark_magenta,2);
vars tmp(series), tmp1 (series), i(number), lst(number),
mid(series), lower(series), lowerstarc(series),
midstarc(series), upper(series), upperstarc(series);
begin
lst := back(close);
if lst < P1 + P2 + P3 + 1 then return;
mid :=sma(close, P1);
tmp := deviations * stddev(close, P1);
upper := mid + tmp;
lower := mid - tmp;
midstarc := sma(close, P2);
tmp1 := starc_factor * mma(truerange(), P3);
upperstarc := midstarc + tmp1;
lowerstarc := midstarc - tmp1;
for i := front(close) to back(close) do begin
ratio[i] :=(upper[i] - lower[i])/(upperstarc[i] - lowerstarc[i]);
if ratio[i] > squeeze then ratio[i] := 0;
end;
end.
//////////////////////////////////////////////////////////////