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!
Joelly3d
Papercuts Dynamic EMA - Relative Parameter FunctionThe goal of this is to link two parameters of different known low and high values so one affects the other.
In this case, I want to link Relative Volume to the length of an EMA, so it responds faster in times of high volume.
As an animator I am used to linking values in this way with Maya using a set driven key, took some work to figure it out in pine.
Looking up this concept, it has a few names, Relative values, linear interpolation, or rescale values.
Thanks to pinecoders for writing the EMA funciton that can accept length variables!
Here's a quick look at the root function to link the two values.
f_relativeVal(_source, in_bot, in_top, out_bot, out_top) =>
// float _source: input signal
// float in_bot : minimum range of input signal.
// float in_top : maximum range of input signal.
// float out_bot : minimum range of output signal.
// float out_top : maximum range of output signal.
clampSrc = _source > in_top ? in_top : _source < in_bot ? in_bot : _source //claps source to create a controlled range
//relInput = (clampSrc - in_bot) / (in_top - in_bot) * 100
inDiffIncrement = (in_top - in_bot)
outDiffIncrement = (out_top - out_bot)
out_bot + (clampSrc - in_bot) * outDiffIncrement / inDiffIncrement // rescale input range to output range
Papercuts Dual PSAR v01Dual PSAR is a trend following script that uses auto-higher timeframe calculation of the current timeframe to create a dual Parabolic Stop And Release.
This is useful because it can determine periods of transition or indecision and can flag those periods with which way it is learning even though it is undecided, what i call "Wait Zones".
When both PSARS are not in alignment, it uses the lower timeframe one to determine which way the wait zone is learning.
You can see below in the chart shows some good trends and some wait zones.
A wait zone can have bullish indication, but then still have a bearish continuation.
A wait zone can have bullish indication, and then enter a bull trend.
Typically I won't make trades in wait zones, and I will exit trades when entering one.
Just wanted to try this out and see how it did. Figured I'd share.
Papercuts Super Trend MTF v02All my scripts are part of a suite called Papercuts .
This one uses one current timeframe supertrend and adds Four Automatic Higher Timeframe Supertrends based on those same parameters to help you determine larger trends while only needing a single chart. This works quite well on 5 and 15 minute charts and will look up in time. Confident trends can be identified by having two or more lines in the same direction.
When unified, the intensity of the glow should increase a trends confidence. Unify collapses the 3 highest timeframe supertrends into the first higher timeframe supertrend. Without Unify on, the overall trends are usually easier to see at just a glance. Higher timeframe supertrends can show support or resistance and act as stop loss limit ranges if you choose. Unify keeps things a bit cleaner and more compact.
V02 updated to fsecurity for no repainting and added a 3MA trend option as well.
Thanks to @Pinecoders for helping me better understand the security function!
Here is a view with Unify on....
Here is a view with Unify off...