Simple question about Moving Average

Hi,
I just want to ask how can I code this logic:

Price between 2 SMA, SMA 20 high, and SMA 20 low.

Or something like that, so I can identify a flat market.

Thanks
Until you can set your criteria in concrete terms it can not be coded. There is no price between three (3) moving averages.
Mattia Bernardi :
Hi,
I just want to ask how can I code this logic:

Price between 2 SMA, SMA 20 high, and SMA 20 low.

Or something like that, so I can identify a flat market.

Thanks

If I understand correctly, the Alligator may suit you: