Ryan Olson![]() Veteran ![]() ![]() ![]() Posts: 170 Joined: 12/29/2006 Location: Austin, Tx ![]() | Hey Keith, I assume you are talking about his HRS seminars. Const RefSymbol as String = "SPY" This is using the Const statement which declares a constant and sets its value. So later in the code you see where Ed uses HRSDiff = HRS_DIFF(14,3,RefSymbol). This assigns the value of HRSDiff to HRS_Diff(14, 3, "SPY"). Since HRS_Diff allows to pass the following "Periods", SMAPeriods", and RefSymbol - Ed assigned a constant value to RefSymbol and set it to SPY. If this wouldn't have been set to a constant "const" then the value would have been the symbol you are currently on. Not every system or indicator would allow you to set the const of a value. Here is a site you can look at to get more information about Constants. https://docs.microsoft.com/en-us/office/vba/language/concepts/getting-started/declaring-constants#:~:text=You%20use%20the%20Const%20statement,constant%20and%20set%20its%20value.&text=You%20can%20declare%20a%20constant,statement%20with%20the%20Public%20keyword. Hope this helps, Ryan Olson Nirvana Systems |