Replies: 1 comment 1 reply
-
Hmm, interesting idea. This sounds more like a utility than an actual indicator. I imagine you might want to shift just about any indicator or moving average. I'm thinking an interface like By the way, this would be really simple to do yourself as well. // untested, just writing code from my iPad
var results = quotes.GetSma(..).ToList();
int shift = -3;
int length = results.Count();
for (int i = 0; i < length; i++) {
// nullify out of range value
if (i - shift < 0 || i - shift > length) {
results[i].Sma = null; // or remove record, if you prefer
}
// transpose value
else {
results[i].Sma = results[i - shift].Sma ;
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was wondering if there was a way to add the DMA similar to TDAmeritrade
https://tlc.thinkorswim.com/center/reference/Tech-Indicators/studies-library/C-D/DMA
To be able to use a negative displacement
Beta Was this translation helpful? Give feedback.
All reactions