Papercuts Time Sampled Higher Timeframe EMA Without SecurityThis EMA uses a higher time sampled method instead of using security to gather higher timeframe data.
Its quite fast and worked well with the timeframes prescribed, up to 8hrs, after 8hrs, the formatting gets more complicated and i probably wouldn't use it anyway.
You can use this as a guide to avoid security and even f_security with this method.
NOTE: This includes the non repainting f_security call so that i woudl be able to check my results against what it does, thats not nessecary to keep at all.
There is some minor differences in data, but its so minor it doesnt bother me, though it would be interesting to know what the difference actually is. If anyone figures that out, leave a comment and let me know!
This is meant to be an example for others to build and learn and play with.. so enjoy!
Sampling
Ehlers Undersampled Double Moving Average Indicator [CC]The Undersampled Double Moving Average was created by John Ehlers (Stocks and Commodities April 2023), and this is a double moving average system which is pretty rare for John Ehlers. For those of you who would like my other take on an Ehlers double moving average, be sure to check out my previous Ehlers double moving average script . He came up with a unique idea for this indicator to create a moving average using a sample of the price data. For example, we use his suggested length of 5 only to use the price data every 5 bars. Feel free to change this, and please let me know if you find a length that works better. He then smooths the indicator using the Hann Windowed Moving Average . I color-coded the lines to show stronger signals in darker colors or standard signals in lighter colors. Buy when the line turns green and sell when it turns red.
Let me know if there is an indicator or script you would like to see me publish!
occ3aka weighted fair price
The ultimate price source for all your stuff, unless you go completely nuts.
The ultimate way to build line charts & do pattern trading, unless you go completely nuts.
Why occ3?
You need a one-point estimate for every bar, a typical price of every bar aye? But then you see that every bar has a different distribution of prices. You can drop a stat test on every bar and pick median, mean, or whatever. But that's still prone to error (imagine borderline cases).
Instead, you can transform the task into a geometric one and say, "I wanna find the center of mass of all dem ticks within a particular interval (a day, a week, a century)". But lol ofc you won't do it, so lets's estimate it:
1) a straight line from Open to Close more/less estimates a regression line if you woulda dropped regression on all the ticks within a given interval;
2) centroid always lies on regression line, so it's always in between the endpoints of regression line. So that's why (open + close) /2;
3) Then, you remember that sequence matters, + generally the volume is higher near the close, so...;
4) Voila, (open + close + close) / 3
Why "fair" price?
Take a daily bar:
1) High & low were the best prices to sell & buy;
2) Opening & closing auctions had acceptable prices, in exchange for the the biggest potential to transact serious volume;
3) "Fair" price, logically, is somewhere in between the acceptable prices;
4) Market is fractal => the same principles propagate everywhere;
4) No, POCs and VPOCs don't make much sense as fair prices.
Nothing else to say, really advise to use it as a line chart if you trade price patterns.