TREND SNIPER (Final Version)/ This script calculates the daily resistance and support levels. The entry is when the close breaks these levels. 
// Then it sets 4 exit lines, if the   backtraces these lines you've got your normal   exit. 
// If the close crosses the TP you've got your TP   exit. And if the close crosses the SL you've got your SL   exit.
// This is the good part --> If the close crosses the first line the SL get's raised to the entry level.
// This way you cut down on the SL losses and turn a lot of SL trades into (almost) break even trades. 
// You can adjust the resistance and support levels to remove the 'little wick entries', this raises the profitability.
// You can also choose the security resolution. I recommend using a higher timeframe than the chart resolution. 
// The exit source is also changeable. The HLC3 works best for me, but you can try others if you want.
I could really use some feedback. I want the resistance and support levels to remain on the same position when in trade. But it sometimes changes mid trade.
If you know how to fix this I will be forever grateful. If you have any feedback don't hesitate to give it to me straight. Thanks in advance and have a wonderful day :)
Feedback
Momentum adjusted Moving Average by DGTA  brand new Moving Average , calculated using Momentum, Acceleration and Probability (Psychological Effect).
 Momentum adjusted Moving Average(MaMA)  is an indicator that measures Price Action by taking into consideration not only Price movements but also its Momentum, Acceleration and Probability. MaMA, provides faster responses comparing to the regular Moving Average 
Here is the math of the MaMA idea 
 Momentum  measures change in price over a specified time period
      momentum = source – source(length)
 where,
source, indicates current bar’s price value 
source(length),  indicates historical price value of length bars earlier
Lets play with this formula and rewrite it by moving source(length) to other side of the equation 
      source = source(length) + momentum
 
to avoid confusion let’s call the source that we aim to predict as adjustedSource 
      adjustedSource = source(length) + momentum
 
 
looks nice the next value of source simply can be calculated by summing of historical value of the source value and value of the momentum. I wish it was so easy, the formula holds true only when the momentum is conserved/constant/steady but momentum move up or down with the price fluctuations (accelerating or decelerating)
Let’s add  acceleration effects  on our formula, where acceleration is change in momentum for a given length. Then the formula will become as (skipped proof part of acceleration effects, you may google for further details) 
      adjustedSource = source(length) + momentum + 1/2 * acceleration
 
here again the formula holds true when the acceleration is constant and once again it is not the case for trading, acceleration also changes with the price fluctuations
Then, how we can benefit from all of this, it has value yet requires additional approaches for better outcome  
Let’s  simulate  behaviour with some  predictive approach  such as using  probability  (also known as  psychological effect ), where probability is a measure for calculating the chances or the possibilities of the occurrence of a random event. As stated earlier above momentum and acceleration are changing with the price fluctuations, by using the probability approach we can add a predictive skill to determine the likelihood of momentum and acceleration changes (remember it is a predictive approach). With this approach, our equations can be expresses as follows 
      adjustedSource = source(length) + momentum * probability 
     adjustedSource = source(length) + ( momentum + 1/2 * acceleration ) * probability  , with acceleration effect 
Finally, we plot MaMA with the new predicted source adjustedSource, applying acceleration effect is made settable by the used from the dialog box, default value is true.  
 What to look for:
 •	Trend Identification
•	Support and Resistance
•	Price Crossovers
 Recommended  settings are applied as default settings, if you wish to change the length of the MaMA then you should also adjust length of Momentum (and/or Probability). For example for faster moving average such as 21 period it would be suggested to set momentum length to 13
 Alternative usage , set moving average length to 1 and keep rest lengths with default values, it will produce a predictive price line based on momentum and probability. Experience  acceleration factor by enabling and disabling it 
 Conclusion 
MaMA provide an added level of confidence to a trading strategy and yet it is important to always be aware that it implements a predictive approach in a chaotic market  use with caution  just like with any indicator
Trading success is all about following your trading strategy and the indicators should fit within your trading strategy, and not to be traded upon solely
 Disclaimer : The script is for informational and educational purposes only. Use of the script does not constitutes professional and/or financial advice. You alone the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold dgtrd TradingView user liable for any possible claim for damages arising from any decision you make based on use of the script
Rate of Return (RoR) by DGTA rate of return (RoR) is the net gain or loss of an investment over a specified time period, expressed as a percentage of the investment’s initial cost


