Round Numbers Breakouts Smart Formula Signals and AlertsThis indicator uses Round Numbers breakouts and then uses smart formula with the near Round Numbers to determine best TP (take profit)/SL (stop loss) areas. Furthermore, it calculates win percentage, shows in-profit/in-loss peaks and the price amount result over a customizable date range, which when combined well with the smart formula provides decent profitable outcome. I have decided to write my own backtesting engine as the integrated TradingView strategy one has limitations and has shown inconsistencies when compared to manual backtesting…
There are many settings you can manually change to trade any instrument, any style, any approach and there are presets included for Bitcoin(BTCUSD), FOREX(EURUSD), SPY(S&P500), so you can start trading immediately! Alerts correspond to indicator settings and are turned on with a few clicks. There are 3 tables (each can be shown/hidden) showing everything you need to see/know to calibrate the indicator as you wish.
Labels, lines, tables explanations (everything can be hidden/shown):
- LONG Labels: medium-green: position open, dark-green: SL, bright-green: TP, blue: TP2
- SHORT Labels: medium-red: position open, dark-red: SL, bright-red: TP, purple: TP2
- Gray circles: position entry area | Yellow crosses: SL area
- Green line: Long TP1, Blue line: Long TP2 | Red Line: Short TP1, Purple line: Short TP2
- Grey lines: Round Numbers (customized via “Round Number up/down measure unit” input)
- Yellow labels at end of each week: end of week OVERALL total results
- Red colored background: power segment
- 3 tables: 1) INFO | STATS, 2) SPY Options Calculator, 3) Indicator Settings
If you decide to fully customize the indicator yourself, on the very top - under “PRESETS” select “MANUAL”! NOTE: If you select any of the pre-set presets, only GLOBAL settings can be changed, the rest of the settings will be “frozen” until you switch it to “MANUAL”!
- Global Settings are self-explanatory and mainly observational, show/hide, etc.
- Manual TP2 (Multi-Take-Profit) Settings:
>>>>> Include TP2 System? Turn on/off multi-profit system, with this unchecked, every trade will either end with SL or with TP1.
>>>>> TP2 System: NEAREST/FORMULA, NEAREST – after TP1 is taken > next TP2 will be a round number price target nearest to where TP1 was taken (sometimes it can be very near, sometimes further away…), FORMULA – 2nd round number price target will be optimally selected based on the distance behind and ahead of TP1 area. For TP2 – FORMULA would be the most logical choice as with multi-take-profit setting turned on – you’d want to ride it out as far as possible.
>>>>> TP1/TP2 division type: 1) Each price target (TP1, TP2) will be ½ of the position 2) TP1 will be 2/3 of the position and TP2 will be the remaining 1/3.
>>>>> TP2 hit type: “close” > candle has to close on top/crossing the price target line, “touch” > once candle touches the price target – you will be immediately alerted to take the partial profit (if you will use such setting – you will need to take the partial profits as soon as you receive the alert.
>>>>> TP1 > Back to Entry hit type: similar to TP2, “close” > candle close, “touch” > candle touch. Please note: this is a very tricky setting as if you use “close” option – your profitable trade may become a loss if a huge candle will close against your position eliminating your TP1 profit, however often the price will touch and cross the entry area to only bounce and continue with your position direction for even bigger profits… so experiment with the date range results to see what works best for your instrument/setting/strategy.
>>>>> TP2 count towards trades count: this can be a bit confusing, but it is simply how should TP2 be treated towards trades count. The indicator will show you Win Percentage and Win % is obtained from winning trades count divided by total trades count. While TP2 is not “a new trade”, it expands the profit of the trade. This is an experimental setting to count TP2 as the whole winning trade, ½ of a trade, or not count it at all.
- Manual Signals/TP1 Settings:
>>>>> TP1/TP2 offset: this one is really cool, with this feature you can hunt these conditions when the price comes very near the profit target area, but never touches it. With this setting turned on and with a good offset amount – you will be able to catch these for TP1 and TP2!
>>>>> TP1/TP2 offset amount: just what the title says, please be careful with this as this number varies significantly depending on the instrument you will be trading. Examples: 1) For SPY 0.1 would be $0.10 offset - if TP1 is $400 and price hits $399.90 > TP1 considered taken/signal shown/alert) | 2) For EURUSD, it is very different and if wrong will show TP1 immediately at position open, typical good offset for EURUSD is: 0.0005 | 3) For BTCUSD, 10 - $10 offset, if TP is $15,000 > $14,990, etc.
>>>>> Round Number up/down measure unit (in dollars $): this one is very important if you will be using “MANUAL” selection to build your own setup as it is very different for every instrument. For SPY, round numbers are single dollars or even half-dollar 50 cent numbers: 1 or 0.5 (350, 351, 352, etc. or 350.50, 351, 351.50, 352, etc.), while for Bitcoin (BTCUSD) a single unit ($1) is too small to be a round number as Bitoin moves much faster and wider every second and it would have to be at least 50 ($50) to make sense. Similar for FOREX (EUR/USD) a single 1 unit ($1) will be too big as EURUSD will never move a whole $1 in 15 minutes or even a day.. and would have to be something like 1.05500. You can easily determine if this number makes sense for your instrument by observing the grey Round Number lines which will correspond based on this setting. You can also visually observer if the price of the instrument appreciates these round numbers.
>>>>> Close Position Before Market Closes: just what the title says. Indicator will close the position 15 minutes before market closes (US session), update backtesting stats, alert you.
>>>>> Close Position Before Power Hour: 3PM – 4PM ET is the last hour of US trading session, where sudden move in any direction can happen with huge volatility, while sometimes nothing will happen at all… Many try to avoid it, so if you wish to avoid it as well - turn this on and it will alert you to close your positions 15 minutes before Power Hour starts, backtesting/stats will be adjusted accordingly.
>>>>> Skip OVERSIZED candles in signals: turn on this setting to skip signals, which happen to fall on big candles. This is basically a protection from huge volatility moves, which usually happen during financial news/events and if you are not a fan of these – you can set this option for indicator to not open anything based on the candle size.
>>>>> Color OVERSIZED candles: this will help you calibrate the size of the OVERSIZED candles if you decide to use this setting and overall visually see them.
>>>>> OVERSIZED candle size: OVERSIZED candle size must be input as it varies significantly. Please note: for each instrument – the size number is completely different, as for SPY: 2 would mean any candle bigger than $2 distance will be considered OVERSIZED, for Bitcoin it would have to be several hundred dollars, like 400-500. For FOREX, this would have to be a decimal, for EURUSD something like 0.0005. It’s best to experiment visually with this setting depending on the instrument you will be trading while setting up the size. To see a typical huge unusual candle – look up financial calendar for something like FOMC meeting, then measure the candle input it into this setting.
>>>>> OVERSIZED candle size calculation type: this is just more flexibility for your preference. If you wish to calculate the size of the candle based on the open/close – select “BODY”, if you wish to use high/low – select “STICKS (from tip to tip)”. Hard to say which one is better, so it is up to you to decide.
>>>>> Include EMA in signal formula: LONG signals will only be shown only if above EMA, SHORT if below EMA. EMA length is of course customizable in below.
>>>>> Skip opposite candle types in signals: signals where the candle color confirms the direction of the trade, but the candle type is opposite (like a green colored bearish hammer for example) will be avoided (such candles can be very uncertain/deceptive).
>>>>> Skip doji: signals where the signal candle is doji (uncertain) will be avoided.
>>>>> TP1 hit type/system: same thing as TP2 hit type/system.
>>>>> SL hit type/system: same as TP1 and TP2 types/systems.
>>>>> Intraday Session Signals Active Time in ET: time range during the day when indicator will show signals (open trades, alert you, etc.). This is specifically for intraday trading. You can turn it off completely by selecting a BLANK option.
>>>>> Intraday TP/SL Active Time in ET: same as above, but for taking profits/stop losses.
*** To add the alerts
-Right-click anywhere on the TradingView chart
-Click on Add alert
-Condition: Select this indicator by it’s name
-Alert name: Whatever you want
-Hit “Create”
-Note: If you change ANY Settings within the indicator – you must DELETE the current alert and create a new one per steps above, otherwise it will continue triggering alerts per old Settings!
If you wish to try this out for a week or so – please write me directly and I will give you access.
Formula
RSI Reborn [New Formula]A unique non-standard RSI formula with my extensions.
The indicator is displayed without delays and repaints, immediately after the close of the candle.
This formula allows me to correctly include the moving average in the calculation. The calculation allows me to display RSI with any type of MA.
By default I use EMA, with this type of MA my RSI is not visually different from a regular RSI.
I have 11 types of RSI to choose from:
'EMA'
'ALMA'
'RMF'
'TilsonT3'
'ARSI'
'RMA'
'SMA'
'VWMA'
'WMA'
'WWMA'
'ZEMA'
You also have a choice of RSI display:
As candlesticks and as a simple line.
You can adjust the colors in the Style tab.
When you select 'Candles' type, you can make the wicks transparent if they bother you.
I also added a source selection. By default, any RSI uses the Close source.
But you can choose any of 15:
VWAP, Close, Open, HL2, HLC3, OHLC4, Volume, High, Low, vwap(Close), vwap(Open), vwap(High), vwap(Low), AVG(vwap(H,L)), AVG(vwap(O,C)).
Additional extensions:
Additional RSI added.
By default, the extra RSI is twice as long as the regular RSI. Despite the value of 14. The "Multiple of Current TF" function allows calling RSI from a timeframe twice as long as the current one, if it is equal to 2. If it is equal to 3, then it will be 3 times longer than the current timeframe. And so on.
An additional moving average has been added.
You can use it as an ordinary additional line. Or leave it as Cloud by default.
A unique oversold/oversold formula in the form of small red/green dots has been added.
Bolinger Bands feature has also been added.
Market Makers MoveV1,V2, & V3: New indicator release!! In this fantastic new indicator, you can do the following:
- Specify a particular EMA crossing combination (between a fast and a slow ema line)
- Specify the timeframe (can be independent or based on current chart timeframe, by default)
- Select one of four possible potential profiles (ETFs Only, Crypto, and more!) OR input manually any of 40 possible tickers AND
- Assess whether entry for calls or puts is appropriate based on price action on realtime view between 2 tickers, one which will be the highest (strongest) trend up and the other going the lowest (weakest) trend possible, all at the same time!
This indicator is by no means financial advice!! So by all means, use according to proper assessment and risk management! There are various tooltips instilled to each field and table of the indicator, all to better guide you for better end results!
Cheers! and good luck in you!!
Money Velocity Population Adjusted (MVPA)MVPA=GDPPC/( M2 /POP). An adaptation to normal Money Velocity, taking into account populations for more volatile plots/different perspective. Major world economy's money supply velocity. Compare how each country's monetary policy has played out and current trajectory in comparison to others. The velocity of money is a measure of the number of times that the average unit of currency is used to purchase goods and services within a given time period. The concept relates the size of economic activity to a given money supply, and the speed of money exchange is one of the variables that determine inflation .
How To Calculate Symbol's UTC NumberVarious methods to calculate a symbol's timezone offset as a numerical value in hours and decimal minutes. This value may be useful to script authors in certain situations where timezone information needs to be available in a numerical format while using intraday charts. Special thanks to @LucF and TradingView Support for their efficiency advisements!
NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!
Trend Strategy by zdmreThis Strategy is a trend following indicator. It is plotted on price and the current trend can be determined by its placement vis-a-vis price. It is constructed with just three parameters: Period, Multiplier and Entry/Exit Point with Superformula.
The default parameters are 14 for Average True Range (ATR) and 4 for its multiplier. The average true range (ATR) plays a key role in ‘Trend’ as the indicator uses ATR to compute its value and it signals the degree of price volatility. You should note that any changes to these numbers can affect the use of the Trend indicator.
While you using this indicator, you should not avoid putting your stop loss.
For a long position, you can put stop loss right at the red indicator line. For a short position, you can put it at the green indicator line. You can insert your own settings as well.
Using Trend Strategy along with a stop loss pattern is the best way for earning the best wealth in trading.
There is no best setting for any trading indicator.
Buy/Sell Alert EMA with SuperFormula by zdmre*** Use it at your own risk
This indicator has 3 indicators and gives a buy/sell signal depending on the EMA.
3 indicators:
- Ichimoku
- Bollinger Band
- EMA
It also shows the value on the candle as a warning in the Buy and Sell signals. This value is calculated with a special formula I have created.
On the other hand Bollinger Band and Ichimoku Cloud are also included to check the accuracy of the signals.
For this indicator, I recommend a minimum of 4 hours chart.
Graham FormulaThis is an Tradingview implementation of the Grahams Formula as described in Benjamin Grahams book "The Intelligent Investor".
In theory this can be used to screen for over- and undervalued stocks, however as Graham himself notes, you should look into other fundamentals when using them in conjunction with Grahams formula.
BitMEX Funding Rate CalculationThis script implements the full funding rate formulas found on the BitMEX site for XBTUSD, ETHUSD, and XRPUSD. It uses the 1-min premium and interest tickers found here on TradingView to calculate an 8-hour TWAP, then uses base initial and maintenance margins to apply caps on absolute rate and delta from prior value. Caps are applicable only to position sizes below 200 XBT. When chart history exceeds the available history of 1min date on TradingView, the indicator switches to 1hr data to provide estimates.
Outputs:
Either a check (using 1min data) or a question mark (using 1hr data) upon each new funding period.
Current funding rate, every 8 hours.
Current funding prediction for the next funding period.
Price Action ChannelsHere are the brand new Price Action Channels.
As time passes and the portfolio grows not only in volume but in assets managed, I have found out that what's needed from technical analysis can't occupy so much time in decision making. Why? I hope you take into consideration other critical variables that affect the market, such as fundamentals, market sentiment, news, the world economy, and so on. Thus, I want to make obvious TA is not supposed to give you miracle formulas. In my investments, technicals count for about 33% of my decision formula.
Now about the indicator.
I'm a big fan of simplicity, and the fact is, everything is numbers and their universal rules.
So the approach we take is entirely following rules of statistics, taking into consideration the maximum amount of data to quantify and qualify moves(changes in price towards a single direction).
Once those moves are defined, we measure their average size, which is the average price range in one direction.
After that, we qualify them by using frequencies and figuring out how often each move happens, let's say:
Asset X, 10% of the times when it moves upwards it's +1%
Asset X, 14% of the times when it moves upwards it's +1,1%
Asset X, 21% of the times when it moves upwards it's +1.3%
Asset X, 25% of the times when it moves upwards it's +1.5%
Asset X, 15% of the times when it moves upwards it's +1.6%
Asset X, 10% of the times when it moves upwards it's +1,7%
Asset X, 5% of the times when it moves upwards it's +2%
With that data, we establish the size of the range and the most reasonable boundaries and thresholds.
This is meant for channels. We consider there are 3 market conditions: Channels(Trending), Sideways, Spikes(abnormal price changes).
So if you try to apply this indicator for huge movements, like news related pumps and such it won't work as it's supposed, since our approach here is to define what's "normal", and such spikes are anomalies.
Sideway assets are doable but not advisable.
We plot all the numbers in a panel, so it's easily readable while trading, and you can fully control where it appears on your screen.
The indicator counts with following features in the Panel:
Channel Sampling Size: Short-term, Mid-term, Long-term
Risk Exposure: Minimum, Low, Modest, Medium, Moderate, High, Maximum
Filtered Price Action
Trading Assist
X & Y Panel Position
Study Strong.
Coding ema in pinescriptWhat is EMA ?
Ema is known as exponential moving average, it comes from the class of weighted moving average. It gives more weightage to the recent price changes, thus making it much more relevant to the current market analysis. Also it provides a dynamic way of calculating support and resistances in a trend following setup.
The most common way to mint profit out from the market is to use trend following setups which can be easily achieved by using a group of EMA’s
So how’s this EMA calculated ?
Before understanding the calculation of EMA let’s look into a much wider topic:
“The Law of Averages”
It states : If you do something often enough a ratio will appear, simply put, any time series data, tend to deviate from its average.
EMA provides a way to statistically calculate the exponential moving average for a provided time series data giving much more emphasis on the most recent data in the series.
So in the 17th century, when the people were playing with numbers in their free time, they came up with a statistical strategy to envelop any time series data to detect the direction of the data flow , they called it exponential moving average.
Later in 1940’s with the increase in signal processing requirements in the field of electronic devices scientists started using Exponential moving average onto the electronic signal followers, just to classify the signals as above or below a moving/dynamic threshold.
So EMA is a smoothed time-series data.
The simplest form of EMA Smoothing can be given by the formula:
S(t) = alpha * X(t) + (1 - alpha) * X(t - 1).
The value of alpha must lie between 0 and 1
Where
alpha , is the smoothing factor
X(t) , is the current observation data point
X(t - 1), is the past observational data point.
t , is the current time
Generally,
In current day trading setups for EMA the alpha is calculated by
alpha = 2 / (time period window + 1)
Things to note here is that the alpha calculated above is the most generally used factor calculation method for EMA ,
You can tweak the alpha function above until it gives value between 0 and 1 for example alpha can also be written as
alpha = ln ( current price / past price )
Note it’s just a weighing scheme,
But for Our Case of EMA
We will be using
alpha = 2 / (time period window + 1)
Please refer to the script code below
Librehash Reversion Ribbon V2Out of all the indicators created by this brand, this is probably the grandest of them all.
Known as the ‘ZN Reversion Ribbon V2’, for short, this indicator is designed to:
1. Create multiple buy and sell signals
2. Help users gauge the momentum of the price movement.
3. Re-color candles to give users a better understanding of price direction as well as plotting entries and exits.
4. Serve as an enhanced version of the MACD indicator.
5. Effectively gauge buy and sell pressure at any given point in time by using former price data.
There are a lot of moving parts to this indicator, so this guide will be dedicated to dissecting these moving parts, piece by piece.
#1 — Histogram
Perhaps the simplest part of the indicator to dissect at the start is the Histogram. This is also the part of the indicator that can be the most important complement to any other readings that are being made.
You read the histogram in the same manner that you would read the Histogram for the MACD.
The bars in the background are the histogram. Reading this portion of the indicator is fairly simple though.
1. As the green bars get darker, the buy pressure is increasing.
2. As the red bars get darker, the sell pressure is increasing.
3. If the current bar is larger than the last, the trend is sustained. This is the same principle that you would observe in the MACD. The core difference, however, is that this indicator is plugged in with a specific formula (beyond just the basic moving averages), that make them more responsive to price movement in a way that allows for the anticipation of signals being formed.
#2 — Ribbon
The ribbon on this indicator has about 3 different buy/sell signals embedded within it that will allow traders to anticipate an impending change in trend well before it EVER occurs.
This may be the most valuable part of the indicator itself.
Let’s start with the first facet of the ribbon.
A) — The ‘widening’ of the ribbon
When the ribbon ‘expands’, that means that the trend is ‘strengthening’ or growing. When the ribbon narrows or ‘contracts’, that means that the trend is becoming weaker and that this may serve as a warning of impending trend reversal.
In the picture above, you can see the color change of the ribbon itself as well.
You’ll notice that the ribbon transitions from a darker red to a lighter red. That’s a sign of waning sell pressure. You can apply this concept to the green portion of the ribbon too.
B)— The Line Sometimes Signals Before the Cross
This one is a bit harder to explain, but the way that the indicator is programmed is not to turn ‘green’ or ‘red’ based on the crosses, but rather on a mathematical formula.
Now, because of the way the indicator is programmed, the cross often coincides with the color change — but not always.
Below is an example:
Of course, beyond this, there are the usual buy and sell signals that come with the MACD as well.
For instance, there is —
C) The Change in Direction of the is a ‘Buy’ or ‘Sell’ Signal As Well
--------------
Changes in the Candle Colors
Perhaps the most elaborate part of this indicator is the fact that it changes the colors of the candles on the chart in live time without repainting.
In order to understand the candles, here’s a quick guide:
a) dark green with green outline = extreme buy pressure
b) lighter green with green outline = normal buy pressure
c) dark red = heavy sell pressure
d) light red = light sell pressure
e) dark green with red outline = impending reversal downward
f) purple with any outline = ambiguous / neutral
g) light green with red outline = very, very weak sell pressure
h) dark green with red outline = exhausted buy pressure
f) dark red with green outline = exhausted sell pressure
Effectiveness of Indicator
This indicator has the ability to be a ‘game changer’ in terms of its ability to dissect price action.
This next picture is another awesome example of how this indicator works.
Check it out:
Here are the multiple reasons why we could’ve anticipated the reversal in price direction before red candles started showing up:
1. The actual reversion lines themselves began to converge.
2. The Histogram is declining.
3. The bar colors move from dark green to light green.
Now, you may be looking at the above picture and thinking, ‘Well it seems that it didn’t catch the major upswing in the price later though’.
This is true, however —
The gain from this move was preposterous.
Even still, the indicator ensures that we still garner some pretty significant profits.
Conclusion
What you see here sums up this indicator for the most part. However, there are continued updates that will be put out for the indicator in the near future as well.
As always, these can be pushed directly through TradingView (which will happen soon).
QTi65Find low risk entry points with the QTi65 momentum Indicator formula.
How to used it :
1. Setting your chart for Swing Trading using momentum and breakout idea.
- Use it on 5M and 15M Charts
- You will need a good MACD indicator -> QLEMAC MACD (Already have the perfect setting!)
- You will need a Wilder's RSI indicator -> We already program one for you in our script.
- Volume indicator