VAWSI and Trend Persistance Reversal Strategy SL/TPThis is a completely revamped version of my "RSI and ATR Trend Reversal Strategy."
What's New?
The RSI has been replaced with an original indicator of mine, the "VAWSI," as I've elected to call it.
The standard RSI measures a change in an RMA to determine the strength of a movement.
The VAWSI performs very similarly, except it uses another original indicator of mine, the VAWMA.
VAWMA stands for "Volume (and) ATR Weight Moving Average." It takes an average of the volume and ATR and uses the ratio of each bar to weigh a moving average of the source.
It has the same formula as an RSI, but uses the VAWMA instead of an RMA.
Next we have the Trend Persistence indicator, which is an index on how long a trend has been persisting for. It is another original indicator. It takes the max deviation the source has from lowest/highest of a specified length. It then takes a cumulative measure of that amount, measures the change, then creates a strength index with that amount.
The VAWSI is a measure of an emerging trend, and the Trend Persistence indicator is a measure of how long a trend has persisted.
Finally, the 3rd main indicator, is a slight variation of an ATR. Rather than taking the max of source - low or high- source and source - source , it instead takes the max of high-low and the absolute value of source - the previous source. It then takes the absolute value of the change of this, and normalizes it with the source.
Inputs
Minimum SL/TP ensures that the Stop Loss and Take Profit still exist in untrendy markets. This is the minimum Amount that will always be applied.
VAWSI Weight is a divided by 100 multiplier for the VAWSI. So value of 200 means it is multiplied by 2. Think of it like a percentage.
Trend Persistence weight and ATR Weight are applied the same. Higher the number, the more impactful on the final calculation it is.
Combination Mult is an outright multiplier to the final calculation. So a 2.0 = * 2.0
Trend Persistence Smoothing Length is the length of the weighted moving average applied to the Trend Persistence Strength index.
Length Cycle Decimal is a replacement of length for the script.
Here we used BlackCat1402's Dynamic Length Calculation, which can be found on his page. With his permission we have implemented it into this script. Big shout out to them for not only creating, but allowing us to use it here.
The Length Cycle Decimal is used to calculate the dynamic length. Because TradingView only allows series int for their built-in library, a lot of the baseline indicators we use have to be manually recreated as functions in the following section.
The Strategy
As usual, we use Heiken Ashi values for calculations.
We begin by establishing the minimum SL/TP for use later.
Next we determine the amount of bars back since the last crossup or crossdown of our threshold line.
We then perform some normalization of our multipliers. We want a larger trend or larger VAWSI amount to narrow the threshold, so we have 1 divide them. This way, a higher reading outputs a smaller number and vice versa. We do this for both Trend Persistence, and the VAWSI.
The VAWSI we also normalize, where rather than it being a 0-100 reading of trend direction and strength, we absolute it so that as long as a trend is strong, regardless of direction, it will have a higher reading. With these normalized values, we add them together and simply subtract the ATR measurement rather than having 1 divide it.
Here you can see how the different measurements add up. A lower final number suggests imminent reversal, and a higher final number suggests an untrendy or choppy market.
ATR is in orange, the Trend Persistence is blue, the VAWSI is purple, and the final amount is green.
We take this final number and depending on the current trend direction, we multiply it by either the Highest or Lowest source since the last crossup or crossdown. We then take the highest or lowest of this calculation, and have it be our Stop Loss or Take Profit. This number cannot be higher/lower than the previous source to ensure a rapid spike doesn't immediately close your position on a still continuing trend. As well, the threshold cannot be higher/ lower than the the specified Stop Loss and Take Profit
Only after the source has fully crossed these lines do we consider it a crossup or crossdown. We confirm this with a barstate.isconfirmed to prevent repainting. Next, each time there is a crossup or crossdown we enter a long or a short respectively and plot accordingly.
I have the strategy configured to "process on order close" to ensure an accurate backtesting result. You could also set this to false and add a 1 bar delay to the "if crossup" and "if crossdown" lines under strategy so that it is calculated based on the open of the next bar.
Final Notes
The amounts have been preconfigured for performance on RIOT 5 Minute timeframe. Other timeframes are viable as well. With a few changes to the parameters, this strategy has backtested well on NVDA, AAPL, TSLA, and AMD. I recommend before altering settings to try other timeframes first.
This script does not seem to perform nearly as well in typically untrendy and choppy markets such as crypto and forex. With some setting changes, I have seen okay results with crypto, but overfitting could be the cause there.
Thank you very much, and please enjoy.
Original
Stock Rotation Model [CC]This is an original indicator so a true hidden gem in my opinion. I based this idea off of the work by Giorgos Siligardos (Stocks and Commodities Aug 2012) with his indicator called the Sector Rotation Model. This indicator is best used as a trend confirmation in combination with another indicator such as a leading indicator. This will show you how strong the current stock you are looking at is compared to the S&P 500 which almost everyone uses as a relative strength comparison. Feel free to change the default lengths if you would like as these were just the settings that I liked the best overall. Let me know if you find any good combos that works for most stocks in general. I have included strong buy and sell signals in addition to normal ones so strong signals are darker in color and normal signals are lighter in color. Buy when the line turns green and sell when it turns red.
Let me know if there are any other indicators or scripts you would like to see me publish!
Call / All Ratio ( C / A ) - NoldoFirst of all this script inspired by MagicEins' Put/Call-Ratio-Buschi script .
What is the Put-Call Ratio
The put-call ratio is an indicator ratio that provides information about relative trading volumes of an underlying security's put options to its call options. The put-call ratio has long been viewed as an indicator of investor sentiment in the markets, where a large proportion of puts to calls indicates bearish sentiment, and vice versa. Technical traders use the put-call ratio as an indicator of performance and as a barometer of overall market sentiment. Put-call ratios on broader indexes such as the S&P 500 are also used as more general gauges of market climate.
Put-Call Ratio Interpretation
One way to interpret the put-call ratio is to say that a higher ratio means it's time to sell and a lower ratio means it's time to buy, because when the ratio is high it suggests that people are either expecting or protecting more readily against a future decline in the price of the underlying. A Put-Call ratio between 0.5 and 1 is considered a sideways trend in the markets.
Some also view the Put-Call ratio as a contrarian indicator. Traders know that derivatives are used to do more than place bets; they are used as hedges and insurance. If there's a lot of insurance being placed to the sell side, it means traders are worried about prices falling.
Some traders buy when the put-call ratio is above 1, meaning the market is out of balance to the sell side, and sell when the put-call ratio is below 1, meaning the market is out of balance to the buy side. These traders are looking to make money on the correction. The interpretation of the ratio is left to the analyst's or trader's investment philosophy.
Reference : Investopedia (www.investopedia.com)
Let' s start.
In short, calls represent "bulls" and puts represent "bears".
Some analysts do the opposite,for trend reversals the choice is up to you.
I usually look at the opposite comments in commercial positions because I look at this flow angle neutral.
If you want to do the opposite, you must create Put / All Ratio.
So i created this ratio to observe easily movements under or over 0.50 area .
Or you can take the point close to 0.50 as a horizontal trend. Many more comments can be made.I have a few ideas about this, and I'm going to publish them soon . My best suggestion is that it covers a single bar and is very volatile, so you can look for averages and strong accelerations.
This code is open source under the MIT license. If you have any improvements or corrections to suggest, please send me a pull request via the github repository github.com
Stay tuned , best regards.
GMAE Original (By Kevin Manrrique)This script is called GMAE Original by me (Kevin Manrrique). I'm publishing this to the public because we are all traders and we need to support each other as a TVcommunity. This is something I built for fun. This script uses a series of EMA's. NO REPAINT, NO LAGGING! It works better for short-term trends as you can see. Please leave the copyright on the script at all times even if you rebuild it. If you need any help or have questions please inbox me privately. If you interested in joining up and building an indicator or strategy please inbox me as well. Thank you and I hope you enjoy this script as much as I do.
Remember there are no holy grails. The only holy grail there is are indicators built together to stop faulty signals and be as accurate as possible and this is one of them.
Sincerely,
Kevin Manrrique