# CryptoSEE - Security function study

425 views
425
Some people have asked me how to correctly use security() function on multiple time frames. This script is my example to demonstrate ways to use the security() function in different contexts. Hopefully, it can help to provide a detail explanation of how the security() function with different resolutions working on the 15M Candles Chart.

Method-1:
• Get close price thought the security() function with the time frame of 1H
• Calculate SMA of above 1H close price with a length of 50 bars back.
• This is to calculate 50 bars back SMA of 1H close on 15M Candle Chart
Method-2:
• Get SMA of the close price with a length of 50 bars back, through the security() function with the time frame of 1H. This length is 50 of 1H bars back.
• This is similar to calculate 50 bars back SMA of 1H close on 1H Candle Chart.
Method-3: is how to get Method-2 SMA from the Method-1
• Get close price thought the security() function with the time frame of 1H
• Calculate SMA of above 1Hclose price with a length of 50 x 1H resolution/15M candle = 50 x 4 = 200 bars back.
• This is to calculate 200 bars back SMA of 1H close on 15M Candle Chart. This plot is same as plot in Method-2 above
My prayers have been answered. I knew someone in the Pine community would have done it. Thank you very much for this my friend