Ehlers Error Correcting Exponential Moving Average [CC]The Error Correcting Exponential Moving Average was created by John Ehlers and Ric Way (Stocks & Commodities V. 28:11 (30-35)) and this is an excellent moving average that accurately identifies the trend and sticks with the price during trends or choppy periods pretty well. It looks back to find the best gain setting for each day that returns the smallest difference between the current price and the ema based on the gain setting and uses that day's info in it's total calculations and if there is a zero gain for the day then it is just a classic ema. I have included strong buy and sell signals in addition to normal ones so lighter colors are normal and darker colors are strong. Buy when the line turns green and sell when it turns red.
Let me know if there are any other indicators you would like to see me publish!
Errors
Error Message -- DemoThis script is proof of concept to display an “error message” to provide user feedback when valid, but non-logical variables are input by the end user. In this example, the user enters a lower limit that is greater than the upper limit. The Pinescript user input box allows input types and min/max values, but it does not allow input conditions like (Upper > Lower) for each variable. This script evaluates the user input and determines if the variables are logical. If not, it will print an error box using the new Pinescript table function.
This is a demo only – there are no signals, strategies, or alerts. Hopefully, some pinescripters will find this idea useful and expand on the concept.
User inputs an Upper Limit that is lower than the Lower Limit – error message displayed.
User inputs logical Upper and Lower Limits (Upper Limit is greater than Lower Limit) – normal plots.
Risk/Reward (InfoPanel)Hello ladies (if any in my followers ?) and gentlemen
Here's your indicator of the day and once again given for FREE. What I'm going to say to my landlord if I can't pay rent because I'm not asking for $$ ?
I'll probably send the next indicators from below the town brige. Even then... I will still comply with my challenge to share 1 original indicator a day and not a copy of what already exists
The today indicator is to show you the great possibilites behind the TradingView Label object : Label
Profit And Loss LABEL
I thought about that one for a while and wanted to share how we can calculate dynamically a Risk to Reward ratio .
This indicator is not based on the price on the chart. I repeat before getting the question asked me privately 10 times This indicator is not based on the price on the chart.
"Then it's not useful dude, you're dumb". I agree and.... I agree... BUT you can now calculate your Risk to Reward ratio on TradingView directly rather than using an external Excel file. Who's dumb now :) ?
For those curious about it, I used this formula for the R:R ratio formula Calculating-risk-reward.asp
It will also display the Profit and Loss data based on your inputs only
ERRORS LABEL
I also added some basic errors management. If any error occur when you'll type your inputs, then a very mean Error label will appear and you'll have to fix the issues in less than a few seconds.
Otherwise your computer will explode (KABOOOOM) and your trading capital will be redirected to my own insurance fund (I have a family to feed, thanks for your sacrifices)
(end of joke)
In more seriousness, the engine will check if the TP1/TP2/Stop Loss/Entry price combinaisons makes sense. If not, you''ll be punished with an error label.
You can use this methodology for your own indicators in the futur to display dynamic messages based on users' inputs and/or current price on the chart
The educational video giving more details is coming right up.
You can watch it and should be located under "IDEAS"
Wshing you all a very fruitful end of your day and see you tomorrow for the last indicator of the week (baby David is tired and need his rest)
Dave