TTM Squeeze Pro

  • This topic has 2 replies, 2 voices, and was last updated 1 year ago by avatarAlfy.
Viewing 3 posts - 1 through 3 (of 3 total)
  • #209650

    Good morning guys, I’m trying to create the TTM Squeeze pro. The code already exists on site for the basic TTM squeeze which is when the Bollinger 20 day bands with 2 standard deviations around a 20d SMA move inside the 20d Keltner channels with 1.5 average true ranges (14d) around a 20d SMA. What I’ve tried to create is the squeeze pro which has 3 levels of compression. The lowest compression is when the Bollinger bands move inside the Keltner channels with 2 ATRs around the 20d SMA, the mid squeeze is when the Bollinger’s move inside the 1.5 ATR Keltner channels and finally the high compression squeeze is when the Bollinger’s move inside the Keltner’s with 1 ATR around the 20d SMA. I’ve tried to colour the dots white for the low compression sqz, Green for the mid compression and Blue for the high compression squeeze but the dots aren’t coming out coloured correctly. The rest looks ok. Can someone take a look at the code to see where I’m going wrong? Any help most appreciated.

    Best regards

     

    #209659

    Hi,

    Line 19 doesn’t feel right, you could try replacing the lowerbb towards the end of the line with upperbb:

    sqzOnmid = (lowerBB>lowerKCmid) AND (upperBB<upperKCmid) AND (LOWERBB<LOWERKCHIGH) AND (UPPERBB>UPPERKCHIGH)

    1 user thanked author for this post.
    #209660

    Very good spot thank you.

Viewing 3 posts - 1 through 3 (of 3 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login