# Support Board

Date/Time: Mon, 24 Feb 2020 14:14:26 +0000

## [Programming Help] - Help with Referencing A Range of Data

 [2020-01-21 03:13:10] #1 sourdubber - Posts: 47 | Ending Date: 2019-11-06 [Expired] I have a question about "Referencing A Range of Data" https://www.sierrachart.com/index.php?page=doc/StudyChartAlertsAndScanning.php#ReferencingARangeOfData In the spreadsheet, I created a custom formula using a moving average crossover and placed it in Column P3. Whenever there is a MA crossover WITHIN THE LAST 3 days and the close is below the open, I want to BUY. Here is the formula I wrote for this, to be placed in K3: =AND(SUM(P[3:5]>0,E3
 [2020-01-21 03:41:09] #2 sourdubber - Posts: 47 | Ending Date: 2019-11-06 [Expired] Please disregard. Found the fix. =AND(SUM(P3:P5)>0,E3 100
 [2020-01-21 14:33:39] #3 tomgilb - Posts: 2380 | Ending Date: 2020-02-29 Spreadsheet syntax is different than Simple Alert syntax. (However, the Spreadsheet Formula study uses Simple Alert syntax.)
 [2020-01-21 23:37:25] #4 sourdubber - Posts: 47 | Ending Date: 2019-11-06 [Expired] (However, the Spreadsheet Formula study uses Simple Alert syntax.) Not sure I follow but if what you wrote is true, shouldn't =AND(SUM(P[3:5])>0,E3
 [2020-01-22 01:03:41] #5 tomgilb - Posts: 2380 | Ending Date: 2020-02-29 shouldn't =AND(SUM(P[3:5])>0,E3