AI-Bank-Nifty Tech AnalysisThis code is a TradingView indicator that analyzes the Bank Nifty index of the Indian stock market. It uses various inputs to customize the indicator's appearance and analysis, such as enabling analysis based on the chart's timeframe, detecting bullish and bearish engulfing candles, and setting the table position and style.
The code imports an external script called BankNifty_CSM, which likely contains functions that calculate technical indicators such as the RSI, MACD, VWAP, and more. The code then defines several table cell colors and other styling parameters.
Next, the code defines a table to display the technical analysis of eight bank stocks in the Bank Nifty index. It then defines a function called get_BankComponent_Details that takes a stock symbol as input, requests the stock's OHLCV data, and calculates several technical indicators using the imported CSM_BankNifty functions.
The code also defines two functions called get_EngulfingBullish_Detection and get_EngulfingBearish_Detection to detect bullish and bearish engulfing candles.
Finally, the code calculates the technical analysis for each bank stock using the get_BankComponent_Details function and displays the results in the table. If the engulfing input is enabled, the code also checks for bullish and bearish engulfing candles and displays buy/sell signals accordingly.
The FRAMA stands for "Fractal Adaptive Moving Average," which is a type of moving average that adjusts its smoothing factor based on the fractal dimension of the price data. The fractal dimension reflects self-similarity at different scales. The FRAMA uses this property to adapt to the scale of price movements, capturing short-term and long-term trends while minimizing lag. The FRAMA was developed by John F. Ehlers and is commonly used by traders and analysts in technical analysis to identify trends and generate buy and sell signals. I tried to create this indicator in Pine.
In this context, "RS" stands for "Relative Strength," which is a technical indicator that compares the performance of a particular stock or market sector against a benchmark index.
The "Alligator" is a technical analysis tool that consists of three smoothed moving averages. Introduced by Bill Williams in his book "Trading Chaos," the three lines are called the Jaw, Teeth, and Lips of the Alligator. The Alligator indicator helps traders identify the trend direction and its strength, as well as potential entry and exit points. When the three lines are intertwined or close to each other, it indicates a range-bound market, while a divergence between them indicates a trending market. The position of the price in relation to the Alligator lines can also provide signals, such as a buy signal when the price crosses above the Alligator lines and a sell signal when the price crosses below them.
In addition to these, we have several other commonly used technical indicators, such as MACD, RSI, MFI (Money Flow Index), VWAP, EMA, and Supertrend. I used all the built-in functions for these indicators from TradingView. Thanks to the developer of this TradingView Indicator.
I also created a BankNifty Components Table and checked it on the dashboard.
스크립트에서 "vwap"에 대해 찾기
Multiple Moving Average ToolkitFeatures Overview:
Multiple Moving Averages: The script allows you to plot up to five different Moving Averages (MAs) on your chart at the same time. You can choose the type of MA (EMA, SMA, HMA, WMA, DEMA, VWMA, VWAP) and the length of each one.
Color Ribbon: You can turn the MAs into a color ribbon by selecting the "Turn into Color Ribbon?" option. This will make the area between the MAs colored and can help you identify trends more easily.
MA Value Table: You can draw a table on your chart that displays the current values of each MA, whether the trend is bullish or bearish along with the length of the MAs. The current ATR value is also shown in the last cell of the table. You can choose the location of the table (Top Left, Top Right, Bottom Left, Bottom Right) and the transparency of the background color.
Crosses: The script can detect when two MAs cross over each other (1st MA crosses 5th MA and vice versa), indicating a potential trend reversal. It will plot crosses on the chart at the point of the crossover and give an alert if the "Bullish Cross Detected" or "Bearish Cross Detected" condition is met.
How to use:
Once the script is added to your chart, you can customize the settings to fit your preferences. You can choose the type and length of each MA, whether to turn them into a color ribbon, whether to plot crosses, and whether to draw the MA Value Table.
The MA Value Table can be moved to a different location on the chart by selecting the "Location of Table" option and choosing Top Left, Top Right, Bottom Left, or Bottom Right.
Watch for MA crossovers and alerts to identify potential trend reversals. The script can help you identify bullish and bearish trends by color-coding the area between the MAs and displaying the current values of each MA in the table.
Breakdown of the script:
User Inputs
The first section of the script defines several user inputs that allows you to customize the indicator. These include options for turning the MAs into a color ribbon, plotting crosses when there is a bullish or bearish cross of the MAs, drawing a table of the MA values, and setting the transparency of the ribbon. You can also select the location of the MA value table and customize the settings for each individual MA.
Moving Average Calculation
The script defines a function called "getMA" that calculates the moving average for a given type and length. The function uses a switch statement to determine which type of moving average to use, such as an exponential moving average (EMA), simple moving average (SMA), Hull moving average (HMA), weighted moving average (WMA), double exponential moving average (DEMA), volume-weighted moving average (VWMA), or volume-weighted average price (VWAP).
The script then calls this function to calculate the values of up to five different MAs, depending on the user input. The ATR (average true range) is also calculated using the TA library.
Color Filter and Cross Detection
The script sets a color filter based on the relationship between the MAs. If the shorter-term MAs are above the longer-term MAs, the filter is set to green to indicate a bullish trend, and if the shorter-term MAs are below the longer-term MAs, the filter is set to red to indicate a bearish trend. You can adjust the transparency of the ribbon to make it more or less visible.
The script also detects when there is a bullish or bearish cross of the MAs and can generate alerts to notify you.
MA Plotting
The script plots up to five MAs on the chart, depending on the user input. The MAs are plotted as lines with different colors and thicknesses, and you can choose to turn them into a color ribbon if desired.
Cross Plotting
The script plots crosses on the chart when there is a bullish or bearish cross of the MAs. The crosses are plotted as X shapes at the location of the cross and are color-coded to indicate the direction of the cross.
MA Value Table
Finally, the script draws a table of the MA values on the chart, displaying the values of each MA as well as the current trend and the ATR. You can customize the location of the table, and the table is colored to match the color filter of the MAs.
Feel free to message me or comment on the post with any questions or issues!
Much more to come!
Thanks for reading, enjoy!
Typical Price Difference - TPD © with reversal zones and signalsv1.0 NOTE: The maths have been tested only for BTC and weekly time frame.
This is a concept that I came through after long long hours of VWAP trading and scalping.
The idea is pretty simple:
1) Typical Price is calculated by (h+l+c) / 3. If we take this price and adjust it to volume we get the VWAP value. The difference between this value and the close value, i call it " Typical Price Difference - TPD ".
2) We get the Historical Volatility as calculated by TradingView script and we add it up to TPD and divide it by two (average). This is what I call " The Source - TS ".
3) We apply the CCI formula to TS .
4) We calculate the Rate of Change (roc) of the CCI formula.
5) We apply the VIX FIX of Larry Williams (script used is from ChrisMoody - CM_Williams_Vix_Fix Finds Market Bottoms) *brilliant script!!!
How to use it:
a) When the (3) is over the TPD we have a bullish bias (green area). When it's under we have a bearish bias (red area).
b) If the (1) value goes over or under a certain value (CAUTION!!! it varies in different assets or timeframes) we get a Reversal Zone (RZ). Red/Green background.
c) If we are in a RZ and the VIX FIX gives a strong value (look for green bars in histogram) and roc (4) goes in the opposite direction, we get a reversal signal that works for the next week(s).
I applied this to BTC on a weekly time frame and after some corrections, it gives pretty good reversal zones and signals. Especially bottoms. Also look for divergences in the zones/signals.
As I said I have tested and confirmed it only on BTC/weekly. I need more time with the maths and pine to automatically adjust it to other time frames. You can play with it in different assets or time frames to find best settings by hand.
Feel free to share your thoughts or ideas on this.
P.S. I realy realy realy try to remember when or how or why I came up with the idea to combine typical price with historical volatility and CCI. I can't! It doesn't make any sense LOL
Intrabar Analyzer [Kioseff Trading]Hello!
This indicator (Intrabar Analyzer) presents intrabar data in various derivative forms.
On-Chart Features
Traditional price data down to 1 min.
Heikin-Ashi price data down to 1 min.
Kagi price data down to 1 min.
Point & Figure price data down to 1 min.
Renko price data down to 1 min.
Linebreak price data down to 1 min.
LinReg channel
SMA
EMA
ALMA
Echomorphic Average (A @kaigouthro special!)
HMA
RMA
WMA
VWMA
VWAP
SWMA
SAR
Supertrend
On-Chart Features
Price x Volume graph
Intrabar technical rating
Positive volume index
Negative volume index
Price volume trend
RSI
%k
ROC
MFI
MFC
OBV
CCI
BBW
CMO
COG
KCW
MOM
RANGE
%r
Let's look at the objects populated by the indicator!
The image above shows what data correlates to the populated graphs!
Let's dial in on the price x volume graph.
The image above provides an example/explanation of the price x volume graph. All data is sourced from a lower timeframe (configurable - default = 1 minute).
Colors are configurable; the plot characters are configurable.
The numbers above show an alternative view of the price x volume graph!
Price graph
The price graph can populate 6 variations of price data: traditional, heikin-ashi, renko, point & figure, line break, and kagi.
The subsequent images will show all available forms of price data, in addition to a randomly selected, on-chart technical indicator!
Kagi + LinReg
Traditional + EMA
Renko + SAR
Point & Figure + ALMA
Heikin-Ashi + Supertrend
Line Break + VWAP
You can display up to three indicators concomitantly - all calculated using intrabar data!
Lastly, the indicator displays the TradingView calculated technical rating for the intrabar.
The technical ratings are multiplied by x100 and oriented left & right of the price box. Left values are negative; right values are positive. The "0" value is not shown; therefore, if the technical rating isn't highlighted then the rating is "0".
The image above shows the technical rating system in action (:
That's it!
This was a fun project and I'm certainly willing to add more - let me know if there's anything you'd like included.
Additionally, a future feature involves compatibility with any custom indicator! Stay tuned; thank you for checking this out (:
Thank you to @kaigouthro, TradingView and @PineCoders for providing some cool libraries to play with!
Strat Dashboard [TFO]The Strat Dashboard tracks up to 10 signals while highlighting common strat reversal patterns, the SSS 50% rule, timeframe continuity, and some additional criteria with VWAP and moving averages.
With the strat, all price action bars/candles are simplified into 3 total possibilities: 1 (inside bar), 2 (a bar that takes the previous bar's high OR low), and 3 (outside bar). The first table column for Last X Candles shows the most recent candles according to this notation, for example, 1 - 2D - 2U. This would mean we had an inside bar, followed by a bar that took the previous bar's low, followed then by a bar that took the previous bar's high. Note that the colors in this column are set according to whether the current bar's close exceeds the previous bar's high/low. By default, these colors are green if above the previous bar's highs, or red if below the previous bar's lows. If the current close is in between the previous candle's high and low (even after already taking the prior high or low), no color will be applied.
The SSS 50% column shows a yes or no value for whether the current bar aligns with the SSS 50% rule, where a bar has taken either the previous high or low, and has since reversed to at least the midway point of the previous bar's height - essentially anticipating a 2 that may become a 3 (outside bar).
Timeframe continuity (TFC) shows a yes or no value for when the current candle on multiple timeframes are all green or red (above the open price or below the open price, respectively). For example, if you were looking at the current 15m, 1h, and 1D bars, and they were all above the open price, you could say there's TFC between all three timeframes. As of the initial release, you can select up to 3 different timeframes. The table values will only be true when all selected timeframes are in alignment. When setting alerts, first deselect the timeframes if you don't want TFC logic to impact alerts.
The "Last" column shows the last strat reversal pattern that was confirmed (after the last bar closes). Waiting for a candle close is the safer option since a 2 can turn into a 3; however for higher timeframes, it may be beneficial to make an update to this indicator in which you can have live alerts as well (not waiting for a candle close). You can select which strat reversals you want to be shown from the settings. Various strat reversals may be selected for alerts of type "Any"; for example, if setting up an alert for "Any" strat reversal on Symbol 1, then this alert will go off when any of the *selected* strat reversals occur for that specific symbol. Deselect any strat reversals that you don't want to be included in these alerts.
Lastly, the EMA and VWAP columns simply show whether price is above or below said value. This tracks the current candle close, and may repaint/change several times if the current bar is oscillating above and below these values.
Strategy: Range BreakoutWhat?
In the price action, levels have a significant role to play. Based on the price moving above/below the levels - the underlying instrument shows some price-action in the direction of breakout/breakdown.
There are plenty of ways level can be determined. Levels are the decision point to take a trade or not. But if we make the level derivation complex, then the execution may get hamper.
This strategy script, developed in PineScript v5, is our attempt at solving this problem at the core by providing this simple, yet elegant solution to this problem.
It's essentially an attempt to Trade Simple by drawing logical (horizontal) lines in the chart and take actions, after multiple associated parameters confirmation, on the breakout / breakdown of the levels.
How?
Let us explain how we are drawing the levels.
We are depending on some of the parameters as described below:
Open Range : During intraday movement, often if prices move beyond a particular level, it exibits more movement in the same swing in same direction. We found out, through our back testing for Indian Indices like NSE:NIFTY , NSE:BANKNIFTY or NSE:CNXFINANCE the first 15m (i.e 09:15 AM to 09:30 AM, IST) is one of such range. For Indian stocks, it is 9:15 to 9:45. And for MCX MCX:CRUDEOIL1! it's 5:00 pm to 6:00 pm. There are our first levels.
PDHCL : Previous Day High, Close, Low. This is our next level
VWAP : The rolling VWAP (volume weighted average price)
In the breakout/breakdown of the Open Range and Previous Day High/Low, we are taking the trade decisions as follows using CEST principle:
C onditions :
If current bar's (say you are in 5m timeframe) closing is broken out the Open Range High or Previous Day High, taken a Buy/Long decision (let's say buying a Call Option CE or selling a Put Option PE or buying the future or cash).
If current bar's (say you are in 5m timeframe) closing is broken down the Open Range Low or Previous Day Low, taken a Sell/Short decision (let's say buying a Put Option CE or selling a Call Option PE or selling the future or cash).
Additionally, and optionally (default ON, one can turn off): we are checking various other associated multiple confirmations as follows:
1. Momentum : Checking 14-period RSI value is more than 50 or less than 50 (all parameters like period, OB, OS ranges are configurable through settings)
2. Current bar's volume is more than the last 20 bars volume average. How much more - that multiplier is also configurable. (default is 1)
3. The breakout candle is bullish (green) or bearish (red).
E ntry :
All of these happens only on the closing of the candle . Means: Non Repainting! .
Clearly in the chart we are showing as green up arrow BO (breakout for buy) and red down arrow BD (breakdown for sell) to take your decision process smooth.
So, on the closing of the decision BO/BD candle we are entering the trade (with a thumping heart and nail biting ...)
S top Loss :
We are relying on the time tasted (last 40 years) mechanism of Average True Range (ATR) of default 14 period. This default period is also configurable.
So for Long trades: the 14 period ATR low band is the SL.
For Short trades: the 14 period ATR high band is the SL.
T arget :
We are depending on the thump rule of 1:2 Risk Reward. It's simple and effective. No fancy thing. We are closing the trade on double the favorable price movement compared to the SL placed. Of course, this RR ratio is confiurable from the settings, as usual.
What's Unqiue in it?
The utter simplicity of this trading mechanism. No fancy things like complex chart pattern, OI data, multiple candlestick patterns, Order flow analysis etc.
Simple level determination,
Marking clearly in the chart.
Making each parameter configurable in Settings and showing tooltip adjacent to the parameter to make you understand it better for your customization,
Wait for the candle close, thus eliminating the chances of repainting menace (as much as possible)
Additional momentum and volume check to trade entry confirmation.
Works with normal candlestick (nothing special ones like HA ...)
Showing everything as a Summary Table (which, again can be turned off optionally) overlaying at the bottom-right corner of the chart,
Optionally the Summary Table can be configured to alert you back (say you get it notified in your email or SMS).
That way, a single, simple, effective trade setup will ease your journey as smooth sail as possible.
Mentions
There are plenty of friends from whom time to time we borrowed some of the ideas while working closely together over last one year.
From tradingview community, we took the spirit of @zzzcrypto123 awesome work done long back (in 2020) as the indicator "ORB - Opening Range Breakout". (We tried to reach him for his explicit consent, unable to catch hold of him).
Some other publicly available materials we have consulted to get the additional checks (like RSI, volume).
Lat word
Use it please and thank you for your constant patronage in following us in this awesome platform. Let's keep growing together.
Disclaimer :
This piece of software does not come up with any warrantee or any rights of not changing it over the future course of time.
We are not responsible for any trading/investment decision you are taking out of the outcome of this indicator.
Day Trading Booster by DGTTiming when day trading can be everything
In Stock markets typically more volatility (or price activity) occurs at market opening and closings
When it comes to Forex (foreign exchange market), the world’s most traded market, unlike other financial markets, there is no centralized marketplace, currencies trade over the counter in whatever market is open at that time, where time becomes of more importance and key to get better trading opportunities. There are four major forex trading sessions, which are Sydney , Tokyo , London and New York sessions
Forex market is traded 24 hours a day, 5 days a week across by banks, institutions and individual traders worldwide, but that doesn’t mean it’s always active the entire day. It may be very difficult time trying to make money when the market doesn’t move at all. The busiest times with highest trading volume occurs during the overlap of the London and New York trading sessions, because U.S. dollar (USD) and the Euro (EUR) are the two most popular currencies traded. Typically most of the trading activity for a specific currency pair will occur when the trading sessions of the individual currencies overlap. For example, Australian Dollar (AUD) and Japanese Yen (JPY) will experience a higher trading volume when both Sydney and Tokyo sessions are open
There is one influence that impacts Forex matkets and should not be forgotten : the release of the significant news and reports. When a major announcement is made regarding economic data, currency can lose or gain value within a matter of seconds
Cryptocurrency markets on the other hand remain open 24/7, even during public holidays
Until 2021, the Asian impact was so significant in Cryptocurrency markets but recent reasearch reports shows that those patterns have changed and the correlation with the U.S. trading hours is becoming a clear evolving trend.
Unlike any other market Crypto doesn’t rest on weekends, there’s a drop-off in participation and yet algorithmic trading bots and market makers (or liquidity providers) can create a high volume of activity. Never trust the weekend’ is a good thing to remind yourself
One more factor that needs to be taken into accout is Blockchain transaction fees, which are responsive to network congestion and can change dramatically from one hour to the next
In general, Cryptocurrency markets are highly volatile, which means that the price of a coin can change dramatically over a short time period in either direction
The Bottom Line
The more traders trading, the higher the trading volume, and the more active the market. The more active the market, the higher the liquidity (availability of counterparties at any given time to exit or enter a trade), hence the tighter the spreads (the difference between ask and bid price) and the less slippage (the difference between the expected fill price and the actual fill price) - in a nutshell, yield to many good trading opportunities and better order execution (a process of filling the requested buy or sell order)
The best time to trade is when the market is the most active and therefore has the largest trading volume, trading all day long will not only deplete a trader's reserves quickly, but it can burn out even the most persistent trader. Knowing when the markets are more active will give traders peace of mind, that opportunities are not slipping away when they take their eyes off the markets or need to get a few hours of sleep
What does the Day Trading Booster do?
Day Trading Booster is designed ;
- to assist in determining market peak times, the times where better trading opportunities may arise
- to assist in determining the probable trading opportunities
- to help traders create their own strategies. An example strategy of when to trade or not is presented below
For Forex markets specifically includes
- Opening channel of Asian session, Europien session or both
- Opening price, opening range (5m or 15m) and day (session) range of the major trading center sessions, including Frankfurt
- A tabular view of the major forex markets oppening/closing hours, with a countdown timer
- A graphical presentation of typically traded volume and various forext markets oppening/clossing events (not only the major markets but many other around the world)
For All type of markets Day Trading Booster plots
- Day (Session) Open, 5m, 15m or 1h Opening Range
- Day (Session) Referance Levels, based on Average True Range (ATR) or Previous Day (Session) Range (PH - PL)
- Week and Month Open
Day Trading Booster also includes some of the day trader's preffered indicaotrs, such as ;
- VWAP - A custom interpretaion of VWAP is presented here with Auto, Interactive and Manual anchoring options.
- Pivot High/Low detection - Another custom interpretation of Pivot Points High Low indicator.
- A Moving Average with option to choose among SMA, EMA, WMA and HMA
An example strategy - Channel Bearkout Strategy
When day trading a trader usually monitors/analyzes lower timeframe charts and from time to time may loose insight of what really happens on the market from higher time porspective. Do not to forget to look at the larger time frame (than the one chosen to trade with) which gives the bigger picture of market price movements and thus helps to clearly define the trend
Disclaimer : Trading success is all about following your trading strategy and the indicators should fit within your trading strategy, and not to be traded upon solely
The script is for informational and educational purposes only. Use of the script does not constitutes professional and/or financial advice. You alone the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold dgtrd TradingView user liable for any possible claim for damages arising from any decision you make based on use of the script
Ultimate Strategy Template (Advanced Edition)Hello traders
This script is an upgraded version of that one below
New features
- Upgraded to Pinescript version 5
- Added the exit SL/TP now in real-time
- Added text fields for the alerts - easier to send the commands to your trading bots
Step 1: Create your connector
Adapt your indicator with only 2 lines of code and then connect it to this strategy template.
For doing so:
1) Find in your indicator where are the conditions printing the long/buy and short/sell signals.
2) Create an additional plot as below
I'm giving an example with a Two moving averages cross.
Please replicate the same methodology for your indicator wether it's a MACD , ZigZag , Pivots , higher-highs, lower-lows or whatever indicator with clear buy and sell conditions.
//@version=5
indicator(title='Moving Average Cross', shorttitle='Moving Average Cross', overlay=true, precision=6, max_labels_count=500, max_lines_count=500)
type_ma1 = input.string(title='MA1 type', defval='SMA', options= )
length_ma1 = input(10, title=' MA1 length')
type_ma2 = input.string(title='MA2 type', defval='SMA', options= )
length_ma2 = input(100, title=' MA2 length')
// MA
f_ma(smoothing, src, length) =>
rma_1 = ta.rma(src, length)
sma_1 = ta.sma(src, length)
ema_1 = ta.ema(src, length)
iff_1 = smoothing == 'EMA' ? ema_1 : src
iff_2 = smoothing == 'SMA' ? sma_1 : iff_1
smoothing == 'RMA' ? rma_1 : iff_2
MA1 = f_ma(type_ma1, close, length_ma1)
MA2 = f_ma(type_ma2, close, length_ma2)
// buy and sell conditions
buy = ta.crossover(MA1, MA2)
sell = ta.crossunder(MA1, MA2)
plot(MA1, color=color.new(color.green, 0), title='Plot MA1', linewidth=3)
plot(MA2, color=color.new(color.red, 0), title='Plot MA2', linewidth=3)
plotshape(buy, title='LONG SIGNAL', style=shape.circle, location=location.belowbar, color=color.new(color.green, 0), size=size.normal)
plotshape(sell, title='SHORT SIGNAL', style=shape.circle, location=location.abovebar, color=color.new(color.red, 0), size=size.normal)
/////////////////////////// SIGNAL FOR STRATEGY /////////////////////////
Signal = buy ? 1 : sell ? -1 : 0
plot(Signal, title='🔌Connector🔌', display = display.data_window)
Basically, I identified my buy, sell conditions in the code and added this at the bottom of my indicator code
Signal = buy ? 1 : sell ? -1 : 0
plot(Signal, title="🔌Connector🔌", transp=100)
Important Notes
🔥 The Strategy Template expects the value to be exactly 1 for the bullish signal, and -1 for the bearish signal
Now you can connect your indicator to the Strategy Template using the method below or that one
Step 2: Connect the connector
1) Add your updated indicator to a TradingView chart
2) Add the Strategy Template as well to the SAME chart
3) Open the Strategy Template settings and in the Data Source field select your 🔌Connector🔌 (which comes from your indicator)
From then, you should start seeing the signals and plenty of other stuff on your chart
🔥 Note that whenever you'll update your indicator values, the strategy statistics and visual on your chart will update in real-time
Settings
- Color Candles: Color the candles based on the trade state ( bullish , bearish , neutral)
- Close positions at market at the end of each session: useful for everything but cryptocurrencies
- Session time ranges: Take the signals from a starting time to an ending time
- Close Direction: Choose to close only the longs, shorts, or both
- Date Filter: Take the signals from a starting date to an ending date
- Set the maximum losing streak length with an input
- Set the maximum winning streak length with an input
- Set the maximum consecutive days with a loss
- Set the maximum drawdown (in % of strategy equity)
- Set the maximum intraday loss in percentage
- Limit the number of trades per day
- Limit the number of trades per week
- Stop-loss: None or Percentage or Trailing Stop Percentage or ATR - I'll add shortly multiple options for the trailing stop loss
- Take-Profit: None or Percentage or ATR - I'll add also a trailing take profit
- Risk-Reward based on ATR multiple for the Stop-Loss and Take-Profit
Special Thanks
Special thanks to @JosKodify as I borrowed a few risk management snippets from his website: kodify.net
Best
Dave
Multi PivotsThis script is meant for day traders. It's based on the CPR concepts. The pivots plots based on the timeframe, means less that 15minuts it will plot daily pivots, less that daily tf, it plots weekly and then monthly. It also includes Camarillas, ADR levels, Fibonacci levels based on last 500 candles, Fib pivots, Pivot zones, developing pivot, Vwap, Dashboard shows RSI,ADX,Vwap,SuperTrend and day price difference. Options available to plot Day HighLow, Initial Balance levels as well. There is option to show running CPR which highlights virgin CPR. It can plot next day pivots as well
I dont own any of codes or ideas in the script. Codes are taken from different scripts and altered based on the requirements. Kudos to all the great pinecoders who provided their codes as public which helps everyone. Thanks
Tunable SWMADissected the standard SWMA function and added options for user to change just about every part of it. Weights ,Lookback ,Source can all be changed in the settings.
Green is the standard SWMA, Using the Input value selected.(MAs/LRC/VWAP)
Red is the tuned SWMA, with the option of applying a final Output filter (MAs/LRC/VWAP). Uses 8 datapoints instead of 4 for the default.
Customization can really help expand upon the standard SWMA I find. Enjoy tuning to your hearts content
Convert ETF to Futures/IndexThis indicator is used to automatically map an ETF's VWAP and 10 levels above and below the strike of your choice, to the futures or index instrument currently being viewed/traded. This works very well when using both SPY to ES/MES/SPX or QQQ to NQ/MNQ/NDX to plot the ETF strikes and can lead to some incredible trades, especially when trading level to level. Since SPY, QQQ, IWM, and DIA have the same price action as their futures iteration, there seems to be a direct correlation between their levels and VWAP . This indicator is made to easily map these key levels to the appropriate futures instrument. If you have a way to measure GEX centered around a certain level, I recommend color coding the lines to help indicate whether the level will have strong positive or negative gamma hedging associated with it.
Chart CAGR█ OVERVIEW
This simple script displays in the lower-right corner of the chart the Growth Rate and the Compound Annual Growth Rate (CAGR) between the open of the chart's first visible bar and the close of its last bar. As you zoom/scroll the chart, calculations will adjust to the chart's bars. You can change the location and colors of the displayed text in the script's settings.
If you need to calculate the CAGR between any two points on the chart, see our CAGR Custom Range indicator.
█ FOR Pine Script™ CODERS
Like our Chart VWAP publication, this script calculates on the range of visible bars utilizing the new Pine Script™ functions announced here and the VisibleChart library by PineCoders . It also uses the `cagr()` function from our ta library, which was recently augmented with many new functions.
Look first. Then leap.
Moving Averages RefurbishedIntroduction
This is a collection of multiple moving averages, where you can have a rainbow of moving averages with different types that can be defined by the user.
There are already other indicators in this rainbow style, however certain averages are absent in certain indicators and present in others,
needing the merge to have a more complete solution.
Resources
Here there is the possibility to individually define each moving average.
In addition, it is possible to adjust some details, such as themes, coloring and periods.
Regarding the calculation of averages, credit goes to the following authors.
What I've done here is to group these averages together and allow them to combine.
Credits
TradingView
PineCoders
CrackingCryptocurrency
MightyZinger
Alex Orekhov (everget)
alexgrover
paragjyoti2012
Moving averages available
1. Exponential Moving Average
2. Simple Moving Average
3. Relative Moving Average
4. Weighted Moving Average
5. Ehlers Dynamic Smoothed Moving Average
6. Double Exponential Moving Average
7. Triple Exponential Moving Average
8. Smoothed Moving Average
9. Hull Moving Average
10. Fractal Adaptive Moving Average
11. Kaufman's Adaptive Moving Average
12. Volatility Adjusted Moving Average
13. Jurik Moving Average
14. Optimized Exponential Moving Average
15. Exponential Hull Moving Average
16. Arnaud Legoux Moving Average
17. Coefficient of Variation Weighted Exponential Moving Average
18. Coefficient of Variation Weighted Moving Average
19. * Ehlrs Modified Fractal Adaptive Moving Average
20. Exponential Triangular Moving Average
21. Least Squares Moving Average
22. RSI Moving average
23. Simple Triangular Moving Average
24. Triple Hull Moving Average
25. Variable Index Dynamic Average
26. Volume-weighted Moving Average
27. Zero-Lag Exponential Moving Average
28. Zero-Lag Simple Moving Average
29. Elastic Volume Weighted Moving Average
30. Tillson T3
31. Geometric Moving Average
32. Welles Wilder Moving Average
33. Adjusted Moving Average
34. Corrective Moving average
35. Exponentially Deviating Moving Average
36. EMA Range
37. Sine-Weighted Moving Average
38. Adaptive Moving Average TABLE
39. Following Adaptive Moving Average
40. Hilbert based Kaufman's Adaptive Moving Average
41. Median
42. * VWAP
43. * Rolling VWAP
44. Triangular Simple Moving Average
45. Triangular Exponential Moving Average
46. Moving Average Price Correlation
47. Regularized Exponential Moving Average
48. Repulsion Moving Average
49. * Symmetrically Weighted Moving Average
* fixed period averages
pickle financialversion 1.0
A multi-use indicator
FEATURES:
1) Robust VWAP with up to 3 deviations that can be adjusted for Session, Week, Month, Quarter, Year, Decade, Century, Earnings , Dividend, & Split intervals
2) 20 customizable Moving Averages that can be changed to EMAs, SMAs , WMAs, SMMAs, and VWMAs; can also be adjusted to Candle Closes, Highs, Lows, Opens, HLC3, HL2 , OHLC4, & HLCC4
-Praise be lady VWAP
SPY to ES / MESSPY to ES is an indicator that converts SPY price targets to ES / MES futures price targets.
This indicator is helpful when you have price targets for SPY but trade ES or MES futures instead of SPY. It coverts the SPY price targets to ES / MES futures, and draws the SPY VWAP line on your ES / MES chart.
It supports the following lines
Bullish Above
Bearish Below
Long PT1
Long PT2
Long PT3
Short PT1
Short PT2
Short PT3
It also converts the SPY VWAP to it's current ES / MES value.
Note: The conversion do not work during pre and after market and the lines are only correct during market hours.
All-in-one CPR indicator Introduction and Acknowledgement:
The script is basically a mashup script and provides a combined functionality of various indicators. I'll explain the usefulness and the optimal usage of the script after giving the credits where it is due. A CPR indicator for visually identifying the trend along with the strength of the trend is NOT available in the public library of TradingView. Hence, the need of this indicator.
The credit of creating the original indicators remain unknown to me but I would like to acknowledge the authors whose formulae and codes I have used for creating this mashup indicator.
- Frank Ochoa
- Guruprasad Meduri
- Rafael Zioni
- Stoked Stocks
- Pine team for default indicators
The prime focus of the script is identifying and simplifying the 2 main aspects of a trend:
1. Direction / Underlying trend
2. Strength of the trend
Flaws in traditional CPR:
Some may see this as a flaw, some may not. So take my opinion with a grain of salt. In general, the traditional CPR indicator is used to plot just support and resistance levels, and the trend identification is purely discretionary. In addition to this, there is no way to assess the strength of the move without using a dedicated volumed based indicator. This causes amateur traders to take counter trades to the market direction.
What is the need of this hybrid indicator?
A CPR indicator that also aids in visually identifying the trend and the strength of the trend with respect to the price action in NOT available in the public library of TradingView. The traditional CPR can be used to assess the rough direction of the market but if it combined with the Hull ribbon, the probability of identifying the trend increases manifold. Hence, I decided to create this mashup indicator.
In addition to the basic CPR pivots, the script provides the functionality of the following indicators:
1. HMA based trend ribbons with auto buy/sell signals
2. Volatility based bands - Bollinger bands, Keltner channel, Donchian channel, envelope.
3. Coloured volume candles to determine the strength of the trend
4. CPR with daily, weekly, and monthly levels
5. Previous day high/low
6. Tomorrow CPR
7. 3 Simple moving averages
8. Volume Weighted Average Price (VWAP)
Correct usage of the indicator:
The optimal usage of the indicators consists of mainly 2 parts:
1. Identification of the trend using the combination of CPR and Hull ribbon
2. Determining the strength of the trend
How to identify the trend?
In general, when the price is above CPR it is considered a bullish trend. Also, when the price is above the Hull ribbon, it is considered bullish. Reverse is true for a bearish trend. Combining the traditional CPR logic with the Hull trend ribbon, we can conclude that:
1. Bullish trend = Price above CPR and above the Hull ribbon
2. Bearish trend = Price below CPR and below the Hull ribbon
If the Hull ribbon is showing a zig-zag move, the trend will be sideways. Also, the time frame of the Hull ribbon can be defined as per the need of the user.
Exhibit: Identification of a bullish trend
Exhibit: Identification of a bullish trend with a contra move (pullback)
Exhibit: Identification of a bearish trend
Exhibit: Identification of a bearish trend with a contra move (pullback)
How to determine the strength of the trend?
1. Strong trend = The dark coloured candles represent volume more than 150% of the look back period. For instance
2. Moderate trend = The bright coloured candles represent volume between 50-150%.
3. Neutral trend = The Grey coloured candles represent a weak trend where the volume is less than 50%.
Exhibit: Identification of a strong bearish trend along with the trend direction
Exhibit: Identification of a strong bullish trend using only coloured candles
All the other indicators including the SMA, VWAP, Bollinger bands, Keltner channels, etc. can be used as per the taste of the trader.
Thanks for reading! I hope you find this indicator useful.
Happy learning. Cheers!
Rajat Kumar Singh (@johntradingwick)
Community Manager (India), TradingView
[CBB] Volatility Squeeze ToyThe main concept and features of this script are adapted from Mark Whistler's book "Volatility Illuminated". I have deviated from the use cases and strategies presented in the book, but the 3 Bollinger Bands use his optimized settings as the default length and standard deviation multiplier. Further insights into Mark's concepts and volatility research were gained by reading and watching some of TV user DadShark's materials (www.tradingview.com).
This script has been through many refinements and feature cycles, and I've added unrelated complimentary features not present in the book. The indicator is better studied than described, and unless you have read the book, any short summary of the material will just make you squint and think about the wrong things.
Here is a limited outline of features and concepts:
1. 3 Bollinger Bands of different length and/or deviation multiplier. Perhaps think of them as representing the various time frames that compression and expansion cycles and events manifest in, and also the expression of range, speed and price distribution within those time frames. You can gain insight into the magnitude of events based on how the three bands interact and stay contained, or not. If volatility is significant enough, all "time frames" represented by the bands will eventually record the event and subsequent price action, but the early signals will come from the spasms of the shortest, most volatile band. Many times the short band will contract again before, or just as it reaches a longer band, but in extreme cases, volatility will explode and all bands at all time frames will erupt in succession. In these cases you will see additional color representing shorter bands (lower time frame volatility in concept) traveling outside of longer bands. It is worth taking a look at the price levels and candles where these volatility bands cross each other.
2. In addition to the mean of the bands, there are a variety of other moving averages available to gauge trend, range, and areas of interest. This is accomplished with variable VWAP, ATR, smoothing, and a special derived loosely from the difference between them.
3. The bands are also used to derive conditions under which volatility is considered compressed, or in "squeeze" . Under these conditions the candles will turn yellow. Depending on your chart settings and indicator settings, these zones can be completely useless or drag on through fairly significant price action. Or, the can give you fantastic levels to watch for breakouts. The point is that volatility is compressed during these conditions, and you should expect the inevitable once this condition ends. Sometimes you can find yourself in a nice fat trend straight away, other times you may blow an account because you gorged your position based on arbitrary bar color. It's not like that. Pay attention to the highest and lowest bars of these squeeze ranges, and carefully observe future price action when it returns to these squeeze ranges. This info is more and more valuable at higher time frames.
The 3 bands, a smoothed long trend VWAP, and the squeeze condition colored bars are all active by default. All features can be shown or hidden on the control panel.
There are some deep market insights to mine if you live with this one for a while. As with any indicator, blunt "buy/sell here" approaches will lead to loss and frustration. however , if you pay attention to squeeze range, band/moving average confluence, high volume and/or large range candles their open/close behavior around these areas and squeeze ranges, you will start to catch the beginning of some powerful momentum moves.
Enjoy!
Per Volume Price ImpactLiquidity, Information and Market Timing
* Market Liquidity
The term liquidity can refer to many things in finance. In this article, we will limit the scope of discussion to the market’s ability to transact without incurring a significant increase in volatility.
As we know, liquidity and volatility have an inversed relationship — the more ample the liquidity, the lower the volatility (attributed to transaction cost, price movement and, so on). With this understanding, we can say large movements in the market are driven by low liquidity. This does not seem to make sense because the markets are huge, how can it possibly be illiquid? Now, this has to do with how the market operates and how exchanges occur (This topic concerns the area of market microstructure).
* Order Book & the Trading Process
So how does a transaction actually occur in the market? Let’s assume we open a position with a market order. In this case, you will get the price on your quote board if there are enough units of assets people are willing to sell at that price. If there are not enough units, you will buy from the second-best price and so on until your order is filled. Now in the second case, as the order is being filled, the change in price is recorded. Therefore, if someone wishes to move the market, theoretically, they just need to buy up or sell up but it is problematic to do so.
Here is why:
while dry up the liquidity can make huge moves, it is inefficient to do so.
it takes a lot of money to do that
your position will be exposed, someone more resourceful than you may go against you and that is a huge risk
market manipulation charges
when you open a position, the entry price of the position is essentially a VWAP (volume-weighted average price). If you attempt to move the market and open a buy position at the same time, you will have a higher VWAP, eating into your own profit.
I think these reasons are sufficient in establishing why opening a position and drying up liquidity to profit is a dumb idea. But of course, the institutions are not stupid, the alternative is to enter your position first then move the market.
To measure liquidity one of the tools people use is the order book. It can offer an overview of the sentiment (by looking at the orders and changes in volume) and how people are positioned (if the broker offers such data). In my opinion, open interest is a much better tool than order as it records the transactions that have occurred, hence less prone to manipulations (google: “Navinder Singh Sarao”, the trader who used fake orders to manipulate algorithms to crash the market).
But to quantify the order book is so much work as well (there are ways, just difficult), what we can do is to make things simpler.
* Quantify Market Impact
We know price and volume reflect information, while the past technical information has no predictive power per semi-strong form of EMH, empirical studies have often tested this theory over a longer time horizon. In our case, precisely due to the mechanism of exchange and human behavior (The lack of incentive to move the market right away) we can, in the very short term (often intraday), foresee if the market is going to move or not. Back to the very definition of liquidity being the ability to transact without moving the market significantly, we can take this definition and quantify it with this formula:
Market Impact = (High — Low) / Volume
Why specifically “high — low”, because that’s the complete information in that moment and it is corresponding to the volume. A little crude but it is the simplest form.
A few things to take note of here:
We can only know the complete picture once the candle is complete. This is fine in most markets because it takes time to gather money and orders.
We often see high liquidity during certain time of the day, for example, when the market opens and so on. As a result, we need to take some scientific approaches to transform the data.
Now, this looks much better. To interpret this graph, the lower the value, the lower the market impact, the deeper the liquidity.
* Generate Tradable Insights
To generate trade ideas isn’t a difficult task, we all know the RSI, MOM, STOC, etc. all the indicators attempt to draw boundaries, and we can do the same but we need to be a little more advanced and critical.
step 1: we first need to normalize the data. To do that we will take the log of the values to make the skewed distribution normal. The result isn’t ideal if you zoom out but I think this is decent enough to work with. Here is
This is still not a stationary time series, but it looks stable enough and it mean-reverts. So we turn to our lovely standard deviation bands for help.
Step 2: Because this is not a stationary process (visually, you can test it statistically if you wish), we cannot just take sample mean and SD and also because we want to show off our data skills, so we turn to move averages and regressions. I’m going to use moving regression here because I think it is better (mean can be distorted by large values by a larger margin and it lags)
I’m using the moving regression band on TradingView and 1.5 SD here for convenience, you can try to optimize the parameters with codes or other regression models if you wish. But I think it is more important to understand the rationale here.
This step is essentially trying to figure out the anomalies in liquidity so that we can see when there is deep liquidity. This is also why choosing the parameter is crucial because you are essentially approximating how much informed trading is taking place (This is a concept in market microstructure for brokerages to set their spreads but it is not a good tool in a liquid market). By setting the level at 1.5 we are assuming about 86% of the time the market is in what we consider a normal liquid state. (again it is arbitrary, but based on the 68–95–99.7 rule of normal distribution). The rest of the time will be either low or high liquidity, When liquidity is deep, it perhaps, signals institutional money is pouring into the market and big moves may follow.
* Conclusion
There you have it, how to enter the market with the big bucks. But do take note there are plenty of assumptions and a lot to improve on here.
BUY/SELL SIGNALS from LSMA/ALMA/HMAThis indicator uses the Least Squares Moving Average (LSMA) in tandem with the Arnaud Legoux Moving Average (ALMA) and Hull Moving Average (HMA) to generate buy-sell signals, represented by the light blue and orange crosses respectively.
The yellow lines produced by the indicator show periods of market uncertainty and possible reversal, and a modified, user-defined VWAP is given along with a 200 EMA. The point of this indicator was to create a smoother, more visually appealing moving-average, price action-based indicator when compared to the trend-step and simple moving average indicators available. This indicator uses a fast (25 period) LSMA coupled with a slower (50 period) HMA and ALMA in order to make signals both smooth and fast.
This indicator will work on all markets, except the modified VWAP will naturally not function if the volume is unpublished for that market. Use of this indicator will be very strong in trending markets, as the yellow line will spot possible reversals quite early, meaning the trader can be ready early for the buy/sell signal to appear. Use of this indicator in sideways market conditions will be limited, as it is for all moving average-based indicators, but the damage will be minimal as bad trades will be quickly realized by the indicator and the color will switch to yellow, this is possible because of the settings differences between the period lengths of the LSMA vs the ALMA + HMA.
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
LPB MicroCycles StrategyWhat it is:
We use the Hodrick-Prescott filter applied to the closing price, and then take the outputted trendline and apply a custom vwap, the time frame of which is based on user input, not the default 1 day vwap . Then we go long if the value 2 bars ago is greater then one bar ago. We sell and color the bars and lines when the if the value of 2 bars ago is less than one bar ago.
Also included:
GUI for backtesting
ATR Based Stop Loss
How to use:
Go long when the indicators suggest it, and use the stop losses to reduce risk.
Best if paired with a volatility measurement (inside candles, average true range , bollingerband%B)
Cumulative AreaJust a short little script that gives the net area of an oscillator going back n bars. Feel free to play around with it.
To use with Market Cipher VWAP, make sure to go into the input settings and change the input "close" to "Market Cipher B: VWAP"
next add it to the same pane as your market cipher B, and lock the axis together.
Intended for use with MC, but could undoubtedly be used with others.
GANN Square Of 9 PivotsGANN Square Of 9 Pivots
How to use for Intraday ?
Method 01 (From 9:05 am to 9:15 am or pre-open market)
Take the Weighted Average Price or Volume Weighted Average Price (VWAP) or Time Weighted Average Price (TWAP) of any stock or index.
You can use TWAP for Index as volume is not available.
Method 02 (From 9:05 am to 9:15 am or pre-open market)
Take the Last Traded Price (LTP) of index or stock
Method 03 (After 9:30 am or after 1st 15 min)
Only take Last Traded Price (LTP) of stock or index
Ideal Time
15min to 1hr after market opens
Indicator Features
Lines
Gray Dashed Line: Calculation Price
Teal Solid Line: Long Above
Red Solid Line: Short Below
3 Teal Dotted Lines: Bullish Targets 1, 2 & 3
3 Red Dotted Lines: Bearish Targets 1, 2 & 3
Labels
1st Numbers: Price
2nd Numbers in (): % change from LTP to that Level
For Index
As VWAP is not available for Index, TWAP (Time Weighted Average Price) values can be used for Index.
Custom Price Inputs
Price of your choice can be given manually by selecting:
Source > Custom
Enter Price > (type the price)
Timeframe
Higher timeframes like Weekly, Monthly can be changed using Timeframe Option
For More Reading
Reading: traderji.com/community/threads/intraday-trading-using-gann-calculator.39185/#post-419677
Calculator: stockmaniacs.net/freebies/free-tools/gann-square-of-9-calculator/