Presets Selector - FRIDAY NIGHT CHALLENGEBonjour/Salut ça va?
Ok enough for the french :) You guys should really stop challenging me on things on Pinescript and asking me if it's possible or not because... that's the second time in a row I'm about to reveal a nice trick
Please take this example as a proof of concept/feasability. This follower said "I'm tired of manually filling the fields of my indicator, my fingers are dead.... every time I change something in the code, I lose the configuration by default"
Say no more sir.... challenge accep..... wait for it ....ted (that's his real name actually) !!!!
Mesdames et messieurs (damn... my french accent is back), let's unveil the curtain on... the PRESETS SELECTOR (please try to imagine someone super famous shouting it and everyone standing and clapping their hands...)
What I mean by presets is THIS
I inspired myself from this script MacD-Custom-Indicator-Multiple-Time-Frame-All-Available-Options/ (this guy has more likes in a single indicator than me and my friends and my family in all social media channels combined over the past 15 years or so....#humbled)
Anywoo.... the concept is that you can define presets in your script .... which is not possible by TradingView at the moment. If you always have the same set of parameters for a given indicator, please think about your fingers too and give them some rest by implementing a preset in the code directly
I also added a few features :
- You can choose the resolution of the indicator (from 1 minute to 1 month)
- You can choose also between displaying a MACD or a MACD ZERO LAG
Imagine now you have a super complex backtest with hundreds of fields... and unfortunately ... you'll have to fill some of them for each of your tests. Might change in the future if TradingView will add the feature though :)
PS
I'm writing the Algorithm Builder documentation this weekend and the website should open in 3 weeks maximum. I think it's one of the most beautiful trading websites I've seen ever (I didn't do it, my friend did but who cares... it's mine :p)
PS2
I didn't post yesterday the script of the day so I'll post it tomorrow. What is due is due and I won't fail my challenge even ONCE !!!! ("But you just did yesterday bro...")
Have a great weekend
Dave
____________________________________________________________
Be sure to hit the thumbs up
- If you want to suggest some indicators that I can develop and share with the community, please use my personal TRELLO board
- I'm an officially approved PineEditor/LUA/MT4 approved mentor on codementor. You can request a coaching with me if you want and I'll teach you how to build kick-ass indicators and strategies
Jump on a 1 to 1 coaching with me
- You can also hire for a custom dev of your indicator/strategy/bot/chrome extension/python
Macddivergence
MACD Profit CandlesThis tool is simple yet very effective. It creates new candles on the chart based on the MACD.
Candles are green when MACD is increasing and red when it is decreasing. All lengths can be adjusted in the input menu and there is an option to plot the signal line.
The rules for using it are pretty simple:
1.Buy on Green
2.Sell on red
~Happy Trading~
MACD Price Divergence indicatorIndicator for divergence between MACD trend and price trends. Try it out and let me know what you think!
MACD Histogram/AreaIt´s just the histogram of the MACD. (Actually it´s not a histogram, I like the Area visualisation more. But you can switch.)
When I´m using the MACD, I´m just searching for a divergence between Price and the MACD-histogram. I´m not interested in the MACD-signalline or the MACD-line in any way. As you can see, The omission of them leads to better visualisation. It´s much easier to spot a divergence. On the one hand because that way the histogram scales bigger, on the other hand becauce the lines can´t overdraw the histogram.
Rules bullish Divergence: Price makes a lower low, oscillator makes higher low.
Rules bearish Divergence: Price makes a higher high, oscillator makes lower high.