█ OVERVIEW Here I present to the community at large a collection of code comment blocks that I think will be useful, especially for larger script projects bordering on 2,000 lines or above of code. █ PLANNED FUTURE UPDATES Work with the community to expand this template to be even more useful with the inclusion of useful global colour sets,...
Maximum Drawdown and Maximum Relative Drawdown% calculating functions. I needed a way to calculate the maxDD% of a serie of datas from an array (the different values of my balance account). I didn't find any builtin pinescript way to do it, so here it is. There are 2 algorithms to calculate maxDD and relative maxDD%, one non optimized needs n*(n - 1)/2...
Ever wish you didn't have to rapidly flip between 6 different intervals to get the full picture? Yeah, me too. Do you also wish that you kind of understood how the shift / unshift function works for arrays? Yeah, I did too. Both of those birds are taken care of with one stone! The Consolidated Interval Display uses the new Array structure and security to display...
What is EMA ? Ema is known as exponential moving average, it comes from the class of weighted moving average. It gives more weightage to the recent price changes, thus making it much more relevant to the current market analysis. Also it provides a dynamic way of calculating support and resistances in a trend following setup. The most common way to mint profit out...
Looking at the extended session is awesome and can certainly give you an edge on trading the open of a market. If you're more of a technical trader, though, you run into the problem of the extended session data throwing your indicators off. To fix that, use the code below as a template for whatever indicators you use.
Cup with Handle formation calculations using Pine. First of all, ignore all other lines in the example chart except the two FAT lines. The two fat lines are the ones that define the Cup With handle or in the example chart: a Reversed Cup With Handle. Note: Handle does not always develop and sometimes the final target price is reached without forming any...
First of all, ignore all other lines in the example chart except the four FAT lines. The four fat lines are the ones that define the fibonacci price leves. The lines have different extension offset to the right. The shortest one is the end of the second wave ( or leg B ), the next one is the end of C, the one following that is the end of D and the final one is the...
The Two Versions of this Indicator I learned from Two Famous and Highly Successful Traders. This Indicator shows With No Lag Clear Up and Down Trends in Market by Documenting Clearly If Bulls or Bears are in Control. The Version In SubChart 1 Shows Consecutive Closes if the Current Close is Greater than of Less than the Midpoint of the Previous Bar (Why Midpoint...