How to force set or provide an ticker/ symbol input to an existing ToS study to give value for specific Symbol (ticker)?
HI all - I am taking this standard study RelativeMomentumIndex from ToS as an example, but the question is generic. I have written some simple custom scripts (am a novice at ThinkScript) where I was comparing values / results of studies for two different symbols. Some studies have input as a symbol so that worked. But most studies don't.
So taking this e.g. of RelativeMomentumIndex it has only two inputs for lengths and it is comparing Momemtum for that specific stock or ETF. But let's say I wanted to compare this for two different stocks .. let's say BAC vs XLF. Can I, in my custom study force set the RelativeMomentumIndex to give me value for BAC (which will be in an input in my custom study) and then call the study again and force set XLF and get the value for that and then continue with what I wanted to do with these two values?
def mom_symbol1 = reference RelativeMomentumIndex(); # so somehow here ask for BAC value
def mom_symbol2 = reference RelativeMomentumIndex(); # get xlf value
???
I know, if the standard study has code visible, I could copy and do some modification, but that is not the intent of this question. It was more to find if there is a way to force set a study to give value for a specific symbol? Hopefully there is but am thinking there isn't a way.
HI all - I am taking this standard study RelativeMomentumIndex from ToS as an example, but the question is generic. I have written some simple custom scripts (am a novice at ThinkScript) where I was comparing values / results of studies for two different symbols. Some studies have input as a symbol so that worked. But most studies don't.
So taking this e.g. of RelativeMomentumIndex it has only two inputs for lengths and it is comparing Momemtum for that specific stock or ETF. But let's say I wanted to compare this for two different stocks .. let's say BAC vs XLF. Can I, in my custom study force set the RelativeMomentumIndex to give me value for BAC (which will be in an input in my custom study) and then call the study again and force set XLF and get the value for that and then continue with what I wanted to do with these two values?
def mom_symbol1 = reference RelativeMomentumIndex(); # so somehow here ask for BAC value
def mom_symbol2 = reference RelativeMomentumIndex(); # get xlf value
???
I know, if the standard study has code visible, I could copy and do some modification, but that is not the intent of this question. It was more to find if there is a way to force set a study to give value for a specific symbol? Hopefully there is but am thinking there isn't a way.