FX4Model° [fx4_living x toodegrees]Introducing the FX4 Model, an advanced automated trading framework designed to optimize your trading positions made by the trader fx4_living. This model integrates the previous day's high and low, and half of that range, to identify premium and discount zones.
The FX4 Model incorporates the ICT Asian range, spanning from 20:00 (New York time) to the midnight open. This period constitutes part of the day's accumulation range, during which a large volume of orders is processed. This implies that the high and low of this range are perceived as crucial liquidity pool zones.
The FX4 Model features a time-based dashboard. This dashboard presents key information such as the close of the previous candle. It also indicates the remaining time before certain significant candle closes (price and time).
With this tool, you gain a robust trading framework that empowers you to capitalize on profitable trading opportunities.
The FX4 accumulation range spans from the previous day's close to 2 AM New York local time. This range is part of the day's accumulation period, during which a lot of orders are triggered. Therefore, the high and the low of this range are seen as vital liquidity pool zones.
The ICT midnight open is marked with a vertical line at 00:00. This refers to the opening price of a financial instrument at midnight New York time. This opening price is significant as it serves as a reference point for trading strategies.
Time-To-Close Dashboard
This outstanding Dashboard displays the Time Frame and its "Time-To-Close".
It shows the Previous Candle Close (Bullish or Bearish).
The Time will appear in Red when there's 5 minutes left before the candle closes.
Previous Day Range (High-Low + 50%)
The previous day's high and low (PD) ranges can be leveraged in your trading strategy for the current day, using them as reference points for potential trading opportunities. The 50% division creates premium and discount zones within the previous day's range. If the price is in the discount zone, you should look for a buy opportunity, whereas if the price is in the premium zone, a sell opportunity should be considered.
FX4 Accumulation Range (High-Low + 50%)
The accumulation range's high and low points provide the most recent liquidity zone for the current day. These points can be used as reference points for potential trading opportunities. The 50% division here also creates premium and discount zones within the accumulation range. If the price is in the discount zone, a buy opportunity should be considered, and if the price is in the premium zone, a sell opportunity should be considered.
Other features:
Automatic Time Zone: As the title suggests, the automatic time zone feature means that you'll never need to adjust any GMT or hour settings. Everything updates automatically, even if you don't live on the East Coast of the United States.
Automatic Dark/Light Mode All graphics will automatically adapt their color based on your background. There's no need to tweak any settings; they're designed to provide consistent visuals.
Framework
Indicators Combination Framework v3 IND [DTU]Hello All,
This script is a framework to analyze and see the results by combine selected indicators for (long, short, longexit, shortexit) conditions.
I was designed this for beginners and users to facilitate to see effects of the technical indicators combinations on the chart WITH NO CODE
You can improve your strategies according the results of this system by connecting the framework to a strategy framework/template such as Pinecoder, Benson, daveatt or custom.
This is enhanced version of my previous indicator "Indicators & Conditions Test Framework "
Currently there are 93 indicators (23 newly added) connected over library. You can also import an External Indicator or add Custom indicator (In the source)
It is possible to change it from Indicator to strategy (simple one) by just remarking strategy parts in the source code and see real time profit of your combinations
Feel free to change or use it in your source
Special thanks goes to Pine wizards: Trading view (built-in Indicators), @Rodrigo, @midtownsk8rguy, @Lazybear, @Daveatt and others for their open source codes and contributions
SIMPLE USAGE
1. SETTING: Show Alerts= True (To see your entries and Exists)
2. Define your Indicators (ex: INDICATOR1: ema(close,14), INDICATOR2: ema(close,21), INDICATOR3: ema(close,200)
3. Define Your Combinations for long & Short Conditions
a. For Long: (INDICATOR1 crossover INDICATOR2) AND (INDICATOR3 < close)
b. For Short: (INDICATOR1 crossunder INDICATOR2) AND (INDICATOR3 > close)
4. Select Strategy/template (Import strategy to chart) that you export your signals from the list
5. Analyze the best profit by changing Indicators values
SOME INDICATORS DETAILS
Each Indicator includes:
- Factorization : Converting the selected indicator to Double, triple Quadruple such as EMA to DEMA, TEMA QEMA
- Log : Simple or log10 can be used for calculation on function entries
- Plot Type : You can overlay the indicator on the chart (such ema) or you can use stochastic/Percentrank approach to display in the variable hlines range
- Extended Parametes : You can use default parameters or you can use extended (P1,P2) parameters regarding to indicator type and your choice
- Color : You can define indicator color and line properties
- Smooth : you can enable swma smooth
- indicators : you can select one of the 93 function like ema(),rsi().. to define your indicator
- Source : you can select from already defined indicators (IND1-4), External Indicator (EXT), Custom Indicator (CUST), and other sources (close, open...)
CONDITION DETAILS
- There are are 4 type of conditions, long entry, short entry, long exit, short exit.
- Each condition are built up from 4 combinations that joined with "AND" & "OR" operators
- You can see the results by enabling show alerts check box
- If you only wants to enter long entry and long exit, just fill these conditions
- If "close on opposite" checkbox selected on settings, long entry will be closed on short entry and vice versa
COMBINATIONS DETAILS
- There are 4 combinations that joined with "AND" & "OR" operators for each condition
- combinations are built up from compare 1st entry with 2nd one by using operator
- 1st and 2nd entries includes already defined indicators (IND1-5), External Indicator (EXT), Custom Indicator (CUST), and other sources (close, open...)
- Operators are comparison values such as >,<, crossover,...
- 2nd entry include "VALUE" parameter that will use to compare 1st indicator with value area
- If 2nd indicator selected different than "VALUE", value are will mean previous value of the selection. (ex: value area= 2, 2nd entry=close, means close )
- Selecting "NONE" for the 1st entry will disable calculation of current and following combinations
JOINS DETAILS
- Each combination will join wiht the following one with the JOIN (AND, OR) operator (if the following one is not equal "NONE")
CUSTOM INDICATOR
- Custom Indicator defines harcoded in the source code.
- You can call it with "CUST" in the Indicator definition source or combination entries source
- You can change or implement your custom indicator by updating the source code
EXTERNAL INDICATOR
- You can import an external indicator by selecting it from the ext source.
- External Indicator should be already imported to the chart and it have an plot function to output its signal
EXPORTING SIGNAL
- You can export your result to an already defined strategy template such as Pine coders, Benson, Daveatt Strategy templates
- Or you can define your custom export for other future strategy templates
ALERTS
- By enabling show alerts checkbox, you can see long entry exits on the bottom, and short entry exits aon the top of the chart
ADDITIONAL INFO
- You can see all off the inputs descriptions in the tooltips. (You can also see the previous version for details)
- Availability to set start, end dates
- Minimize repainting by using security function options (Secure, Semi Secure, Repaint)
- Availability of use timeframes
-
Version 3 INDICATORS LIST (More to be added):
▼▼▼ OVERLAY INDICATORS ▼▼▼
alma(src,len,offset=0.85,sigma=6).-------Arnaud Legoux Moving Average
ama(src,len,fast=14,slow=100).-----------Adjusted Moving Average
accdist().-------------------------------Accumulation/distribution index.
cma(src,len).----------------------------Corrective Moving average
dema(src,len).---------------------------Double EMA (Same as EMA with 2 factor)
ema(src,len).----------------------------Exponential Moving Average
gmma(src,len).---------------------------Geometric Mean Moving Average
highest(src,len).------------------------Highest value for a given number of bars back.
hl2ma(src,len).--------------------------higest lowest moving average
hma(src,len).----------------------------Hull Moving Average.
lagAdapt(src,len,perclen=5,fperc=50).----Ehlers Adaptive Laguerre filter
lagAdaptV(src,len,perclen=5,fperc=50).---Ehlers Adaptive Laguerre filter variation
laguerre(src,len).-----------------------Ehlers Laguerre filter
lesrcp(src,len).-------------------------lowest exponential esrcpanding moving line
lexp(src,len).---------------------------lowest exponential expanding moving line
linreg(src,len,loffset=1).---------------Linear regression
lowest(src,len).-------------------------Lovest value for a given number of bars back.
mcginley(src, len.-----------------------McGinley Dynamic adjusts for market speed shifts, which sets it apart from other moving averages, in addition to providing clear moving average lines
percntl(src,len).------------------------percentile nearest rank. Calculates percentile using method of Nearest Rank.
percntli(src,len).-----------------------percentile linear interpolation. Calculates percentile using method of linear interpolation between the two nearest ranks.
previous(src,len).-----------------------Previous n (len) value of the source
pivothigh(src,BarsLeft=len,BarsRight=2).-Previous pivot high. src=src, BarsLeft=len, BarsRight=p1=2
pivotlow(src,BarsLeft=len,BarsRight=2).--Previous pivot low. src=src, BarsLeft=len, BarsRight=p1=2
rema(src,len).---------------------------Range EMA (REMA)
rma(src,len).----------------------------Moving average used in RSI. It is the exponentially weighted moving average with alpha = 1 / length.
sar(start=len, inc=0.02, max=0.02).------Parabolic SAR (parabolic stop and reverse) is a method to find potential reversals in the market price direction of traded goods.start=len, inc=p1, max=p2. ex: sar(0.02, 0.02, 0.02)
sma(src,len).----------------------------Smoothed Moving Average
smma(src,len).---------------------------Smoothed Moving Average
super2(src,len).-------------------------Ehlers super smoother, 2 pole
super3(src,len).-------------------------Ehlers super smoother, 3 pole
supertrend(src,len,period=3).------------Supertrend indicator
swma(src,len).---------------------------Sine-Weighted Moving Average
tema(src,len).---------------------------Triple EMA (Same as EMA with 3 factor)
tma(src,len).----------------------------Triangular Moving Average
vida(src,len).---------------------------Variable Index Dynamic Average
vwma(src,len).---------------------------Volume Weigted Moving Average
volstop(src,len,atrfactor=2).------------Volatility Stop is a technical indicator that is used by traders to help place effective stop-losses. atrfactor=p1
wma(src,len).----------------------------Weigted Moving Average
vwap(src_).------------------------------Volume Weighted Average Price (VWAP) is used to measure the average price weighted by volume
▼▼▼ NON OVERLAY INDICATORS ▼▼
adx(dilen=len, adxlen=14, adxtype=0).----adx. The Average Directional Index (ADX) is a used to determine the strength of a trend. len=>dilen, p1=adxlen (default=14), p2=adxtype 0:ADX, 1:+DI, 2:-DI (def:0)
angle(src,len).--------------------------angle of the series (Use its Input as another indicator output)
aroon(len,dir=0).------------------------aroon indicator. Aroons major function is to identify new trends as they happen.p1 = dir: 0=mid (default), 1=upper, 2=lower
atr(src,len).----------------------------average true range. RMA of true range.
awesome(fast=len=5,slow=34,type=0).------Awesome Oscilator is an indicator used to measure market momentum. defaults : fast=len= 5, p1=slow=34, p2=type: 0=Awesome, 1=difference
bbr(src,len,mult=1).---------------------bollinger %%
bbw(src,len,mult=2).---------------------Bollinger Bands Width. The Bollinger Band Width is the difference between the upper and the lower Bollinger Bands divided by the middle band.
cci(src,len).----------------------------commodity channel index
cctbbo(src,len).-------------------------CCT Bollinger Band Oscilator
change(src,len).-------------------------A.K.A. Momentum. Difference between current value and previous, source - source . is most commonly referred to as a rate and measures the acceleration of the price and/or volume of a security
cmf(len=20).-----------------------------Chaikin Money Flow Indicator used to measure Money Flow Volume over a set period of time. Default use is len=20
cmo(src,len).----------------------------Chande Momentum Oscillator. Calculates the difference between the sum of recent gains and the sum of recent losses and then divides the result by the sum of all price movement over the same period.
cog(src,len).----------------------------The cog (center of gravity) is an indicator based on statistics and the Fibonacci golden ratio.
copcurve(src,len).-----------------------Coppock Curve. was originally developed by Edwin Sedge Coppock (Barrons Magazine, October 1962).
correl(src,len).-------------------------Correlation coefficient. Describes the degree to which two series tend to deviate from their ta.sma values.
count(src,len).--------------------------green avg - red avg
cti(src,len).----------------------------Ehler s Correlation Trend Indicator by
dev(src,len).----------------------------ta.dev() Measure of difference between the series and its ta.sma
dpo(len).--------------------------------Detrended Price OScilator is used to remove trend from price.
efi(len).--------------------------------Elders Force Index (EFI) measures the power behind a price movement using price and volume.
eom(len=14,div=10000).-------------------Ease of Movement.It is designed to measure the relationship between price and volume.p1 = div: 10000= (default)
falling(src,len).------------------------ta.falling() Test if the `source` series is now falling for `length` bars long. (Use its Input as another indicator output)
fisher(len).-----------------------------Fisher Transform is a technical indicator that converts price to Gaussian normal distribution and signals when prices move significantly by referencing recent price data
histvol(len).----------------------------Historical volatility is a statistical measure used to analyze the general dispersion of security or market index returns for a specified period of time.
kcr(src,len,mult=2).---------------------Keltner Channels Range
kcw(src,len,mult=2).---------------------ta.kcw(). Keltner Channels Width. The Keltner Channels Width is the difference between the upper and the lower Keltner Channels divided by the middle channel.
klinger(type=len).-----------------------Klinger oscillator aims to identify money flow’s long-term trend. type=len: 0:Oscilator 1:signal
macd(src,len).---------------------------MACD (Moving Average Convergence/Divergence)
mfi(src,len).----------------------------Money Flow Index s a tool used for measuring buying and selling pressure
msi(len=10).-----------------------------Mass Index (def=10) is used to examine the differences between high and low stock prices over a specific period of time
nvi().-----------------------------------Negative Volume Index
obv().-----------------------------------On Balance Volume
pvi().-----------------------------------Positive Volume Index
pvt().-----------------------------------Price Volume Trend
ranges(src,upper=len, lower=-5).---------ranges of the source. src=src, upper=len, v1:lower=upper . returns: -1 source=upper otherwise 0
rising(src,len).-------------------------ta.rising() Test if the `source` series is now rising for `length` bars long. (Use its Input as another indicator output)
roc(src,len).----------------------------Rate of Change
rsi(src,len).----------------------------Relative strength Index
rvi(src,len).----------------------------The Relative Volatility Index (RVI) is calculated much like the RSI, although it uses high and low price standard deviation instead of the RSI’s method of absolute change in price.
smi_osc(src,len,fast=5, slow=34).--------smi Oscillator
smi_sig(src,len,fast=5, slow=34).--------smi Signal
stc(src,len,fast=23,slow=50).------------Schaff Trend Cycle (STC) detects up and down trends long before the MACD. Code imported from
stdev(src,len).--------------------------Standart deviation
trix(src,len) .--------------------------the rate of change of a triple exponentially smoothed moving average.
tsi(src,len).----------------------------The True Strength Index indicator is a momentum oscillator designed to detect, confirm or visualize the strength of a trend.
ultimateOsc(len.-------------------------Ultimate Oscillator indicator (UO) indicator is a technical analysis tool used to measure momentum across three varying timeframes
variance(src,len).-----------------------ta.variance(). Variance is the expectation of the squared deviation of a series from its mean (ta.sma), and it informally measures how far a set of numbers are spread out from their mean.
willprc(src,len).------------------------Williams %R
wad().-----------------------------------Williams Accumulation/Distribution.
wvad().----------------------------------Williams Variable Accumulation/Distribution.
HISTORY
v3.01
ADD: 23 new indicators added to indicators list from the library. Current Total number of Indicators are 93. (to be continued to adding)
ADD: 2 more Parameters (P1,P2) for indicator calculation added. Par:(Use Defaults) uses only indicator(Source, Length) with library's default parameters. Par:(Use Extra Parameters P1,P2) use indicator(Source,Length,p1,p2) with additional parameters if indicator needs.
ADD: log calculation (simple, log10) option added on indicator function entries
ADD: New Output Signals added for compatibility on exporting condition signals to different Strategy templates.
ADD: Alerts Added according to conditions results
UPD: Indicator source inputs now display with indicators descriptions
UPD: Most off the source code rearranged and some functions moved to the new library. Now system work like a little bit frontend/backend
UPD: Performance improvement made on factorization and other source code
UPD: Input GUI rearranged
UPD: Tooltips corrected
REM: Extended indicators removed
UPD: IND1-IND4 added to indicator data source. Now it is possible to create new indicators with the previously defined indicators value. ex: IND1=ema(close,14) and IND2=rsi(IND1,20) means IND2=rsi(ema(close,14),20)
UPD: Custom Indicator (CUST) added to indicator data source and Combination Indicator source.
UPD: Volume added to indicator data source and Combination Indicator source.
REM: Custom indicators removed and only one custom indicator left
REM: Plot Type "Org. Range (-1,1)" removed
UPD: angle, rising, falling type operators moved to indicator library
[UTILS] Unit Testing FrameworkTL;DR
This script doesn't provide any buy/sell signals.
This script won't make you profitable implicitly.
This script is intended for utility function testing, library testing, custom assertions.
It is free and open-source.
Introduction
About the idea: is not exclusive, programmers tend to use this method a lot and for a long time.
The point is to ensure that parts of a software, "units" (i.e modules, functions, procedures, class methods etc), work as they should, meet they design and behave as intended. That's why we use the term "Unit testing".
In PineScript we don't have a lot of entities mentioned above yet. What we have are functions. For example, a function that sums numbers should return a number, a particular sum. Or a professor wrote a function that calculates something or whatever. He and you want to be sure that the function works as expected and further code changes (refactoring) won't break its behaviour. What the professor needs to do is to write unit tests for his function/library of functions. And what you need to do is to check if the professor wrote tests or not.
No tests = No code
- Total test-driven development
Ok, it is not so serious, but very important in software development. And I created a tool for that.
I tried to follow the APIs of testing tools/libs/frameworks I worked or work with: Jasmine (Javascript), Mocha/Chai (Javascript), Jest (Javascript), RSpec (Ruby), unittest (Python), pytest (Python) and others. Got something workable but it would be much easier to implement (and it would look much better) if PineScript had a higher-order functions feature.
API
_describe(suiteName: string)
A function to declare a test suite. Each suite with tests may have 2 statuses:
✔️ Passed
❌ Failed
A suite is considered to be failed if at least one of the specs in it has failed.
_it(specName: string, actual: any, expected: any)
A function to run a test. Each test may have 3 statuses:
✔️ Passed
❌ Failed
⛔ Skipped
Some examples:
_it("is a falsey value", 1 != 2, true)
_it("is not a number", na(something), true)
_it("should sum two integers", _sum(1, 2), 1)
_it("arrays are equal", _isEqual(array.from(1, 2), array.from(1, 2)), true)
Remember that both the 'actual' and 'expected' arguments must be of the same type.
And a group of _it() functions must be preceded by a _describe() declaration (see in the code).
_test(specName: string, actual: any, expected: any)
An alias for _it . Does the same thing.
_xit(specName: string, actual: any, expected: any)
A function to skip a particular test for a while. Doesn't make any comparisons, but the test will appear in the results as skipped.
This feature is unstable and may be removed in the future releases.
_xtest(specName: string, actual: any, expected: any)
An alias for _xit . Does the same thing.
_isEqual(id_1: array, id_2: array)
A function to compare two arrays for equality. Both arrays must be of the same type.
This function doesn't take into account the order of elements in each array. So arrays like (1, 2, 3) and (3, 2, 1) will be equal.
_isStrictEqual(id_1: array, id_2: array)
A function to compare two arrays for equality. Both arrays must be of the same type.
This function is a stricter version of _isEqual because it takes into account the order of elements in each array. So arrays like (1, 2, 3) and (3, 2, 1) won't be equal.
Usage
To use this script to test your library you need to do the following steps:
1) Copy all the code you see between line #5 and #282 (Unit Testing Framework Core)
2) Place the copied code at the very beginning of your script (but below study())
3) Start to write suites and tests where your code ends. That's it.
NOTE
The current version is 0.0.1 which means that a lot of things may be changed on the way to 1.0.0 - the first stable version.
Color Gradient Framework [PineCoders]█ OVERVIEW
This indicator shows how you can use the new color functions in Pine to generate color gradients. We provide functions that will help Pine coders generate gradients for multiple use cases using base colors for bull and bear states.
█ CONCEPTS
For coders interested in maximizing the use of color in their scripts, TradingView has added new color functions and new functionality to existing functions. For us coders, this translates in the ability to generate colors on the fly and use dynamic colors ("series color") in more places.
New functions allow us to:
• Generate colors dynamically from calculated RGBA components ("A" is the Alpha channel, known to Pine coders as the "transparency"). See color.rgb() .
• Extract RGBA components from existing colors. See color.r() , color.g() , color.b() and color.t() .
• Generate linear gradients between two colors. See color.from_gradient() .
Improvements to existing color/plotting functions allow more flexible use of color:
• plotcandle() now accepts a "series color" argument for its `wickcolor` and `bordercolor` parameters.
• plotarrow() now accepts a "series color" argument for its `colorup` and `colordown` parameters.
Gradients are not only useful to make script visuals prettier; they can be used to pack more information in your displays. Our gradient #4 goes overboard with the concept by using a different gradient for the source line, its fill, and the background.
█ OUR SCRIPT
The script presents four functions to generate gradients:
f_c_gradientRelative(_source, _min, _max, _c_bear, _c_bull)
f_c_gradientRelativePro(_source, _min, _max, _c_bearWeak, _c_bearStrong, _c_bullWeak, _c_bullStrong)
f_c_gradientAdvDec(_source, _center, _c_bear, _c_bull)
f_c_gradientAdvDecPro(_source, _center, _steps, _c_bearWeak, _c_bearStrong, _c_bullWeak, _c_bullStrong)
The relative gradient functions are useful to generate gradients on a source that oscillates between known upper/lower limits. They use the relative position of the source between the `_min` and `_max` levels to generate the color. A centerline is derived from the `_min` and `_max` levels. The source's position above/below that centerline determines if the bull/bear color is used, and the relative position of the source between the centerline and the max/min level determines the gradient of the bull/bear color.
The advance/decline gradient functions are useful to generate gradients on a source for which min/max levels are unknown. These functions use source advances and declines to determine a gradient level. The `f_c_gradientAdvDec()` version uses the historical maximum of advances/declines to determine how many correspond to the strongest bull/bear colors, making its gradients adaptive. The `f_c_gradientAdvDecPro()` version requires the explicit number of advances/declines that correspond to the strongest bull/bear colors. This is useful when coloring chart bars, for example, where too many gradient levels are difficult to distinguish. Using the Pro version of the function allows you to limit the number of gradient levels to 5, for example, so that transitions are fewer, but more obvious. The `_center` parameter of the advance/decline functions allows them to determine which of the bull/bear colors to use.
Note that the custom `f_colorNew(_color, _transp)` function we use in our script should soon no longer be necessary, as changes are under way to allow color.new() to accept series arguments.
Inputs
The script's inputs demonstrate one way you can allow users to choose base bull/bear colors. Because users can modify any of the colors, only two are technically needed: one for bull, one for bear, as we do for the configuration of the bull/bear colors for the background in the gradient #4 configuration. Providing a few presets from which users can choose can be useful for color-challenged script users, but that type of inputs has the disadvantage of not rendering optimally in all OS/Browser environments.
You can use the inputs to select one of eight gradient demonstrations to display.
█ THANKS
Thanks to the PineCoders team for validating the code and description of this publication.
Thanks also to the many TradingView devs from multiple teams who made these improvements to Pine colors possible.
Look first. Then leap.
String Manipulation Framework [PineCoders FAQ]█ OVERVIEW
This script provides string manipulation functions to help Pine coders.
█ FUNCTIONS PROVIDED
f_strLeft(_str, _n)
Function returning the leftmost `_n` characters in `_str`.
f_strRight(_str, _n)
Function returning the rightmost `_n` characters in `_str`.
f_strMid(_str, _from, _to)
Function returning the substring of `_str` from character position `_from` to `_to` inclusively.
f_strLeftOf(_str, _of)
Function returning the sub-string of `_str` to the left of the `_of` separating character.
f_strRightOf(_str, _of)
Function returning the sub-string of `_str` to the right of the `_of` separating character.
f_strCharPos(_str, _chr)
Function returning the position of the first occurrence of `_chr` in `_str`, where the first character position is 0. Returns -1 if the character is not found.
f_strReplace(_src, _pos, _str)
Function that replaces a character at position `_pos` in the `_src` string with the `_str` character or string.
f_tickFormat()
Function returning a format string usable with `tostring()` to round a value to the symbol's tick precision.
f_tostringPad(_val, _fmt)
Function returning a string representation of a numeric `_val` using a special `_fmt` string allowing all strings to be of the same width, to help align columns of values.
`f_tostringPad()`
Using the functions should be straightforward, but `f_tostringPad()` requires more explanations. Its purpose is to help coders produce columns of fixed-width string representations of numbers which can be used to produce columns of numbers that vertically align neatly in labels, something that comes in handy when, for example, you need to center columns, yet still produce numbers of various lengths that nonetheless align.
While the formatting string used with this function resembles the one used in tostring() , it has a few additional characteristics:
• The question mark (" ? ") is used to indicate that padding is needed.
• If negative numbers must be handled by the function, the first character of the formatting string must be a minus sign ("-"),
otherwise the unary minus sign of negative numbers will be stripped out.
• You will produce more predictable results by using "0" rather than "#" in the formatting string.
You can experiment with `f_tostringPad()` formatting strings by changing the one used in the script's inputs and see the results on the chart.
These are some valid examples of formatting strings that can be used with `f_tostringPad()`:
"???0": forces strings to be four units wide, in all-positive "int" format.
"-???0": forces strings to be four units wide, plus room for a unary minus sign in the first position, in "int" format.
"???0.0": forces strings to be four units wide to the left of the point, all-positive, with a decimal point and then a mantissa rounded to a single digit.
"-???0.0?": same as above, but adds a unary minus sign for negative values, and adds a space after the single-digit mantissa.
"?????????0.0": forces the left part of the float to occupy the space of 10 digits, with a decimal point and then a mantissa rounded to a single digit.
█ CHART
The information displayed by this indicator uses the values in the script's Inputs, so you can use them to play around.
The chart shows the following information:
• Column 0 : The numeric input values in a centered column, converted to strings using tostring() without a formatting argument.
• Column 1 : Shows the values formatted using `f_tostringPad()` with the formatting string from the inputs.
• Column 2 : Shows the values formatted using `f_tostringPad()` but with only the part of the formatting string left of the decimal point, if it contains one.
• Column 3 : Shows the values formatted using `f_tostringPad()` but with the part of the formatting string left of the decimal point,
to which is added the right part of the `f_tostringPad()` formatting string, to obtain the precision in ticks of the symbol the chart is on.
• Column 4 : Shows the result of using the other string manipulation functions in the script on the source string supplied in the inputs.
It also demonstrates how to split up a label in two distinct parts so that you can vertically align columns when the leftmost part contains strings with varying lengths.
You will see in our code how we construct this column in two steps.
█ LIMITATIONS
The Pine runtime is optimized for number crunching. Too many string manipulations will take a toll on the performance of your scripts, as can readily be seen with the running time of this script. To minimize the impact of using string manipulation functions in your scripts, consider limiting their calculation to the first or last bar of the dataset when possible. This can be achieved by using the var keyword when declaring variables containing the result of your string manipulations, or by enclosing blocks of code in if blocks using barstate.isfirst or barstate.islast .
█ NOTES
To understand the challenges we face when trying to align strings vertically, it is useful to know that:
• As is the case in many other places in the TadingView UI and other docs, the Pine runtime uses the MS Trebuchet font to display label text.
• Trebuchet uses proportionally-spaced letters (a "W" takes more horizontal space than an "I"), but fixed-space digits (a "1" takes the same horizontal space as a "3").
Digits all use a figure space width, and it is this property that allows us to align numbers vertically.
The fact that letters are proportionally spaced is the reason why we can't vertically align columns using a "legend" + ":" `+ value structure when the "legend" part varies in width.
• The unary minus sign is the width of a punctuation space . We use this property to pad the beginning of numbers
when you use a "-" as the first character of the `f_tostringPad()` formatting string.
Our script was written using the PineCoders Coding Conventions for Pine .
The description was formatted using the techniques explained in the How We Write and Format Script Descriptions PineCoders publication.
█ THANKS
Thanks to LonesomeTheBlue for the `f_strReplace()` function.
Look first. Then leap.
[fareid] Quick Backtest Framework█ OVERVIEW
This Framework allows Pine Coders to quickly code Study() based signal/strategy and validate its viability before proceed to code with more advance/complex customized rules for entry, exit, trailstop, risk management etc..
This is somewhat an upgraded version of my earlier personal template with different strategy used, cleaner code
and additional features.
█ USE CASES
- You have an idea for trade signal and need a quick way to verify its potential before writing lengthy/complicated code
- You found a study script for trading signal in public library and want to validate it profitability with minimum effort before including it in your trading playbook
█ FEATURES
- Alert: Ready to use alert function based on signals from your custom indicator.
- Visual Backtest: Auto-plot entry, stop-loss and take profit for simple strategy performance analysis
- Backtest Statistic: Provide basic key metrics based on backtest strategy
- BTE External Signal Protocol: Ready to use code that will supply required state to PineCoders Backtesting & Trading Engine if you wish to have more advance and sophisticated backtesting engine
Notes: All of the above features have On/Off toggle
█ Description & How To Use
This Framework consist of 5 Modules but you only need to edit the first 2 Modules:
Module1: Indicator
Module2: Framework Input Protocol
Module3: Alert
Module4: Backtest
Module5: Backtest & Trading Engine
Tips: The source-code includes collapsible block by module for easy navigating
Module1: Indicator:
-----------------------------------------------------------------------------------
Main Module. Place custom indicator input parameter/calculation/indicator plotting here
Sample Strategy: Double MACD Crossover
MACD Signal: 1st MACD Cross above signal line indicate Buy Signal
1st MACD Cross below signal line indicate Sell Signal
MACD Filter: 2nd MACD is above 0 line indicate Uptrend
2nd MACD is below 0 line indicate Downtrend
Module2: Framework Input Protocol:
-----------------------------------------------------------------------------------
Use this module to connect main indicator/signal calculated in Module1 to the rest of the framework's module
4 variables needed to be defined here:
1. Uptrend
2. Dntrend
3. BuySignal
4. SellSignal
i'm not sure how to place a code snippet here to show you example so in the source code i already put a comment in Module2 on which part u need to edit. I hope its pretty simple to use.
Module3: Alert Module Description:
-----------------------------------------------------------------------------------
As long as the variables in Module2 properly defined, the alert module is ready to use without any further modification.
Input:
Enable Alert --> Enable TV's alert and plot signal to chart
Alert Type --> Set to take Buy only, Sell only or Both alert
Module4: Backtest Module Description:
-----------------------------------------------------------------------------------
As long as the variables in Module2 properly defined, the backtest module is ready to use without any further modification.
Input:
Backtest Stat --> Enable Backtest Statistic Label
Backtest Visual --> Enable Backtest visual simulation
Backtest Type --> Set to take Buy only or Sell only or both
SL Type -->
ATR : Set SL in ATR times Multiplier below entry price
Fixed : Set SL in fixed point below entry point (in 'Dollar'). e.g. for Stocks -> 0.5 equals to 50cent while for EURUSD currency -> 0.005 equal to 50 pips
HiLo Bar: Set SL at highest/lowest wick of previous bar plus/minus Fixed point. e.g. EURUSD HiLo=3 and Fixed Point = 0.0005, buy trade will place SL 5 Pips below lowest of previous 3 bar
SL ATR Multi --> Set Lookback Period used for SL's ATR calculation
SL ATR Multi --> Set ATR Multiplier for SL
SL Fixed --> Set Fixed Level for SL
SL Bar --> Set Number of previous bar to check for SL placement
TP RR Ratio --> Set TP based on RR multiplier. e.g. 2 means TP level will be twice further from entry point compared to Entry-SL distance.
Notes: The point is for preliminary testing, so it only supports 1 trade at a time and no Trailing Stop
Module5: Backtest & Trading Engine Description:
-----------------------------------------------------------------------------------
As long as the variables in Module2 properly defined, the Pinecoders BTE module is ready to use without any further modification.
Input:
External Signal Protocol --> Set ESP State to send to "Backtesting & Trading Engine "
Signal With Filter --> Use this to send entry signal that already filtered by this study indicator (without stoploss level)
Signal Without Filter --> Use this to send raw entry signal that are NOT YET FILTERED by this study indicator (without stoploss level)
Signal and Stop With Filter --> Use this to send entry signal WITH StopLoss that already filtered by this study indicator (with stoploss level)
Signal and Stop Without Filter --> Use this to send raw entry signal WITH StopLoss that are NOT YET FILTERED by this study indicator (with stoploss level)
Notes: Backtesting & Trading Engine already have built-in Filter, Entries and Stop Level. e.g. Unselect all their filter state if only want to use custom filter and make sure send Signal with Filter (with or without SL level)
█ DISCLAIMER:
This framework main objective is to create my personal indicator template so that i just have to modify the indicator module for preliminary testing in future.
The sample strategy included are for educational purpose only. Use at your own risk
credit: LucF/PineCoders for a lot of his scripts that i use as a guide to complete this
Time Offset Calculation Framework - PineCoders FAQ█ OVERVIEW
Calculating time-based offsets is necessary when coders need to draw lines or labels into the future because using `xloc = xloc.bar_time` in `label.new()` or `line.new()` is then mandatory.
This script provides a function to help with those calculations:
f_timeFrom(_from, _qty, _units)
The function calculates a negative (into the past) or positive (into the future) offset from the current bar's starting or closing time, or from the current time of day.
The offset can be expressed in units of chart resolution, or in seconds, minutes, hours, days, months or years.
█ HOW TO USE THE FRAMEWORK
1. You will need to include the supplied `f_resInMinutes()` function in your script in order to use `f_timeFrom()`.
It is used to calculate offsets using chart units when `f_timeFrom(_, _, "chart")` is used.
2. Whether you use `f_timeFrom()` for labels or lines, remember to use `xloc = xloc.bar_time`, as the default is `xloc = xloc.bar_index`.
3. Use `f_timeFrom()` for the `x` argument in `label.new()`, or for `x1` or `x2` in `line.new()`.
It can of course also be used in the relevant `label.set_*()` or `line.set_*()` functions.
Examples
// Label 3 days into the future from current bar's time.
label.new(f_timeFrom("bar", 3, "days"), high, "time + 3 days", xloc.bar_time)
// Label 2 hours into the future from current time
label.new(f_timeFrom("now", 2, "hours"), high, "timenow + 3 hours", xloc.bar_time)
// Label at bar's time plus 4 units of the chart's resolution.
label.new(f_timeFrom("bar", 4, "chart"), high, "time + 3 chart units", xloc.bar_time)
The parameters are:
f_timeFrom(_from, _qty, _units) =>
// _from : starting time from where the offset is calculated: "bar" to start from the bar's starting time, "close" to start from the bar's closing time, "now" to start from the current time.
// _qty : the +/- qty of _units of offset required. A "series float" can be used but it will be cast to a "series int".
// _units : string containing one of the seven allowed time units: "chart" (chart's resolution), "seconds", "minutes", "hours", "days", "months", "years".
█ LIMITATIONS
While this function makes it easier for coders to calculate time offsets using a variety of methods, it does not solve the inherent problematic that offsets do not calculate accurately when bars are missing between the start and end times of the offset. There is currently no way to circumvent this challenge in Pine.
Missing bars will occur on holidays, during no-trade periods (including normal periods where markets are closed) and when there are irregularities in data feeds. Charts at seconds resolutions, for example, will often miss bars when there are no trades to update the feed. On hourly charts of non 24x7 markets, periods when the markets are closed will also cause irregularities, as will holidays on day charts.
Other irregularities can occur because of how the offsets are calculated. A calculation of a one second offset from the bar's time will end one bar further on daily charts, for example. `f_timeFrom()` is no panacea; it simply makes offsets easier to calculate, however imprecise they are.
█ HOW TO USE THIS SCRIPT
The script's Inputs allow you to specify an offset, its units and starting time, and control the frequency of bars where lines are drawn.
Use the Inputs to play around with the parameters; you will quickly notice the irregularities mentioned above and be able to judge the usefulness of time-based offsets on the type of chart you use.
Look first. Then leap.
[NLX-L2] Fisher Stochastic Center of Gravity (v4)- Fisher Stochastic Center of Gravity-
This is Fisher's Stochastic Center of Gravity converted to pine v4 by blackcat. A very powerful entry indicator!
The original was published by DasanC & EmpiricalFX and it's a very interesting take on FSCG.
All the credit for the indicator goes to the authors and inventor of FSCG, this is just a mod to be used with my NLX Modular Trading Framework .
- How to Use -
1. Add a Trend Indicator like Trend Index MTF to your chart
2. Add " Fisher Stochastic Center of Gravity" Indicator to your Chart and select the Trend Index MTF with Type L1 in the Settings as Source
2. Add the Backtest to your Chart and select the FSCG Signal with Type L2 as Source
- Alerts for Automated Trading -
See my signature below for more information. Contact me for the Alert module.
[NLX-L3] Alerts- Introduction: Alert Module -
This alert module is part of my powerful and flexible modular trading framework.
It can be used with any indicator that has a signal plot output (1 = long / -1 = short)
This trading framework is the result of many years experience building indicators and trading strategies.
I couldn’t find a trading framework in Pine Script that would suit my needs and so I started to design my own from scratch. I’m trading with this framework myself so I’ve made sure that it’s flexible and absolutely reliable in a live-trading environment.
- Architecture -
What makes this framework so flexible is the modular architecture, different layers that all serve a very specific purpose.
You will notice that the module names include either L1 - L2 - L3:
- Layer 1 (L1) is the base layer and the foundation. L1 indicators are used to determine the trend, volume profile and filter noise. You would use L1 to see if it’s a good time to trade, what is the direction - or if it's better to trade at all in unfavourable conditions
- Layer 2 (L2) receives the result of L1 and if the market conditions are good the L2 indicator looks for an optimal entry point to go long or short. It is possible to combine several L2 indicators and trigger a long/short signal only if all L2 indicators agree.
- Layer 3 (L3) receives the final signal from L2 and it’s where we can now backtest the result of our trading strategy and trigger trade alerts with help of the alert module.
- Features -
External Input Source (any indicator with signal plot can be used)
Safe Entries Option: Enter a trade only if the position is profitable ad the momentum allows
Pyramid Entries
Partial Take-Profit: %-Step Interval and Quantity per Step
Stop Methods: Trailing Stop, TP/SL with ATR Option, several type of stop bands...
Profit/Loss Label with Fee, Slippage and Leverage Calculation
- Additional Modules -
L3 - Backtest Module
L2 - Noise Filter
L2 - QQE++
L1 - Trend Index
Trend Matrix (Coming soon)
Dynamic Range Breakout (Coming soon)
Breakouts & Pullbacks
- Request Access -
Contact me - see my signature below
[NLX-L1] Noise Filter- NLX Modular Trading Framework -
This Noise Filter is build upon a logic of Hurst Exponent and MA-ATR %-Distance to Price and does a great job at filtering choppy trades and noise.
The Hurst Exponent will analyze a time series and determine whether it is a geometric Brownian motion, mean reverting or trending and effective at filtering out whipsaws.
- Getting Started -
1. Add the Noise Filter to your Chart
2. Add one of my Indicator Modules to your Chart, such as the QQE++ Indicator
3. Select the Noise Filter in the Indicator Settings
2. Add the Backtest Module to your Chart
3. Select the QQE Indicator in the Backtest Settings
- Alerts for Automated Trading -
This module is coming soon and you will be able to create alerts for the QQE Signals as part of my framework.
See my signature below for more information.
[NLX-L2] QQE++- NLX Modular Trading Framework -
I've written this QQE Indicator from scratch and the functionality is self-explaining.
The Qualitative Quantitative Estimation (QQE) indicator is computed based on a combination of smoothed RSI and the average true range.
- Getting Started -
1. Add this QQE Indicator to your Chart
2. Add the Backtest module to your Chart
3. Select the QQE Indicator in the Backtest Settings
- Alerts for Automated Trading -
This module is coming soon and you will be able to create alerts for the QQE Signals as part of my framework.
See my signature below for more information.
- Note -
The high win-rate in the backtest is the result of taking partial take-profits in between trade entry and exit.
Don't be fooled, it's impossible to achieve 80% profitable trades but due to take-profit orders 80% of the trades at least secure some profit.
Alert Creation Framework - PineCoders FAQThis script provides a framework to add alerts to a script.
It uses a method and provides code that:
— Allows the indicator's users to select the plotting of markers representing the different conditions used to trigger alerts.
— Allows filtering of the markers on direction: both, longs only, shorts only.
— Uses a single alert for the indicator. It will trigger on any number of marker conditions selected by the user when the alert is configured. The user can thus create the combination that suits his needs.
— Includes the marker's number in the alert's message.
NOTES
— Alerts should usually be configured to trigger Once Per Bar Close to prevent false signals.
— See the Pine User Manual page on alerts .
— This code uses the Pine Script Coding Conventions .
Look first. Then leap.
MTF Selection Framework - PineCoders FAQOur MTF Selection Framework allows Pine coders to add multi-timeframe capabilities to their script with the following features:
► Timeframe selection
The higher timeframe can be selected using 3 different ways:
• By steps (60 min., 1D, 3D, 1W, 1M, 1Y).
• As a multiple of the current chart's resolution, which can be fractional, so 3.5 will work.
• Fixed.
► Non-repainting or Repainting mode can be selected.
► Smoothing of the HTF line
Can be turned on/off and a smoothing factor allows the user to select the degree of smoothing he requires.
The framework is used here to create a higher timeframe version of a simple RSI line, but it can be used to access HTF information for almost any signal.
Functions used
f_resInMinutes()
Converts the current timeframe.multiplier plus the TF into minutes of type float.
• In Pine, the timeframe.multiplier is an integer representing the resolution, but a value of 1 can mean one day or one minute. This function converts that information in a standard fractional float minutes format that can then be used by the other functions in the framework.
• If the chart's current resolution is 15 seconds, the function will return 0.25 . If the chart's resolution is one day, it will return 1440 .
f_tfResInMinutes(_resolution)
Returns resolution of _resolution period in minutes.
• This function does the same as f_resInMinutes() , but on the target resolution supplied as a parameter in the timeframe.period string format.
f_resNextStep(_res)
Given a current resolution in fractional float minutes, returns its corresponding stepped HTF in the timeframe.period string format.
• This allows the implementation of the step HTF selection mode.
f_multipleOfRes(_res, _mult)
Given a current resolution in fractional float minutes and a fractional multiplier, returns a multiple of the resolution as a string in "timeframe.period" format usable with "security()".
• A multiple like 3.5 is allowed.
• Note that with seconds resolutions, the result returned is constrained by the discrete seconds resolutions available on TV.
f_htfLabel(_txt, _y, _color)
Used to display a label showing either:
• A warning when the chart's resolution is not lower than the HTF.
• The HTF resolution currently used.
The y position used to position the label will require adaptation to the signal you are using. For use in "overlay = true" mode, a technique that works well is commented out in the code.
Look first. Then leap.
Assisted framework with the Algorithm Builder - INDEXHello traders
I. 💎 SCRIPTS ACCESS AND TRIALS 💎
1. For the trial request access, they have to be done through my website .
2. My website URL is in this script signature at the very bottom (you'll have to scroll down a bit and going past the long description) and in my profile status available here : Daveatt
Due to the new scripts publishing house rules, I won't mention the URL here directly. As I value my partnership with TradingView very much, I prefer showing you the way for finding them :)
3. Many video tutorials explaining clearly how all our indicators work are available on your website > guides section.
4. You may also contact me directly for more information
II. 🔎 Algorithm Builder INDEX 🔎
2.1 INDEX trading
Let's start with a quick definition.
Index Trading is a type of trading of a group of stocks that make up the index. An Index is a measurement of the value of a section of the stock market. It is computed from the prices of selected stocks. It may also be referred to as a group of stock market publicly-listed uppermost businesses within a region. There are numerous Stock Market Indices within the world such as Dow Jones/SPX500 (USA), DAX (Germany), S&P/ASX 200 (Australia), FTSE100 (London), CAC 40 (France), AEX index (Amsterdam), IBEX 35 and more.
2.2 🔗 Which brokers are compatible? 🔗
⚠️⚠️Please note we mostly tested those signals with FXCM broker.
You may use a different broker but you have to make sure your broker has a similar price quote with at most 2/3 pips difference with FXCM.
We chose a broker where the spreads are among the lowest across the board.
Disclaimer : we're not affiliated in any way with them.
2.3 Concept
This indicator is born because we identified 2 types of traders :
1) Those who want to play with the indicators and discover a sound system by themselves.
That's why we made the Algorithm Builders (Singles/Multiples) + Backtest suites
2) Those who want to be guided way more and get signals that actually are very coherent AND without too much configuration on their end.
We're very aware that this point is a big claim and to prove how confident we are with our Algorithm Builder (INDEX), we're sharing on TradingView the signals given by the tool at the end of each day.
Our new PREMIUM customers automatically get a 3 weeks trial to try out all of our indicators and see themselves how they perform.
We could show you all the track records/backtests in the world (which could easily be faked with very optimistic setups or photoshop) - instead, we'd like YOU to try our products yourselves during your Trial - as this would be the best proof you could ever get that our indicators could help your trading.
III. 🔅 The INDEX Framework 🔅
ALL signals are displayed because they have to be taken (unless invalidated or risk too big) because we cannot know before what signal will lead to big profits versus get invalidated.
Those signals were made such as :
- in case of a risk of losing capital, we would lose a small amount thanks to the invalidations/hard exits.
- give only signals where the Risk-to-reward is decent enough and the risk is not disproportioned compared to the potential reward.
- NOT a guarantee at all but we made those signals such as they'll reward the traders with about 30/50 pips gains per trade.
Assuming the Algo INDEX gives 5 trades a day and you applied it on 3 indexes and 1 trade per index is a loss (= likely invalidated with a small loss - a Stop Loss could always happen but we designed it to prevent those from happening), then we're not aware of any other trading method/system beating that on index trading. Period.
And we're actively monitoring what the competition is doing on a daily basis always to stay ahead.
I'll explain below which market condition is riskier and how to act (which is better than usually reacting in trading or in life in general).
IV. 📜 The 10 Commandments 📜
1️⃣ You shall read our guide on our website and look at the video tutorial .
URL available on this script signature (you'll have to scroll down a bit and going past the long description) and in my profile status.
I give way more details there and won't give too much info here because it will make this script description way too long.
2️⃣ You shall follow the method religiously and trade like a “MACHINE” .
All graphical elements displayed on the chart by our indicator is useful (= to be used) and has been thought of, tested and traded with for years.
We know that adopting someone else's method is a huge leap of faith but it's required sometimes to ask our clients to trust us.
3️⃣ You must always consider the supports and resistances.
We know it could be surprising to see so many S/R displayed by the indicator but you'll have to trust us on the following claim: They're all important and must be considered before entering a trade or not
4️⃣ You must Not change the recommended chart timeframe.
Even if the chart timeframe is 1 minute, the sub-indicators used are very smoothed and based on indicators in 15/30/1h timeframes.
Entering in a 1 min chart allows to enter sooner and this combined with multi timeframes indicators allows to enter when a trend is confirmed.
5️⃣ You Must NOT trade anything else than indexes with this indicator.
As said before, we're working really hard on releasing a similar assisted trading framework for cryptocurrencies and other asset classes (FOREX, COMMODITIES, ...) and we aim to release the Algo Builder CRYPTO before the end of this year.
We started with the ALGO INDEX because it's our specialty, there is a ton of liquidity in that market and a lot of traders asked for it - we would say almost as close as the number of traders asking us for an ALGO CRYPTO framework.
6️⃣ You shall know the Leading Trend displayed on your chart
- Signal in the same direction of the leading trend: i.e. green signal on a green chart background and red signal on a red chart background.
- Signal given regardless of the leading trend direction.
In other words, green/red signal may be displayed on either background color (green/red)
In that scenario, we recommend waiting for a pullback near the EMA(20) and set your SL to breakeven quickly.
⚠️ To be clear; ALL signals should be taken but those against the trend could require a pullback as explained above.
7️⃣ You shall know your trading profile
Trend confirmation when entering against the leading trend: You'll also notice that the leading trend is real and strong.
Let's assume a trader enters in a LONG position/RED background and then the chart background turns GREEN at some point later on.
You'll often see that this "event" will confirm even more the trend direction and that's when the trend could very likely accelerate.
8️⃣ You will embrace the Hard Exits philosophy.
The framework won't work as well as expected without them.
It's even the most important "commandment" and it requires to be rigorous and throw away to the bin whatever we might think and feel.
Not exiting a signal when invalidated because you feel differently will not work.
9️⃣ You must know the Risk and Money Management basis.
Each market is unique and cannot possibly be traded the same way.
We're happy to provide a few guidelines for the INDEX market just below.
- Know your macro events with the daily economic calendar.
- Stay consistent with your position sizing
- Stay consistent with your trade management
🔟 You Shall Test and Make your Own Conclusions.
You have a FREE TRIAL period to test because we know that many traders aren't full-time traders and have a family/job/life outside trading.
So take your time to visually backtest the signals, trade with small positions, follow our rules and learn from your own experience.
While we keep saying "do this, do that", we're not dogmatic at all and we welcome any feedback you might have that could benefit the community and we'll likely integrate it if we see a good value in your idea.
You can submit an idea/feedback/comment by contacting me directly.
V. 🧰 Features 🧰
5.1 Supports and Resistances
The indicator displays the main algorithmic supports and resistances according to our trading method for INDEX.
5.2 Choose your favorite risk management algorithm
1/ Pre-defined and recommended mode for this INDEX framework - Algo S/R method using:
- the nearest algorithmic resistances for the take profit levels.
2/ Define your own Stop-loss and Take-profits level in real-time
Stop-Loss Management
For what's following, let's assume that 2 is the stop-loss value you inserted in the indicator, and the Algorithm Builder gives a BUY signal.
This is NOT a recommendation at all, only an example to explain how this feature works.
- %Trailing: The Stop-Loss starts 2% away from the entry price - and will move up (because we're on a BUY trade as per our example) every time your trade will gain 2% profit
- Percentage: The Stop-Loss stays static 2% away from the entry price. There is no trailing here
- TP Trailing: This is a very awesome feature. The stop-loss is set 2% away when the trades start.
When the TP1 is hit, the stop-loss will be moved to the Entry price (also called breakeven).
When the TP2 is hit, the SL is moved to the previous TP1 position
- Fixed: Set the Stop-Loss at a fixed position (value should be in currency/units)
Take Profits Management
You can manage up to 2 take profit levels defined as a percentage or price value.
The expected input is in percentage value (for instance, setting the % target of TP1 to 2% will set the TP1 level 2% away from the entry price
5.3 Built-in Trade Manager
This is very likely the most loved utility script that we shared on TradingView.
It's included in your Algorithm Builder - Single Trend+, and will certainly help you immensely to analyze your charts and your trades.
We made sure that all the graphical elements on the chart will be updated in real-time whenever our user change anything on the indicator configuration.
You'll also be able to change the Trade Manager labels positions as you wish :)
5.4 Built-in Risk-to-Reward Panel
The good stuff doesn't stop here.
You'll notice that this sometimes green (when in a LONG), sometimes red (when in a SHORT) panel at the right of your chart.
It displays for the selected trading algorithmic (see 2.3.2 above), a ton of useful real-time analytics.
- Entry Price: the price when the Algorithm Builder will give a signal.
- The Trade PnL in percentage.
- Entry Stop Loss: Distance (in currency/units) between the selected stop-loss algorithm (percent, trailing, TP trailing, etc.) and the entry price.
- Entry TP1: Distance (in currency/units) between the entry price and the first take profit
- Entry TP2: Distance (in currency/units) between the entry price and the second take profit
- Risk/Reward TP1: Using the Stop-loss distance at entry, and Take Profit 1 at entry to compute the risk-to-reward ratio.
- Risk/Reward TP2: Using the Stop-loss distance at entry, and Take Profit 2 at entry to compute the risk-to-reward ratio.
For more details, please check the guides section of my website. Links are in my signature and profile status.
5.5 Built-in PnL real-time calculations
YES!!!! you read it correctly
The panel displays the risk-to-reward ratios but also the PnL (Profit and Loss in percentage value) of the current and last trade
VI. 🔔 Alerts 🔔
We enabled the alerts on the:
1. Main BUY/SELL entries
3. Exit Signals such as stop-loss, take-profit, hard-exits
VII. 🤖 Compatible with trading bots? 🤖
I'm very aware of all existing solutions out there allowing us to capture the TradingView alerts (Instabot, ProfitView, ...) and forwarding them to the brokers to automatize your trading.
You'll find a more detailed answer on our website.
If you have any doubt or question, please hit me up directly or ask in the comments section of this script.
I'll never claim I have the best trading methodology or the best indicators.
You only will judge and I'll appreciate all the questions and feedback you're sending my way.
They help me a ton to develop indicators based on all the requests I received.
Kind regards,
Dave
Algorithm Builder - Multiple Trends+ (+ Trade Manager and Panel)Hello traders
I. SCRIPTS ACCESS AND TRIALS
1. For the trial request access, they have to be done through my website .
2. My website URL is in this script signature at the very bottom (you'll have to scroll down a bit and going past the long description) and in my profile status available here : Daveatt
Due to the new scripts publishing house rules, I won't mention the URL here directly. As I value my partnership with TradingView very much, I prefer showing you the way for finding them :)
3. You may also contact me directly for more information
II. Algorithm Builder - Multiple Trends
2.1 Forewords
The Multiple Trends+ is the update of the Multiple Trends and includes a built-in Trade Manager and PnL/Risk-Reward Panel
This indicator is available only to our PREMIUM users. Our PREMIUM indicators offer more trading analysis capabilities and opportunities.
A few words of caution: the Algorithm Builders - Multiple Trends are more advanced and as such, would require slightly more time to be mastered.
They're not that much difficult, but we understand that designing a trading system with 2 trends might be slightly more complicated - however, there is nothing to be scared of :).
The time spent to learn how to use our PREMIUM tools might be rewarded handsomely.
2.2 Concept
The Algorithm Builder - Multiple Trends is made to detect the convergence of many unrelated indicators and give a BUY or SELL signal whenever all the selected sub-indicators are converging in the same direction.
This is an upgrade of the PRO package giving access to the Algorithm Builder - Single Trend - designed to show 1 unique entry per trend - whereas the Multiple Trends offers re-entries in the same direction of the trend if the indicator detects good convergences to accumulate more positions.
III. Multiple Trends versus Single Trend
3.1 Multiple Trends benefits
A friend asked us recently Why using the Multiple Trends if we can use the Single Trend in a smaller timeframe, and get more entries that way?
We thought this was an excellent question, but the answer is obvious.
Using a Single Trend on a smaller timeframe to solely getting more entries will reduce the security of the given trades.
We designed the Algorithm Builders to take a trade in an identified trend but reducing the timeframe too much will mostly increase your risk - and might lead to capital loss.
By the way, this is a universal rule valid also for a big majority of indicators.
We're absolutely not saying that the Single Trend won't work on small timeframes because actually it really does. But, if you find out a great configuration for your Single Trend, and want to get more signals without increasing your risk - then the Multiple Trends would be a very viable option.
3.2 Main signal versus secondary signals
For the main and secondary trends, the color green symbolizes any identified "BUY" trend. And the color red symbolizes any identified "SELL" trend.
-The MAIN trend symbol is unique and symbolized by a triangle.
- The SECONDARY (could also be called re-entries) trends are multiple and symbolized by a diamond.
In the Algorithm Builder indicator settings, they're identified with the Additional keyword.
3.3 How the convergences are calculated
Extremely important: The diamonds (or re-entries) are displayed, as long as a triangle (or main/primary signal) is displayed.
For a trend change (buy to sell or sell to buy), the system waits for ALL selected re-entries sub-indicators , to give a convergence/confluence in the opposite direction.
For example, let's assume a BUY/green convergence based on 3 indicators. One or Two of them going turning red, won't be enough for a trend change.
But, if all of them turn red, then we'll see a red triangle - signaling the beginning of a new downtrend.
3.4 Why multiple entries?
Here are a few use cases :
1. The main use case why we made those Multiple Trends indicators: A trader got invalidated or stopped out on a trade, but wants a system to let hin/her jump back in with a minimum of security. (security depending on the configuration of the Algorithm Builder as a whole).
This is very frustrating to get in a trade, being stopped out, and finally, see the trade going in the expected direction.
Even more frustrating to jump back in at the end of a trend, and get stopped out again - we all agree on this.
2. You want to add more positions on your main trade as your Algo Builder identified a solid trend - this is a nice way to possibly maximize your gains.
Once again, we don't/won't guarantee any performance result (not because we don't believe in our tools, but for legal reason), all depends on the time spent reading our documentation and playing with the Algo Builder - as explained on our Tutorials.
More info available on our website. URL available in this script signature and on my profile status.
IV. Why the Algorithm Builder Multiple Trends+ may help you
I worked with many traders during my career, and their feedback about trading is often pretty similar.
They all tried a lot of complicated indicators, losing their capital, and finally getting back to the basics (even to the basic indicators if I might say)
The art is finding a good combination of indicators and setting strict money/risk management rules.
Easy in concept, but more than 90+% of traders lose money on the markets... which teach us that trading is not only about drawing trendlines, or using cool indicators but finding ways to ease our psychology while trading.
4.1 The Algorithm Builder trading framework
The sub-indicators (full list on our website) weren't chosen randomly. They're based on a trading method we've developed over the last 6 years - while working with traders and other trading quants.
The Algo Builders are made to detect a convergence - and as such, will give a signal once a trend has been identified.
They're not made to detect reversal but have been designed to give a signal when all sub-indicators are either ALL bullish (green) or ALL bearish (red).
We provide a framework based on indicators we selected because they:
1. make sense to be used altogether
2. work on asset classes like INDEX, CRYPTO, STOCK OPTIONS, FOREX, COMMODITIES
3. it may expand your knowledge about what detecting a convergence with pre-selected indicator really means
4.2 Supports and Resistances
The indicator displays the main algorithmic supports and resistances according to our trading method.
I think they're relevant for all asset classes, but you're absolutely free to use any different supports/resistances logic if you want to.
I'm not against it because I know that pivots, Fibonacci levels, etc. may work very well also.
4.3 Choose your favorite risk management algorithm
1/ Pre-defined Algo S/R method using:
- a supertrend of the stop-loss
- the nearest algorithmic resistances for the take profit levels.
2/ Define your own Stop-loss and Take-profits level in real-time
Stop-Loss Management
For what's following, let's assume that 2 is the stop-loss value you inserted in the indicator, and the Algorithm Builder gives a BUY signal.
This is NOT a recommendation at all, only an example to explain how this feature works.
- %Trailing: The Stop-Loss starts 2% away from the entry price - and will move up (because we're on a BUY trade as per our example) every time your trade will gain 2% profit
- Percentage: The Stop-Loss stays static 2% away from the entry price. There is no trailing here
- TP Trailing: This is a very awesome feature. The stop-loss is set 2% away when the trades start.
When the TP1 is hit, the stop-loss will be moved to the Entry price (also called breakeven).
When the TP2 is hit, the SL is moved to the previous TP1 position
- Fixed: Set the Stop-Loss at a fixed position (value should be in currency/units)
Take Profits Management
You can manage up to 2 take profit levels defined as a percentage or price value.
The expected input is in percentage value (for instance, setting the % target of TP1 to 2% will set the TP1 level 2% away from the entry price
4.4 Built-in Trade Manager
This is very likely the most loved utility script that we shared on TradingView.
It's included in your Algorithm Builder - Single Trend+, and will certainly help you immensely to analyze your charts and your trades.
We made sure that all the graphical elements on the chart will be updated in real-time whenever our user change anything on the indicator configuration.
You'll also be able to change the Trade Manager labels positions as you wish :)
4.5 Built-in Risk-to-Reward Panel
The good stuff doesn't stop here.
You'll notice that this sometimes green (when in a LONG), sometimes red (when in a SHORT) panel at the right of your chart.
It displays for the selected trading algorithmic (see 2.3.2 above), a ton of useful real-time analytics.
- Entry Price: the price when the Algorithm Builder will give a signal.
- The Trade PnL in percentage.
- Entry Stop Loss: Distance (in currency/units) between the selected stop-loss algorithm (percent, trailing, TP trailing, etc.) and the entry price.
- Entry TP1: Distance (in currency/units) between the entry price and the first take profit
- Entry TP2: Distance (in currency/units) between the entry price and the second take profit
- Risk/Reward TP1: Using the Stop-loss distance at entry, and Take Profit 1 at entry to compute the risk-to-reward ratio.
- Risk/Reward TP2: Using the Stop-loss distance at entry, and Take Profit 2 at entry to compute the risk-to-reward ratio.
For more details, please check the guides section of my website. Links are in my signature and profile status.
4.6 Built-in PnL real-time calculations
YES!!!! you read it correctly
The panel displays the risk-to-reward ratios but also the PnL (Profit and Loss in percentage value) of the current and last trade
4.7 Hard Exits
Our trading method is known for the hard exits, also called invalidation.
The Single Trend+ includes a hard exit based on a MACD - settings are flexible and you may update them.
Having a stop-loss protecting your trade is a best practice - Protecting your stop-loss also from getting hit is incredible.
We prefer invalidate a few positions, even if sometimes we don't want to. Rather than the market hard exiting on us, and leaving with our hard-working money.
4.8 Alerts
Alerts are enabled for:
- BUY/SELL MAIN triangles signals
- BUY/SELL SECONDARY diamond signals
- Trade Manager alerts (Stop Loss, Take Profit 1, Take Profit 2)
- Hard Exits
V. Pain points that we're trying to solve with our Algorithm Builders
Issue #1 There are many informations / indicators / strategies / backtests / noise. Finding the right ones is not a simple task.
Solution #1 A reliable system that removes the external noise is much needed in trading to stay "in the game".
Issue #2 Trading could be quite stressful - The majority doesn't lose in trading because technical analysis is hard, but because managing our psychology is one of the hardest things a human can do.
Solution #2 Some ways to reduce the "trading stress" could be: getting better quality signals and trading like a "machine". Forgetting about Twitter and trusting the system you designed.
Issue #3 Trading without strict rules and only based on what we feel, or what we think the market should do is the fastest way to kiss our money goodbye.
Only 1 indicator generally is not enough. Traders generally use a combination of several indicators but they're monitoring them individually.
It's normal then to feel exhausted at the end of the day ^^ (to say the least)... and exhaustion leads to mistakes which leads to..... (I'm sure you got it) ... capital loss.
Solution #3 As a trader, I needed a trading framework and a method. I offer our trading method but they're plenty others out there. We cannot claim obviously it's the best ever ....but let's say we're using those exact same
scripts ourselves for our trading. And this what we've been recommending our clients to trade with for the past years. Also, having a tool detecting the convergence of several indicators and giving 1 unique signal
for BUY/SELL position will save you a lot of time/energy, and perhaps might help you out getting better trading performance.
VI. Resolving a complex puzzle and having fun in the process
Trading has to stay a passion and not (only be) a source of intense stress.
The most successful traders I know are "trading geeks" - literally always looking for optimizing, searching for the best possible entries, setups, indicators, tools, etc.
For them, it's not even about the money anymore, but only about beating their previous performance.
Why are they doing this? Because it's fun
Might appears as a bold statement, but I guarantee that looking for setups is fun.
One of our users even told us, that it's like playing with "Legos" and we couldn't possibly agree more.
VII. Designing a system that "makes sense"
Another bold statement now. Brace yourselves ladies and gentlemen
The Algorithm Builders allow to design trading systems quickly. What could takes days/weeks/months to find out... might be now within your reach in less than a few hours.
With a bit of practice, less than an hour might be enough per asset/timeframe to find a system that makes sense to you and adapted to your trading capital and psychology.
Assuming our users read our guides and are fully committed to learning a new way of trading - then we do guarantee you'll be able to design kick-ass trading systems that make sense.
"Making sense" doesn't mean at all it's guaranteed to win, it means you're the one defining the convergence of indicators, using your Algorithm Builder, and observe that most of the time - whenever there is a BUY signal, the candlesticks are going upwards - whenever there is a SELL signal, it's going downwards.
This is a necessary step to make real progress from a trading analyst perspective - and hopefully could lead to profits.
VII. Algorithm Builder versus the main trader enemy(=psychology)
This indicator has the goal to help solving one of the MAIN issues encountered by traders.
Most of traders realize, they can't perform with only 1 indicator (or 1 price pattern or 1 price action) and need a combination of multiple indicators before getting in a trade.
Far from being a magic pill, if it could at least reduce the stress you have while trading, then we'll consider we made a great job - it's a technical "useless noise remover", and needs to be followed strictly.
Such trust in a trading system can only be built by testing your Algorithm Builder configuration on either:
1. a demo account
2. or a live account with small bids. And then, increasing progressively the bids if your capital increases progressively.
Though, you should still use your common sense. (for instance: if we get a BUY signal right on a big timeframe resistance we're hitting for the first time).
I'm aware this is a new way of trading but for many, and while we cannot foresee the future, neither predict performance, we believe it might save you a lot of time to find good signals.
My maximum level of happiness will be reached the day when our users will contact me and showing me setups being mine.
I'm sure that even I can learn from my users and, we can all learn from each other Algorithm Builder configuration
VIII. What is a wrong or bad configuration?
Simply put. If you see that most of your signals react such as described below:
1. a buy triangle/diamond predicts, most of the time an upwards move
2. a sell triangle/diamond predicts, most of the time a downwards move
3. you estimated yourself the stop-loss needed to give enough room for your trades.
4. take profits based on algorithmic support and resistances or your own take profit method.
So what's a good Algorithm Builder configuration? A configuration you're happy with and makes sense.
A better Algorithm Builder setup is one used in demo or a live account w/ small bids for a few weeks, and you're consistent in your trading performance.
If you have any doubt or question, please hit me up directly or ask in the comments section of this script.
I'll never claim I have the best trading methodology or the best indicators. You only will be the judge, and I'll appreciate all the questions and feedback you're sending my way.
They help me a ton to develop indicators based on all the requests I received.
Kind regards,
Dave
Algorithm Builder - Multiple TrendsHello traders
I. SCRIPTS ACCESS AND TRIALS
1. For the trial request access, they have to be done through my website .
2. My website URL is in this script signature at the very bottom (you'll have to scroll down a bit and going past the long description) and in my profile status available here : Daveatt
Due to the new scripts publishing house rules, I won't mention the URL here directly. As I value my partnership with TradingView very much, I prefer showing you the way for finding them :)
3. You may also contact me directly for more information
II. Algorithm Builder - Multiple Trends
2.1 Forewords
This indicator is available only to our PREMIUM users. Our PREMIUM indicators offer more trading analysis capabilities and opportunities.
A few words of caution: the Algorithm Builders - Multiple Trends are more advanced and as such, would require slightly more time to be mastered.
They're not that much difficult, but we understand that designing a trading system with 2 trends might be slightly more complicated - however, there is nothing to be scared of :).
The time spent to learn how to use our PREMIUM tools might be rewarded handsomely.
2.2 Concept
The Algorithm Builder - Multiple Trends is made to detect the convergence of many unrelated indicators and give a BUY or SELL signal whenever all the selected sub-indicators are converging in the same direction.
This is an upgrade of the PRO package giving access to the Algorithm Builder - Single Trend - designed to show 1 unique entry per trend - whereas the Multiple Trends offers re-entries in the same direction of the trend if the indicator detects good convergences to accumulate more positions.
III. Multiple Trends versus Single Trend
3.1 Multiple Trends benefits
A friend asked us recently Why using the Multiple Trends if we can use the Single Trend in a smaller timeframe, and get more entries that way?
We thought this was an excellent question, but the answer is obvious.
Using a Single Trend on a smaller timeframe to solely getting more entries will reduce the security of the given trades.
We designed the Algorithm Builders to take a trade in an identified trend but reducing the timeframe too much will mostly increase your risk - and might lead to capital loss.
By the way, this is a universal rule valid also for a big majority of indicators.
We're absolutely not saying that the Single Trend won't work on small timeframes because actually it really does. But, if you find out a great configuration for your Single Trend, and want to get more signals without increasing your risk - then the Multiple Trends would be a very viable option.
3.2 Main signal versus secondary signals
For the main and secondary trends, the color green symbolizes any identified "BUY" trend. And the color red symbolizes any identified "SELL" trend.
-The MAIN trend symbol is unique and symbolized by a triangle.
- The SECONDARY (could also be called re-entries) trends are multiple and symbolized by a diamond.
In the Algorithm Builder indicator settings, they're identified with the Additional keyword.
3.3 How the convergences are calculated
Extremely important: The diamonds (or re-entries) are displayed, as long as a triangle (or main/primary signal) is displayed.
For a trend change (buy to sell or sell to buy), the system waits for ALL selected re-entries sub-indicators , to give a convergence/confluence in the opposite direction.
For example, let's assume a BUY/green convergence based on 3 indicators. One or Two of them going turning red, won't be enough for a trend change.
But, if all of them turn red, then we'll see a red triangle - signaling the beginning of a new downtrend.
3.4 Why multiple entries?
Here are a few use cases :
1. The main use case why we made those Multiple Trends indicators: A trader got invalidated or stopped out on a trade, but wants a system to let hin/her jump back in with a minimum of security. (security depending on the configuration of the Algorithm Builder as a whole).
This is very frustrating to get in a trade, being stopped out, and finally, see the trade going in the expected direction.
Even more frustrating to jump back in at the end of a trend, and get stopped out again - we all agree on this.
2. You want to add more positions on your main trade as your Algo Builder identified a solid trend - this is a nice way to possibly maximize your gains.
Once again, we don't/won't guarantee any performance result (not because we don't believe in our tools, but for legal reason), all depends on the time spent reading our documentation and playing with the Algo Builder - as explained on our Tutorials.
More info available on our website. URL available in this script signature and on my profile status.
IV. Why the Algorithm Builder Multiple Trends may help you
I worked with many traders during my career, and their feedback about trading is often pretty similar.
They all tried a lot of complicated indicators, losing their capital, and finally getting back to the basics (even to the basic indicators if I might say)
The art is finding a good combination of indicators and setting strict money/risk management rules.
Easy in concept, but more than 90+% of traders lose money on the markets... which teach us that trading is not only about drawing trendlines, or using cool indicators but finding ways to ease our psychology while trading.
4.1 The Algorithm Builder trading framework
The sub-indicators (full list on our website) weren't chosen randomly. They're based on a trading method we've developed over the last 6 years - while working with traders and other trading quants.
The Algo Builders are made to detect a convergence - and as such, will give a signal once a trend has been identified.
They're not made to detect reversal but have been designed to give a signal when all sub-indicators are either ALL bullish (green) or ALL bearish (red).
We provide a framework based on indicators we selected because they:
1. make sense to be used altogether
2. work on asset classes like INDEX, CRYPTO, STOCK OPTIONS, FOREX, COMMODITIES
3. it may expand your knowledge about what detecting a convergence with pre-selected indicator really means
4.2 Supports and Resistances
The indicator displays the main algorithmic supports and resistances according to our trading method.
I think they're relevant for all asset classes, but you're absolutely free to use any different supports/resistances logic if you want to.
I'm not against it because I know that pivots, Fibonacci levels, etc. may work very well also.
4.6 Hard Exits
Our trading method is known for the hard exits, also called invalidation.
The Single Trend+ includes a hard exit based on a MACD - settings are flexible and you may update them.
Having a stop-loss protecting your trade is a best practice - Protecting your stop-loss also from getting hit is incredible.
We prefer invalidate a few positions, even if sometimes we don't want to. Rather than the market hard exiting on us, and leaving with our hard-working money.
4.7 Alerts
Alerts are enabled for:
- BUY/SELL MAIN triangles signals
- BUY/SELL SECONDARY diamond signals
- Hard Exits
V. Pain points that we're trying to solve with our Algorithm Builders
Issue #1 There are many informations / indicators / strategies / backtests / noise. Finding the right ones is not a simple task.
Solution #1 A reliable system that removes the external noise is much needed in trading to stay "in the game".
Issue #2 Trading could be quite stressful - The majority doesn't lose in trading because technical analysis is hard, but because managing our psychology is one of the hardest things a human can do.
Solution #2 Some ways to reduce the "trading stress" could be: getting better quality signals and trading like a "machine". Forgetting about Twitter and trusting the system you designed.
Issue #3 Trading without strict rules and only based on what we feel, or what we think the market should do is the fastest way to kiss our money goodbye.
Only 1 indicator generally is not enough. Traders generally use a combination of several indicators but they're monitoring them individually.
It's normal then to feel exhausted at the end of the day ^^ (to say the least)... and exhaustion leads to mistakes which leads to..... (I'm sure you got it) ... capital loss.
Solution #3 As a trader, I needed a trading framework and a method. I offer our trading method but they're plenty others out there. We cannot claim obviously it's the best ever ....but let's say we're using those exact same
scripts ourselves for our trading. And this what we've been recommending our clients to trade with for the past years. Also, having a tool detecting the convergence of several indicators and giving 1 unique signal
for BUY/SELL position will save you a lot of time/energy, and perhaps might help you out getting better trading performance.
VI. Resolving a complex puzzle and having fun in the process
Trading has to stay a passion and not (only be) a source of intense stress.
The most successful traders I know are "trading geeks" - literally always looking for optimizing, searching for the best possible entries, setups, indicators, tools, etc.
For them, it's not even about the money anymore, but only about beating their previous performance.
Why are they doing this? Because it's fun
Might appears as a bold statement, but I guarantee that looking for setups is fun.
One of our users even told us, that it's like playing with "Legos" and we couldn't possibly agree more.
VII. Designing a system that "makes sense"
Another bold statement now. Brace yourselves ladies and gentlemen
The Algorithm Builders allow to design trading systems quickly. What could takes days/weeks/months to find out... might be now within your reach in less than a few hours.
With a bit of practice, less than an hour might be enough per asset/timeframe to find a system that makes sense to you and adapted to your trading capital and psychology.
Assuming our users read our guides and are fully committed to learning a new way of trading - then we do guarantee you'll be able to design kick-ass trading systems that make sense.
"Making sense" doesn't mean at all it's guaranteed to win, it means you're the one defining the convergence of indicators, using your Algorithm Builder, and observe that most of the time - whenever there is a BUY signal, the candlesticks are going upwards - whenever there is a SELL signal, it's going downwards.
This is a necessary step to make real progress from a trading analyst perspective - and hopefully could lead to profits.
VII. Algorithm Builder versus the main trader enemy(=psychology)
This indicator has the goal to help solving one of the MAIN issues encountered by traders.
Most of traders realize, they can't perform with only 1 indicator (or 1 price pattern or 1 price action) and need a combination of multiple indicators before getting in a trade.
Far from being a magic pill, if it could at least reduce the stress you have while trading, then we'll consider we made a great job - it's a technical "useless noise remover", and needs to be followed strictly.
Such trust in a trading system can only be built by testing your Algorithm Builder configuration on either:
1. a demo account
2. or a live account with small bids. And then, increasing progressively the bids if your capital increases progressively.
Though, you should still use your common sense. (for instance: if we get a BUY signal right on a big timeframe resistance we're hitting for the first time).
I'm aware this is a new way of trading but for many, and while we cannot foresee the future, neither predict performance, we believe it might save you a lot of time to find good signals.
My maximum level of happiness will be reached the day when our users will contact me and showing me setups being mine.
I'm sure that even I can learn from my users and, we can all learn from each other Algorithm Builder configuration
VIII. What is a wrong or bad configuration?
Simply put. If you see that most of your signals react such as described below:
1. a buy triangle predicts, most of the time an upwards move
2. a sell triangle predicts, most of the time a downwards move
3. you estimated yourself the stop-loss needed to give enough room for your trades.
4. take profits based on algorithmic support and resistances or your own take profit method.
So what's a good Algorithm Builder configuration? A configuration you're happy with and makes sense.
A better Algorithm Builder setup is one used in demo or a live account w/ small bids for a few weeks, and you're consistent in your trading performance.
If you have any doubt or question, please hit me up directly or ask in the comments section of this script.
I'll never claim I have the best trading methodology or the best indicators. You only will be the judge, and I'll appreciate all the questions and feedback you're sending my way.
They help me a ton to develop indicators based on all the requests I received.
Kind regards,
Dave
Algorithm Builder - Single Trend+ (MTF)Hello traders
I. SCRIPTS ACCESS AND TRIALS
1. For the trial request access, they have to be done through my website .
2. My website URL is in this script signature at the very bottom (you'll have to scroll down a bit and going past the long description) and in my profile status available here : Daveatt
Due to the new scripts publishing house rules, I won't mention the URL here directly. As I value my partnership with TradingView very much, I prefer showing you the way for finding them :)
3. You may also contact me directly for more information
II. Algorithm Builder - Single Trend+ (MTF)
2.1 Concept
MTF means Multi Timeframes - we all agree that saying MTF is nicer and easier than multi-timeframe.
That script is an upgrade of the Single Trend:
The Algorithm Builder - Single Trend+ (Multiple Timeframes/MTF) is made to detect the convergence of many unrelated indicators, and give a BUY or SELL signal whenever all the selected sub-indicators - each may be using a different timeframe - are converging in the same direction.
Now sit tight because what's going to be announced will be awesome. Are you ready for it?... :)
The MTF version allows to detect the convergence for indicators in different timeframes. Each indicator has its own timeframe - expanding, even more, your trading analysis capabilities.
In other words, you could, for instance, detects the convergence of an H1 MACD with an H2 Supertrend, and why not also adding an m30 Moving Averages cross in the mix.
The Single Trend+ MTF gives one single entry per identified trend - unlike the Multiple Trends editions (also available on my scripts page) which may give more than 1 entry per trend.
The traders select the sub-indicators they want, and see in real-time the BUY and SELL triangles being updated.
2.2 Why the Algorithm Builder Single Trend may help you
I worked with many traders during my career, and their feedback about trading is often pretty similar.
They all tried a lot of complicated indicators, losing their capital, and finally getting back to the basics (even to the basic indicators if I might say)
The art is finding a good combination of indicators and setting strict money/risk management rules.
Easy in concept, but more than 90+% of traders lose money on the markets... which teach us that trading is not only about drawing trendlines, or using cool indicators but finding ways to ease our psychology while trading.
2.3 The Algorithm Builder trading framework
The sub-indicators (full list on our website) weren't chosen randomly. They're based on a trading method we've developed over the last 6 years - while working with traders and other trading quants.
The Algo Builders are made to detect a convergence - and as such, will give a signal once a trend has been identified.
They're not made to detect reversal but have been designed to give a signal when all sub-indicators are either ALL bullish (green) or ALL bearish (red).
We provide a framework based on indicators we selected because they:
1. make sense to be used altogether
2. work on asset classes like INDEX, CRYPTO, STOCK OPTIONS, FOREX, COMMODITIES
3. it may expand your knowledge about what detecting a convergence with pre-selected indicator really means
2.3.1 Supports and Resistances
The indicator displays the main algorithmic supports and resistances according to our trading method.
I think they're relevant for all asset classes, but you're absolutely free to use any different supports/resistances logic if you want to.
I'm not against it because I know that pivots, Fibonacci levels, etc. may work very well also.
2.3.2 Choose your favorite risk management algorithm
1/ Pre-defined Algo S/R method using:
- a supertrend of the stop-loss
- the nearest algorithmic resistances for the take profit levels.
2/ Define your own Stop-loss and Take-profits level in real-time
Stop-Loss Management
For what's following, let's assume that 2 is the stop-loss value you inserted in the indicator, and the Algorithm Builder gives a BUY signal.
This is NOT a recommendation at all, only an example to explain how this feature works.
- %Trailing: The Stop-Loss starts 2% away from the entry price - and will move up (because we're on a BUY trade as per our example) every time your trade will gain 2% profit
- Percentage: The Stop-Loss stays static 2% away from the entry price. There is no trailing here
- TP Trailing: This is a very awesome feature. The stop-loss is set 2% away when the trades start.
When the TP1 is hit, the stop-loss will be moved to the Entry price (also called breakeven).
When the TP2 is hit, the SL is moved to the previous TP1 position
- Fixed: Set the Stop-Loss at a fixed position (value should be in currency/units)
Take Profits Management
You can manage up to 2 take profit levels defined as a percentage or price value.
The expected input is in percentage value (for instance, setting the % target of TP1 to 2% will set the TP1 level 2% away from the entry price
2.3.3 Built-in Trade Manager
This is very likely the most loved utility script that we shared on TradingView.
It's included in your Algorithm Builder - Single Trend+, and will certainly help you immensely to analyze your charts and your trades.
We made sure that all the graphical elements on the chart will be updated in real-time whenever our user change anything on the indicator configuration.
You'll also be able to change the Trade Manager labels positions as you wish :)
2.3.4 Built-in Risk-to-Reward Panel
The good stuff doesn't stop here.
You'll notice that this sometimes green (when in a LONG), sometimes red (when in a SHORT) panel at the right of your chart.
It displays for the selected trading algorithmic (see 2.3.2 above), a ton of useful real-time analytics.
- Entry Price: the price when the Algorithm Builder will give a signal.
- The Trade PnL in percentage.
- Entry Stop Loss: Distance (in currency/units) between the selected stop-loss algorithm (percent, trailing, TP trailing, etc.) and the entry price.
- Entry TP1: Distance (in currency/units) between the entry price and the first take profit
- Entry TP2: Distance (in currency/units) between the entry price and the second take profit
- Risk/Reward TP1: Using the Stop-loss distance at entry, and Take Profit 1 at entry to compute the risk-to-reward ratio.
- Risk/Reward TP2: Using the Stop-loss distance at entry, and Take Profit 2 at entry to compute the risk-to-reward ratio.
For more details, please check the guides section of my website. Links are in my signature and profile status.
2.3.5 Hard Exits
Our trading method is known for the hard exits, also called invalidation.
The Single Trend+ includes a hard exit based on a MACD - settings are flexible and you may update them.
Having a stop-loss protecting your trade is a best practice - Protecting your stop-loss also from getting hit is incredible.
We prefer invalidate a few positions, even if sometimes we don't want to. Rather than the market hard exiting on us, and leaving with our hard-working money.
2.3.6 Alerts
Alerts are enabled for:
- BUY/SELL triangles signals
- Trade Manager (SL, TP1, TP2)
- Hard Exits
III. Pain points that we're trying to solve with our Algorithm Builders
Issue #1 There are many informations / indicators / strategies / backtests / noise. Finding the right ones is not a simple task.
Solution #1 A reliable system that removes the external noise is much needed in trading to stay "in the game".
Issue #2 Trading could be quite stressful - The majority doesn't lose in trading because technical analysis is hard, but because managing our psychology is one of the hardest things a human can do.
Solution #2 Some ways to reduce the "trading stress" could be: getting better quality signals and trading like a "machine". Forgetting about Twitter and trusting the system you designed.
Issue #3 Trading without strict rules and only based on what we feel, or what we think the market should do is the fastest way to kiss our money goodbye.
Only 1 indicator generally is not enough. Traders generally use a combination of several indicators but they're monitoring them individually.
It's normal then to feel exhausted at the end of the day ^^ (to say the least)... and exhaustion leads to mistakes which leads to..... (I'm sure you got it) ... capital loss.
Solution #3 As a trader, I needed a trading framework and a method. I offer our trading method but they're plenty others out there. We cannot claim obviously it's the best ever ....but let's say we're using those exact same
scripts ourselves for our trading. And this what we've been recommending our clients to trade with for the past years. Also, having a tool detecting the convergence of several indicators and giving 1 unique signal
for BUY/SELL position will save you a lot of time/energy, and perhaps might help you out getting better trading performance.
III. Resolving a complex puzzle and having fun in the process
Trading has to stay a passion and not (only be) a source of intense stress.
The most successful traders I know are "trading geeks" - literally always looking for optimizing, searching for the best possible entries, setups, indicators, tools, etc.
For them, it's not even about the money anymore, but only about beating their previous performance.
Why are they doing this? Because it's fun
Might appears as a bold statement, but I guarantee that looking for setups is fun.
One of our users even told us, that it's like playing with "Legos" and we couldn't possibly agree more.
IV. Designing a system that "makes sense"
Another bold statement now. Brace yourselves ladies and gentlemen
The Algorithm Builders allow to design trading systems quickly. What could takes days/weeks/months to find out... might be now within your reach in less than a few hours.
With a bit of practice, less than an hour might be enough per asset/timeframe to find a system that makes sense to you and adapted to your trading capital and psychology.
Assuming our users read our guides and are fully committed to learning a new way of trading - then we do guarantee you'll be able to design kick-ass trading systems that make sense.
"Making sense" doesn't mean at all it's guaranteed to win, it means you're the one defining the convergence of indicators, using your Algorithm Builder, and observe that most of the time - whenever there is a BUY signal, the candlesticks are going upwards - whenever there is a SELL signal, it's going downwards.
This is a necessary step to make real progress from a trading analyst perspective - and hopefully could lead to profits.
V. Algorithm Builder versus the main trader enemy(=psychology)
This indicator has the goal to help solving one of the MAIN issues encountered by traders.
Most of traders realize, they can't perform with only 1 indicator (or 1 price pattern or 1 price action) and need a combination of multiple indicators before getting in a trade.
Far from being a magic pill, if it could at least reduce the stress you have while trading, then we'll consider we made a great job - it's a technical "useless noise remover", and needs to be followed strictly.
Such trust in a trading system can only be built by testing your Algorithm Builder configuration on either:
1. a demo account
2. or a live account with small bids. And then, increasing progressively the bids if your capital increases progressively.
Though, you should still use your common sense. (for instance: if we get a BUY signal right on a big timeframe resistance we're hitting for the first time).
I'm aware this is a new way of trading but for many, and while we cannot foresee the future, neither predict performance, we believe it might save you a lot of time to find good signals.
My maximum level of happiness will be reached the day when our users will contact me and showing me setups being mine.
I'm sure that even I can learn from my users and, we can all learn from each other Algorithm Builder configuration
VI. What is a wrong or bad configuration?
Simply put. If you see that most of your signals react such as described below:
1. a buy triangle predicts, most of the time an upwards move
2. a sell triangle predicts, most of the time a downwards move
3. you estimated yourself the stop-loss needed to give enough room for your trades.
4. take profits based on algorithmic support and resistances or your own take profit method.
So what's a good Algorithm Builder configuration? A configuration you're happy with and makes sense.
A better Algorithm Builder setup is one used in demo or a live account w/ small bids for a few weeks, and you're consistent in your trading performance.
If you have any doubt or question, please hit me up directly or ask in the comments section of this script.
I'll never claim I have the best trading methodology or the best indicators. You only will be the judge, and I'll appreciate all the questions and feedback you're sending my way.
They help me a ton to develop indicators based on all the requests I received.
Kind regards,
Dave
Algorithm Builder - Single Trend+Hello traders
I. SCRIPTS ACCESS AND TRIALS
1. For the trial request access, they have to be done through my website .
2. My website URL is in this script signature at the very bottom (you'll have to scroll down a bit and going past the long description) and in my profile status available here : Daveatt
Due to the new scripts publishing house rules, I won't mention the URL here directly. As I value my partnership with TradingView very much, I prefer showing you the way for finding them :)
3. You may also contact me directly for more information
II. Algorithm Builder - Single Trend+
2.1 Concept
That script is an upgrade of the Single Trend:
The Algorithm Builder - Single Trend+ was made to detect the convergence (also called confluence) of many unrelated indicators, giving a BUY or SELL signal whenever all the selected sub-indicators are converging in the same direction.
The Single Trend gives one single entry per identified trend - unlike the Multiple Trends editions (also available on my scripts page) which may give more than 1 entry per trend.
The traders select the sub-indicators they want, and see in real-time the BUY and SELL triangles being updated.
2.2 Why the Algorithm Builder Single Trend may help you
I worked with many traders during my career, and their feedback about trading is often pretty similar.
They all tried a lot of complicated indicators, losing their capital, and finally getting back to the basics (even to the basic indicators if I might say)
The art is finding a good combination of indicators and setting strict money/risk management rules.
Easy in concept, but more than 90+% of traders lose money on the markets... which teach us that trading is not only about drawing trendlines, or using cool indicators but finding ways to ease our psychology while trading.
2.3 The Algorithm Builder trading framework
The sub-indicators (full list on our website) weren't chosen randomly. They're based on a trading method we've developed over the last 6 years - while working with traders and other trading quants.
The Algo Builders are made to detect a convergence - and as such, will give a signal once a trend has been identified.
They're not made to detect reversal but have been designed to give a signal when all sub-indicators are either ALL bullish (green) or ALL bearish (red).
We provide a framework based on indicators we selected because they:
1. make sense to be used altogether
2. work on asset classes like INDEX, CRYPTO, STOCK OPTIONS, FOREX, COMMODITIES
3. it may expand your knowledge about what detecting a convergence with pre-selected indicator really means
2.3.1 Supports and Resistances
The indicator displays the main algorithmic supports and resistances according to our trading method.
I think they're relevant for all asset classes, but you're absolutely free to use any different supports/resistances logic if you want to.
I'm not against it because I know that pivots, Fibonacci levels, etc. may work very well also.
2.3.2 Choose your favorite risk management algorithm
1/ Pre-defined Algo S/R method using:
- a supertrend of the stop-loss
- the nearest algorithmic resistances for the take profit levels.
2/ Define your own Stop-loss and Take-profits level in real-time
Stop-Loss Management
For what's following, let's assume that 2 is the stop-loss value you inserted in the indicator, and the Algorithm Builder gives a BUY signal.
This is NOT a recommendation at all, only an example to explain how this feature works.
- %Trailing: The Stop-Loss starts 2% away from the entry price - and will move up (because we're on a BUY trade as per our example) every time your trade will gain 2% profit
- Percentage: The Stop-Loss stays static 2% away from the entry price. There is no trailing here
- TP Trailing: This is a very awesome feature. The stop-loss is set 2% away when the trades start.
When the TP1 is hit, the stop-loss will be moved to the Entry price (also called breakeven).
When the TP2 is hit, the SL is moved to the previous TP1 position
- Fixed: Set the Stop-Loss at a fixed position (value should be in currency/units)
Take Profits Management
You can manage up to 2 take profit levels defined as a percentage or price value.
The expected input is in percentage value (for instance, setting the % target of TP1 to 2% will set the TP1 level 2% away from the entry price
2.3.3 Built-in Trade Manager
This is very likely the most loved utility script that we shared on TradingView.
It's included in your Algorithm Builder - Single Trend+, and will certainly help you immensely to analyze your charts and your trades.
We made sure that all the graphical elements on the chart will be updated in real-time whenever our user change anything on the indicator configuration.
You'll also be able to change the Trade Manager labels positions as you wish :)
2.3.5 Built-in Risk-to-Reward Panel
The good stuff doesn't stop here.
You'll notice that this sometimes green (when in a LONG), sometimes red (when in a SHORT) panel at the right of your chart.
It displays for the selected trading algorithmic (see 2.3.2 above), a ton of useful real-time analytics.
- Entry Price: the price when the Algorithm Builder will give a signal.
- The Trade PnL in percentage.
- Entry Stop Loss: Distance (in currency/units) between the selected stop-loss algorithm (percent, trailing, TP trailing, etc.) and the entry price.
- Entry TP1: Distance (in currency/units) between the entry price and the first take profit
- Entry TP2: Distance (in currency/units) between the entry price and the second take profit
- Risk/Reward TP1: Using the Stop-loss distance at entry, and Take Profit 1 at entry to compute the risk-to-reward ratio.
- Risk/Reward TP2: Using the Stop-loss distance at entry, and Take Profit 2 at entry to compute the risk-to-reward ratio.
For more details, please check the guides section of my website. Links are in my signature and profile status.
2.3.6 Hard Exits
Our trading method is known for the hard exits, also called invalidation.
The Single Trend+ includes a hard exit based on a MACD - settings are flexible and you may update them.
Having a stop-loss protecting your trade is a best practice - Protecting your stop-loss also from getting hit is incredible.
We prefer invalidate a few positions, even if sometimes we don't want to. Rather than the market hard exiting on us, and leaving with our hard-working money.
2.3.7 Alerts
Alerts are enabled for:
- BUY/SELL triangles signals
- Trade Manager (SL, TP1, TP2)
- Hard Exits
III. Pain points that we're trying to solve with our Algorithm Builders
Issue #1 There are many informations / indicators / strategies / backtests / noise. Finding the right ones is not a simple task.
Solution #1 A reliable system that removes the external noise is much needed in trading to stay "in the game".
Issue #2 Trading could be quite stressful - The majority doesn't lose in trading because technical analysis is hard, but because managing our psychology is one of the hardest things a human can do.
Solution #2 Some ways to reduce the "trading stress" could be: getting better quality signals and trading like a "machine". Forgetting about Twitter and trusting the system you designed.
Issue #3 Trading without strict rules and only based on what we feel, or what we think the market should do is the fastest way to kiss our money goodbye.
Only 1 indicator generally is not enough. Traders generally use a combination of several indicators but they're monitoring them individually.
It's normal then to feel exhausted at the end of the day ^^ (to say the least)... and exhaustion leads to mistakes which leads to..... (I'm sure you got it) ... capital loss.
Solution #3 As a trader, I needed a trading framework and a method. I offer our trading method but they're plenty others out there. We cannot claim obviously it's the best ever ....but let's say we're using those exact same
scripts ourselves for our trading. And this what we've been recommending our clients to trade with for the past years. Also, having a tool detecting the convergence of several indicators and giving 1 unique signal
for BUY/SELL position will save you a lot of time/energy, and perhaps might help you out getting better trading performance.
IV. Resolving a complex puzzle and having fun in the process
Trading has to stay a passion and not (only be) a source of intense stress.
The most successful traders I know are "trading geeks" - literally always looking for optimizing, searching for the best possible entries, setups, indicators, tools, etc.
For them, it's not even about the money anymore, but only about beating their previous performance.
Why are they doing this? Because it's fun
Might appears as a bold statement, but I guarantee that looking for setups is fun.
One of our users even told us, that it's like playing with "Legos" and we couldn't possibly agree more.
V. Designing a system that "makes sense"
Another bold statement now. Brace yourselves ladies and gentlemen
The Algorithm Builders allow to design trading systems quickly. What could takes days/weeks/months to find out... might be now within your reach in less than a few hours.
With a bit of practice, less than an hour might be enough per asset/timeframe to find a system that makes sense to you and adapted to your trading capital and psychology.
Assuming our users read our guides and are fully committed to learning a new way of trading - then we do guarantee you'll be able to design kick-ass trading systems that make sense.
"Making sense" doesn't mean at all it's guaranteed to win, it means you're the one defining the convergence of indicators, using your Algorithm Builder, and observe that most of the time - whenever there is a BUY signal, the candlesticks are going upwards - whenever there is a SELL signal, it's going downwards.
This is a necessary step to make real progress from a trading analyst perspective - and hopefully could lead to profits.
VI. Algorithm Builder versus the main trader enemy(=psychology)
This indicator has the goal to help solving one of the MAIN issues encountered by traders.
Most of traders realize, they can't perform with only 1 indicator (or 1 price pattern or 1 price action) and need a combination of multiple indicators before getting in a trade.
Far from being a magic pill, if it could at least reduce the stress you have while trading, then we'll consider we made a great job - it's a technical "useless noise remover", and needs to be followed strictly.
Such trust in a trading system can only be built by testing your Algorithm Builder configuration on either:
1. a demo account
2. or a live account with small bids. And then, increasing progressively the bids if your capital increases progressively.
Though, you should still use your common sense. (for instance: if we get a BUY signal right on a big timeframe resistance we're hitting for the first time).
I'm aware this is a new way of trading but for many, and while we cannot foresee the future, neither predict performance, we believe it might save you a lot of time to find good signals.
My maximum level of happiness will be reached the day when our users will contact me and showing me setups being mine.
I'm sure that even I can learn from my users and, we can all learn from each other Algorithm Builder configuration
VII. What is a wrong or bad configuration?
Simply put. If you see that most of your signals react such as described below:
1. a buy triangle predicts, most of the time an upwards move
2. a sell triangle predicts, most of the time a downwards move
3. you estimated yourself the stop-loss needed to give enough room for your trades.
4. take profits based on algorithmic support and resistances or your own take profit method.
So what's a good Algorithm Builder configuration? A configuration you're happy with and makes sense.
A better Algorithm Builder setup is one used in demo or a live account w/ small bids for a few weeks, and you're consistent in your trading performance.
If you have any doubt or question, please hit me up directly or ask in the comments section of this script.
I'll never claim I have the best trading methodology or the best indicators. You only will be the judge, and I'll appreciate all the questions and feedback you're sending my way.
They help me a ton to develop indicators based on all the requests I received.
Kind regards,
Dave
Algorithm Builder - Single TrendHello traders
I. SCRIPTS ACCESS AND TRIALS
1. For the trial request access, they have to be done through my website .
2. My website URL is in this script signature at the very bottom (you'll have to scroll down a bit and going past the long description) and in my profile status available here : Daveatt
Due to the new scripts publishing house rules, I won't mention the URL here directly. As I value my partnership with TradingView very much, I prefer showing you the way for finding them :)
3. You may also contact me directly for more information
II. Algorithm Builder - Single Trend
2.1 Concept
The Algorithm Builder - Single Trend was made to detect the convergence (also called confluence) of many unrelated indicators, giving a BUY or SELL signal whenever all the selected sub-indicators are converging in the same direction.
The Single Trend gives one single entry per identified trend - unlike the Multiple Trends editions (also available on my scripts page) which may give more than 1 entry per trend.
The traders select the sub-indicators they want, and see in real-time the BUY and SELL triangles being updated.
2.2 Why the Algorithm Builder Single Trend may help you
I worked with many traders during my career, and their feedback about trading is often pretty similar.
They all tried a lot of complicated indicators, losing their capital, and finally getting back to the basics (even to the basic indicators if I might say)
The art is finding a good combination of indicators and setting strict money/risk management rules.
Easy in concept, but more than 90+% of traders lose money on the markets... which teach us that trading is not only about drawing trendlines, or using cool indicators but finding ways to ease our psychology while trading.
2.3 The Algorithm Builder trading framework
The sub-indicators (full list on our website) weren't chosen randomly. They're based on a trading method we've developed over the last 6 years - while working with traders and other trading quants.
The Algo Builders are made to detect a convergence - and as such, will give a signal once a trend has been identified.
They're not made to detect reversal but have been designed to give a signal when all sub-indicators are either ALL bullish (green) or ALL bearish (red).
We provide a framework based on indicators we selected because they:
1. make sense to be used altogether
2. work on asset classes like INDEX, CRYPTO, STOCK OPTIONS, FOREX, COMMODITIES
3. it may expand your knowledge about what detecting a convergence with pre-selected indicator really means
2.3.1 Supports and Resistances
The indicator displays the main algorithmic supports and resistances according to our trading method.
I think they're relevant for all asset classes, but you're absolutely free to use any different supports/resistances logic if you want to.
I'm not against it because I know that pivots, Fibonacci levels, etc. may work very well also.
2.3.2 Alerts
Alerts are enabled obviously :)
III. Pain points that we're trying to solve with our Algorithm Builders
Issue #1 There are many informations / indicators / strategies / backtests / noise. Finding the right ones is not a simple task.
Solution #1 A reliable system that removes the external noise is much needed in trading to stay "in the game".
Issue #2 Trading could be quite stressful - The majority doesn't lose in trading because technical analysis is hard, but because managing our psychology is one of the hardest things a human can do.
Solution #2 Some ways to reduce the "trading stress" could be: getting better quality signals and trading like a "machine". Forgetting about Twitter and trusting the system you designed.
Issue #3 Trading without strict rules and only based on what we feel, or what we think the market should do is the fastest way to kiss our money goodbye.
Only 1 indicator generally is not enough. Traders generally use a combination of several indicators but they're monitoring them individually.
It's normal then to feel exhausted at the end of the day ^^ (to say the least)... and exhaustion leads to mistakes which leads to..... (I'm sure you got it) ... capital loss.
Solution #3 As a trader, I needed a trading framework and a method. I offer our trading method but they're plenty others out there. We cannot claim obviously it's the best ever ....but let's say we're using those exact same
scripts ourselves for our trading. And this what we've been recommending our clients to trade with for the past years. Also, having a tool detecting the convergence of several indicators and giving 1 unique signal
for BUY/SELL position will save you a lot of time/energy, and perhaps might help you out getting better trading performance.
IV. Resolving a complex puzzle and having fun in the process
Trading has to stay a passion and not (only be) a source of intense stress.
The most successful traders I know are "trading geeks" - literally always looking for optimizing, searching for the best possible entries, setups, indicators, tools, etc.
For them, it's not even about the money anymore, but only about beating their previous performance.
Why are they doing this? Because it's fun
Might appears as a bold statement, but I guarantee that looking for setups is fun.
One of our users even told us, that it's like playing with "Legos" and we couldn't possibly agree more.
V. Designing a system that "makes sense"
Another bold statement now. Brace yourselves ladies and gentlemen
The Algorithm Builders allow to design trading systems quickly. What could takes days/weeks/months to find out... might be now within your reach in less than a few hours.
With a bit of practice, less than an hour might be enough per asset/timeframe to fine a system that make sense to you and adapted to your trading capital and psychology.
Assuming our users read our guides and are fully committed to learning a new way of trading - then we do guarantee you'll be able to design kick-ass trading systems that make sense.
"Making sense" doesn't mean at all it's guaranteed to win, it means you're the one defining the convergence of indicators, using your Algorithm Builder, and observe that most of the time - whenever there is a BUY signal, the candlesticks are going upwards - whenever there is a SELL signal, it's going downwards.
This is a necessary step to make real progress from a trading analyst perspective - and hopefully could lead to profits.
VI. Algorithm Builder versus the main trader enemy(=psychology)
This indicator has the goal to help solving one of the MAIN issues encountered by traders.
Most of traders realize, they can't perform with only 1 indicator (or 1 price pattern or 1 price action) and need a combination of multiple indicators before getting in a trade.
Far from being a magic pill, if it could at least reduce the stress you have while trading, then we'll consider we made a great job - it's a technical "useless noise remover", and needs to be followed strictly.
Such trust in a trading system can only be built by testing your Algorithm Builder configuration on either:
1. a demo account
2. or a live account with small bids. And then, increasing progressively the bids if your capital increases progressively.
Though, you should still use your common sense. (for instance: if we get a BUY signal right on a big timeframe resistance we're hitting for the first time).
I'm aware this is a new way of trading but for many, and while we cannot foresee the future, neither predict performance, we believe it might save you a lot of time to find good signals.
My maximum level of happiness will be reached the day when our users will contact me and showing me setups being mine.
I'm sure that even I can learn from my users and, we can all learn from each other Algorithm Builder configuration
VII. What is a wrong or bad configuration?
Simply put. If you see that most of your signals react such as described below:
1. a buy triangle predicts, most of the time an upwards move
2. a sell triangle predicts, most of the time a downwards move
3. you estimated yourself the stop-loss needed to give enough room for your trades.
4. take profits based on algorithmic support and resistances or your own take profit method.
So what's a good Algorithm Builder configuration? A configuration you're happy with and makes sense.
A better Algorithm Builder setup is one used in demo or a live account w/ small bids for a few weeks, and you're consistent in your trading performance.
If you have any doubt or question, please hit me up directly or ask in the comments section of this script.
I'll never claim I have the best trading methodology or the best indicators. You only will be the judge, and I'll appreciate all the questions and feedback you're sending my way.
They help me a ton to develop indicators based on all the requests I received.
Kind regards,
Dave
Riptide - Odin AutomatedHey guys,
Its finally here! Automated Odin will allow you to trade the Odin indicator automatically! To learn more about setup and results.
Odin - Bitmex EasymodeThree years ago we started a journey to building a trading framework that was intended to design a framework to stop trading time for money. Today I'm releasing the first version of that hard work as a simple, buy sell indicator optimised for crypto, but can be applied to almost any market.
This indicator was designed as a starting framework for new traders who are unsure of market trends and market movements when entering leveraged trading. Future releases will be coming soon that will include Take profit and stop loss targets and colouring candles with trend, as well as trend lines .
Odin is best used as a swing trader looking to find your peaks and bottoms when we have large shifts in trend. The indicator comes with several options including:
Turning on more signals for riskier trades.
Adjusting the aggressiveness of the algorithm.
Turn on lower lows and highs and higher highs and lows.
Persistence factor to find and counter trade certain trends early.
If you would like to learn more about Odin and whats going on behind the scenes you are welcome to join us.
Pinescript v3 Compatibility Framework (v4 Migration Tool)Pinescript v3 Compatibility Framework (v4 Migration Tool)
This code makes most v3 scripts work in v4 with only a few minor changes below. Place the framework code before the first input statement.
You can totally delete all comments.
Pros:
- to port to v4 you only need to make a few simple changes, not affecting the core v3 code functionality
Cons:
- without #include - large redundant code block, but can be reduced as needed
- no proper syntax highlighting, intellisence for substitute constant names
Make the following changes in v3 script:
1. standard types can't be var names, color_transp can't be in a function, rename in v3 script:
color() => color.new()
bool => bool_
integer => integer_
float => float_
string => string_
2. init na requires explicit type declaration
float a = na
color col = na
3. persistent var init (optional):
s = na
s := nz(s , s) // or s := na(s ) ? 0 : s
// can be replaced with var s
var s = 0
s := s + 1
___________________________________________________________
Key features of Pinescript v4 (FYI):
1. optional explicit type declaration/conversion (you still can't cast series to int)
float s
2. persistent var modifier
var s
var float s
3. string series - persistent strings now can be used in cond and output to screen dynamically
4. label and line objects
- can be dynamically created, deleted, modified using get/set functions, moved before/after the current bar
- can be in if or a function unlike plot
- max limit: 50-55 label, and 50-55 line drawing objects in addition to already existing plots - both not affected by max plot outputs 64
- can only be used in the main chart
- can serve as the only output function - at least one is required: plot, barcolor, line, label etc.
- dynamic var values (including strings) can be output to screen as text using label.new and to_string
str = close >= open ? "up" : "down"
label.new(bar_index, high, text=str)
col = close >= open ? color.green : color.red
label.new(bar_index, na, "close = " + tostring(close), color=col, textcolor=color.white, style=label.style_labeldown, yloc=yloc.abovebar)
// create new objects, delete old ones
l = line.new(bar_index, high, bar_index , low , width=4)
line.delete(l )
// free object buffer by deleting old objects first, then create new ones
var l = na
line.delete(l)
l = line.new(bar_index, high, bar_index , low , width=4)
Dragon-Bot - Default ScriptDragon-Script is a framework to make it as easy as possible to test your own strategies and set alerts for external execution bots. This is the alerts version of the script.
The script has many features build in, like:
1) A ping/pong mechanism between longs and shorts
2) A stop-loss
3) Trailing Stops with several ways to calculate them.
4) 2 different ways to flip from long to short.
The script is divided into several parts.
The first part of the script is used to set all the variables. You should normally never change the first part except for the comments at the top.
The second part of the script is the part where you initialise all your indicators. Several indicators can be found on Tradingview and on other sites. Please keep in mind that all the variable names used in the indicator should be unique. (all the … = … parts)
The third part of the script, is the most important part of the script. Here you can create the entry and exit points.
Let’s look at the OPENLONG function to explain this part: The first variables are all the possible entries; These are longentry1 till longentry5. You can add many more if you like.
The variables are all initialised as being false. This way the script can set a value to true if an entry happens.
The if function is the actual logic: You could say “if this is true” then (the line below the if function) longentry1 := (becomes) true.
In this case we have said: “if this is true” then (the line below the if function) longentry1 := (becomes) true when the current close is larger than the close that is 1 back.
The last part is the makelong_funct. This part says that if any of the entries are true, the whole function is true.
The last part of the script is the actual execution. Here the alerts are plotted and the back test strategies are opened and closed.
We hope you guys like it and all feedback is welcome!