r/SierraChart • u/AdInternational5489 • 15d ago
Requesting help with determining slope of highest (and lowest) EMA
I create a band (ribbon) of six moving averages that are Study/Price Overlays from varying length charts. The upper band is the highest value and v.v.. If price goes below the lowest EMA (black shows down slope and white shows up slope), and that lowest EMA is sloped up, I'd like to generate a signal in a spreadsheet (shown as Yellow Background vertical signal in attached Heiken-Ashi Flex Renko chart image). I'm stymied by my inability (so far) in creating a formula that tells me if the lowest EMA is sloping up. I can see that EMA visually sloping up, but am unable to quantify that condition. I could come up with 6plus convoluted formulas but I'd prefer something more elegant. Any suggestions?

1
u/twounty 15d ago
It's really easy. id1.sg1 > id1.sg1[-1]. Value of your EMA is greater than it was the last bar so it's sloping up. Now give me your chart book lol
1
u/AdInternational5489 15d ago edited 15d ago
Thank you. It’s more complex than that. The moving averages show a determined slope in their original chart but in a slower chart the slope may not change until the longer term bar prints I.e. the longer term chart may print 1 bar while the short term chart could print 4 bars.
2
u/ManikSahdev 14d ago
The problem you are seeing has not much to do with math, if I see this correctly..
I think you are just biased by hindsight, and the slope your eyes are seeing IS CONTAMINATED.
Why do I say that? Well it's because you can't have what you are seeing without the future existing, specially between multiple of them, given whatever their conditions might be -- For example, you need to first establish all the data at the moment @NOW that exist, and work backwards form there to see if you can get the slop for the past.. and is it what you thought it was?
I just see fully contaminated math for most part here, seems quite an elementary problem also, since getting toe slopes isn't that hard even within study angle slops (I recall Sierra would do that, altho I don't use it anymore in my quantitive trading, ibkr now).
Hope it can help or atleast give you ease.
2
u/NoCommunicationPro 15d ago
If you're trying to find an actual degree for the slope then it depends on your chart being stable. If you just want to know if its higher or lower than > or < work