How to use support and resistance in Pi coding?

How to use Support and resistance levels in coding? Let us suppose , we need to write a code, where a buy signal is to be generated only if a bullish engulfing pattern at any of the support level S1, S2 or S3 ( as shown in charts) appears. Bullish engulfing could be easily written by CSP function but how to access S1, S2 or S3 in code.

S1, S2 or S3 can not be defined or access with tradescript from charts, you can define the price levels manually and can try