EMAC - Exponential Moving Average Cross - OptimizedEMAC - Exponential Moving Average Cross - Optimized
This is the full Strategy version with the best currently known optimized inputs with the average best settings across the following 26 tickers:
QQQ
TQQQ
SPY
SPXL
AAPL
AMZN
TSLA
BYND
CRWD
DDOG
ESTC
FSLY
MDB
NVDA
PINS
PTON
ROKU
SHOP
SQ
TDOC
TWLO
APPS
CHWY
DKNG
ETSY
FVRR
For the short Study version of EMAC that has been optimized for TradersPost alerts only please see EMAC - Exponential Moving Average Cross - Study
For the original full Strategy version with many editable inputs please see EMAC - Exponential Moving Average Cross
Trendtrading
EMAC - Exponential Moving Average CrossEMAC - Exponential Moving Average Cross
This strategy is based in part on original 10ema Basic Swing Trade Strategy by Matt Delong: www.tradingview.com
Link to original 10ema Basic Swing Trade Strategy:
This is the Original EMAC - Exponential Moving Average Cross strategy built as a class for reallifetrading dot com and so has all the default settings and has not been optimized. I would not recommend using this strategy with the default settings and is for educational purposes only. For the fully optimized version please come back around the same time tomorrow 6/16/21 for the EMAC - Exponential Moving Average Cross - Optimized
If you have any questions feel free to reach out to me with a comment and I will try to get back to you quickly with a reply.
Breakout FinderHelo All,
I got many requests for a Breakout script and here it's. This script searches the breakouts/breakdowns and draw square if there is one.
The options:
"Period" is used to find Pivot Points
"Max Breakout Length" is the maximum length to search breakouts
"Threshold Rate %" is channel width of the breakout area. calculated using highest/lowest of last 300 bars.
"Minimum Number of Tests" is the minimum number of tests that the Price tried to break the S/R level
and some options for coloring and linestyle
Lets see some examples:
in this example "Minimum Number of Tests" is 2 so the Price must have tested to break resistance area 2 times and then it breaks it as seen in the screenshot:
in following example Threshold rate is %10, so the channel width is very big:
as you can see in followinf screenshot you can choose different colors and line styles:
Alerts added ;)
Enjoy!
Awesome Heikin Ashi [Morty]This indicator uses Heikin Ashi candles and two EMAs to help you follow the trend and enter the trade. Heikin Ashi candles help to smooth the price and EMAs are used to detect trend. The default parameter of EMA is EMA10 and EMA20. You can use it at any timeframe. You should always adjust the EMA length according to different timeframes.
Features:
- Highlight background based on two EMAs
- Adjustable EMA length
- Adjustable Label size
- Show entry and exit signal labels
- Show stoploss price
- You can choose Long only or Short only or both signals
- Alert functions for notification
NOTE: If you use this signal to enter a trade, make sure the candle is close and enter in the next candle.
Relative Difference Of Squares Oscillator [CC]The Relative Difference Of Squares Oscillator was created by Marco Alves (Stocks and Commodities Aug 2020 pg 10) and this is a heavily customized version of his indicator that works for single stocks instead of the entire market. I have included extra buy and sell signals to account for strong signals vs normal signals based on some user feedback I got. Buy when the line turns green and sell when it turns red. Keep in mind that this is a lagging indicator so good for trend confirmation.
Let me know if there are any other scripts you would like to see me publish!
Ehlers NonLinear Filter [CC]The NonLinear Filter was created by John Ehlers and this one of his more unknown filters that work very well as a trendline and moving average. This is one of my favorites along with the instantenous trendlines that he created. Buy when the line turns green and sell when it turns red.
Let me know if there are any other indicators you would like to see me publish scripts for!
Indicator PanelHello All,
This script shows Indicator panel in a Table. Table.new() is a new feature and released today! Thanks a lot to Pine Team to add this new great feature! This new feature is a game changer!
The script shows indicator values for each symbol and changes background color of each cell by using current and last values of the indicators for each symbol. if current value is greater than last value then backgroung color is green, if lower than last value then red, if they are equals then gray.
You can choose the indicators to display. Number of columns in the table is dynamic and is changed by number of the indicators.
You can choose 5 different Symbols, 6 Indicators and 2 Simple or Exponential Moving averages, you can set type of moving averages and the lengths. You can also set the lengths for each Indicators.
Indicators:
- RSI
- MACD ( MACD and Signal and Histogram )
- DMI ( +DI and -DI + and ADX )
- CCI
- MFI
- Momentum
- MA with Length 50 (length can be set)
- MA with Length 200 (length can be set)
In this example RSI, MACD and MA 200 were chosen, you can see how table size changes dynamically:
Enjoy!
Gann HiLo Activator [CC]The HiLo Activator was created by W.D. Gann and I was surprised to not see more of his technical indicators on here. I will start adding more of his indicators on here if I get more interest. This is the original version of the indicator that performs like a trailing stop that also works well as a trend line. Buy when the line turns green and sell when it turns red.
Let me know if there are any other indicators you want me to publish!
LTB Zigzag CirclesHello All,
Today I am here with a new idea and script, " LTB Zigzag Circles ". The idea is to create Circles using last 2 zigzag waves and to catch the breakouts earlier than horizontal lines. if a circle is broken then the script shows entry for Long/Short positions. and if broken circle reappears again then the position is closed. You can change Zigzag period as you wish and see the different results.
Here you can see how the script calculates and draws the Circles:
Below you can see how the script draws part of the circle on each bar:
Optionally the script can show levels:
P.S. I haven't tested it as a strategy, Result and Performance may change by Zigzag period, you need to find best Zigzag period according to your strategy. By the way, my Zigzag Circles idea can be improved, if you have any recommendation let me know please ;)
Enjoy!
Trend Persistence Rate Indicator [CC]The Trend Persistence Rate Indicator was created by Richard Poster (Stocks and Commodities Feb 2021 pg 12) and this indicator is a good trend strength indicator similar to ADX. A good strategy with this indicator according to the author is to combine this with a moving average crossover strategy and a volatility indicator. Buy when the price crosses over the moving average and when the volatility and this indicator are over a selected minimum. I think 30-40 as a minimum for this indicator works well. Exit that position when this indicator peaks and starts to go down and it should be very profitable for you. I have included general buy and sell signals with this indicator as well.
Let me know if there are any other indicators you would like to see me publish!
Ehlers FM Demodulator Indicator [CC]The FM Demodulator Indicator was created by John Ehlers (Stocks and Commodities May 2021 pg 14) and this indicator was created to accurately time any price variations which I think it does a great job. It is smoothed by default with his super smoother but feel free to substitute your own and try different combos. Buy when the line turns green and sell when it turns red.
Let me know if there are any other indicators you would like to see me publish!
Adjustable MA & Alternating Extremities [LuxAlgo]Returns a moving average allowing the user to control the amount of lag as well as the amplitude of its overshoots thanks to a parametric kernel. The indicator displays alternating extremities and aims to provide potential points where price might reverse.
Due to user requests, we added the option to display the moving average as candles instead of a solid line.
Settings
Length: MA period, refers to the number of most recent data points to use for its calculation.
Mult: Multiplicative factor for each extremity.
As Smoothed Candles: Allows the user to show the MA as a series of candles instead of a solid line.
Show Alternating Extremities : Determines whether to display the alternating extremities or not.
Lag: Controls the amount of lag of the MA, with higher values returning a MA with more lag.
Overshoot: Controls the amplitude of the overshoots returned by the MA, with higher values increasing the amplitude of the overshoots.
Usage
Moving averages using parametric kernels allows users to have more control over characteristics such as lag or smoothness; this can greatly benefit the analyst. A moving average with reduced lag can be used as a leading moving average in a MA crossover system, while lag will benefit moving averages used as slow MA in a crossover system.
Increasing 'Lag' will increase smoothness while increasing 'overshoot' will reduce lag.
The following indicator puts more emphasis on its alternating extremities, an upper extremity will be shown once the high price crosses the upper extremity, while a low extremity will be shown once the low price crosses the lower extremity. These can be interpreted like extremities of a band indicator.
The MA using a length value of 200 with a multiplicative factor of 1.
In general, extremities will effectively return points where price might potentially bounce in ranging markets while closing prices under trending markets will often be found above an upper extremity and under a lower extremity.
Reducing the lag of the moving average allows the user to obtain a more timely estimate of the underlying trend in the price, with a better fit overall. This allows the user to obtain potentially pertinent extremities where price might reverse upon a break, even under trending markets.
In the above chart, the price initially breaks the upper extremity, however, we can observe that the upper extremity eventually reaches back the price, goes above it, provides a resistance, and effectively indicates a reversal.
Users can plot candles from the moving average, these are fairly similar to heikin-ashi candles in the sense that CandleOpen(t) ≠ CandleClose(t-1) , each point of the candle is calculated as follows for our indicator:
Open = Average between MA(t-1) and MA(t-2)
High = MA using the high price as input
Low = MA using the low price as input
Close = MA using the closing price as input
Details
Lag is defined as the effect of moving averages to reflect past price variations instead of new ones, lag can be observed by the user and is the main cause of false signals. Lag is proportional to the degree of filtering returned by the moving average.
Overshooting is a common effect encountered in non-lagging moving averages, and is defined as the tendency of a moving average to exceed a maximum level (or minimum level, which can be defined as undershooting )
MA and rolling maximum/minimum, both using a length of 50 bars. While we can think of lag as a cost of smoothness, we can think of overshooting as a cost for reduced lag on some occasions.
Explaining the kernel design behind our moving average requires understanding of the logic behind lag reduction in moving averages. This can prove to be complex for non informed users, but let's just focus on the simpler part; moving averages can be defined as a weighted sum between past prices and a set of coefficients (kernel).
MA(t) = b(0)C(t) + b(1)C(t-1) + b(2)C(t-2) + ... + b(n-1)C(t-n-1)
Where n is the period of the moving average. Lag is (non optimally) reduced by "underweighting" past prices - that is multiplying them by negative numbers.
The kernel used in our moving average is based on a modified sinewave. A weighted sum making use of a sinewave as a kernel would return an oscillator centered at 0. We can divide this sinewave by an increasing linear function in order to obtain a kernel allowing us to obtain a low lag moving average instead of a centered oscillator. This is the main idea in the design of the kernel used by our moving average.
The kernel equation of our moving average is:
sin(2πx^α)(1 - x^β)
With 1>x>0 , and where α controls the lag, while β controls the overshoot amplitude.
Using this equation we can obtain the following kernels:
Here only α is changed, while β is equal to 1. Values to the left would represent the coefficients for the most recent prices. Notice how the most significant coefficients are given to the oldest prices in the case where α increases.
Higher overshoot would require more negative values, this is controlled by β
Here only β is changed, while α is equal to 1. Notice how higher values return lower negative coefficients. This effectively increases the overshoots amplitude in our moving average. We can decrease α in order for these negative coefficients to underweight more recent values.
Using α = 0 allows us to simplify the kernel equation to:
1 - x^β
Using this kernel we can obtain more classical moving averages, this can be seen from the following results:
Using β = 1 allows us to obtain a linearly decreasing kernel (the one of a WMA), while increasing allows the kernel to converge toward a rectangular kernel (the one of SMA).
Trend Type Indicator by BobRivera990Usage:
The purpose of this indicator is to programmatically determine the type of price trend using technical analysis tools.
You can do a quick check on the asset’s higher and lower time frames. For example, if you are trading on an H1 chart, you can check the m5 chart to ensure that the trend is in the same direction and similarly check the H4 chart to ensure that the higher time frame price is also moving in the same direction.
If multiple time frame charts confirm a similar trend, then it is considered a very strong trend and ideal for Trend trading.
Remarks:
By default, the last status is related to 8 periods before the latest closing price.
Related definitions:
The three basic types of trends are up, down, and sideways.
1. Uptrend
An uptrend describes the price movement of a financial asset when the overall direction is upward. The uptrend is composed of higher swing lows and higher swing highs.
Some market participants ("long" trend traders) only choose to trade during uptrends.
2. Downtrend
A downtrend refers to the price action of a security that moves lower in price as it fluctuates over time.
The downtrend is composed of lower swing lows and lower swing highs.
3. Sideways
A sideways trend is the horizontal price movement that occurs when the forces of supply and demand are nearly equal. This typically occurs during a period of consolidation before the price continues a prior trend or reverses into a new trend.
How it works:
Step 1: Sideways Trend Detection
In this step we want to distinguish the sideways trend from uptrend and downtrend. For this purpose, we use two common technical analysis tools: ATR and ADX
1. Average True Range (ATR)
The average true range (ATR) is a technical analysis indicator that measures market volatility.
We also use a 20-period moving average of the ATR.
When the ATR is below the average of its last 20-periods, it means that the rate of price volatility has decreased and we conclude that the current trend is sideways
2. Average Directional Index (ADX)
The average directional index (ADX) is a technical analysis indicator used by some traders to determine the strength of a trend.
The trend has strength when ADX is above 25.
So when the ADX is less than or equal to 25, there is no strong trend, and we conclude that the current type of trend is sideways.
Step 2: Detect uptrend from downtrend
If it turns out that the current price trend is not sideways, then it is either uptrend or downtrend.
For this purpose, we use plus and minus directional Indicators (+ DI & -DI).
A general interpretation would be that during a strong trend, when +DI is higher than -DI, it is an uptrend. When -DI is higher than +DI, it is a downtrend.
Parameters:
"Use ATR …" ________________________// Use Average True Range (ATR) to detect Sideways Movements
"ATR Length"_______________________ // length of the Average True Range (ATR) used to detect Sideways Movements
"ATR Moving Average Type" ___________// Type of the moving average of the ATR used to detect Sideways Movements
"ATR MA Length" ____________________// length of the moving average of the ATR used to detect Sideways Movements
"Use ADX ..."_______________________ // Use Average Directional Index (ADX) to detect Sideways Movements
"ADX Smoothing”____________________// length of the Average Directional Index (ADX) used to detect Sideways Movements
"DI Length"_________________________// length of the Plus and Minus Directional Indicators (+DI & -DI) used to determine the direction of the trend
"ADX Limit" ________________________// A level of ADX used as the boundary between Trend Market and Sideways Market
"Smoothing Factor"__________________// Factor used for smoothing the oscillator
"Lag"______________________________// lag used to match indicator and chart
Resources:
www.investopedia.com
Momentum Rotation Indicator [CC]I have developed this custom indicator very loosely based on the Sector Rotation Model (Giorgos E. Siligardos. Technical Analysis of Stocks & Commodities, August 2012) and I called it the MRI because this is essentially a brain scan of any particular stock. This will not only tell you when a stock is breaking out over the market at large but also how the stock is doing compared to its own history. Buy when the line turns green and sell when the line turns red.
Let me know if there are any other indicators you would like to see me publish!
Donchian Channel StrategyRide the trend with full potential. Filter out false signals using long period ema. Lower bands take care of the stop loss.
Use this strategy for banknifty futures for consistent quarterly returns.
RSI Trend Indicator [paRSI]The Relative Strength Index ( RSI ) is a measurement used by traders to assess the price momentum. It is scaled from 0 to 100. when RSI reads below 30, it is usually interpreted as oversold and when RSI is above 70 it is usually interpreted as overbought. However, it is usually not profitable to trade based on overbought and oversold signal.
RSI Trend Indicator or as I like to call it "paRSI" ("Parsa (my name) + RSI") shows that when RSI is above a specific number (default value = 60) it indicates bullish trend and when RSI is below a specific number (default value = 40 ) it indicates bearish trend. Lastly when RSI is below the 2 specified numbers it indicates a neutral trend.
I don't recommend trading based on this single indicator. If you're a trend trader this might be useful tool in addition to your own strategy
Usage:
If the created pattern has worked previously on the chart, you could enter on the first stages of the green or red section (depending on the market's trend).
It is not recommended to trade in any direction when there is no color
*THIS IS A TREND FOLLOWING STRATEGY AND DOES NOT WORK ON ALL MARKETS*
Baus BandsThe Baus Bands are a simplified version of another one of my trend following indicators, the Neapolitan Bands. This version only shows the trend trading zones in green and red. An additional 21 EMA with an ATR band was added as part of my own trend trading rules using these bands.
How do I read this indicator?
Is the blue band between and not touching the green or red clouds? The condition is ranging.
Is the blue band touching the green cloud? The condition is a bullish trend.
Is the blue band touching the red cloud? The condition is a bearish trend.
The trend trading rules are exactly the same as the default Neapolitans, but include an extra condition.
A trend has started once 2 conditions are met:
Price has entered either trending cloud.
The 21 EMA ATR band in blue is within the same cloud.
With those conditions met, if you expect the trend to continue, trade pull-backs to the blue band in the direction of the trending cloud.
Isn't this just a 21 EMA trading pull-backs strategy?
No. The 21 EMA alone is not sufficient in my opinion to define a range or trend technically. Always buying the 21 EMA pull-back, especially in a range, is not a great strategy by itself unless you've already identified price as trending. Baus Bands adds that trend identification.
Why make this?
Baus Bands show the conditions I personally use for catching trends and identifying ranges with these indicators, and shows only the information I use.
What's the purpose of the ATR band around the 21 EMA?
Sometimes price will open and close below the 21 EMA and cause some technical analysts will say the trend is over. I added the ATR specifically to get a volatility based, upper and lower bound range around the 21 EMA. that way I have an acceptable price range where price could move past the 21 EMA and still keep a trend valid using similar rules. I then saw that so long this ATR band (not the 21 EMA itself) was touching those trending clouds, then the trend has a good chance of continuing as long as that was true.
CCI45/SMA50 indy for 30 min SP500SPCFD:SPX
The script determines entry points using 45 period CCI and 50 period SMA.
Long condition: When CCI crosses up 150 treshold while price above 50 period SMA
Short condition: When CCI crosses down -150 treshold while price below 50 period SMA
Trades are executed above/below 1 point of high/low for long/short positions. Stops are just 1 point below/above of SMA. After 4 points of profit stops should be tightened. If you do not plan to hold the position for a long time, it can produce quick profit within 5-6 bars namely 2.5-3 hour. Otherwise you can manage the trade using SMA as trailing stop. This can be treated as a strategy of scalping which turns out a trend trading eventually if conditions good.
Have a nice trading
Support Resistance ChannelsHello All,
For Long time I was planning to make Support/Resistance Channels script, finally I had time and here it is.
How this script works?
- it finds and keeps Pivot Points
- when it found a new Pivot Point it clears older S/R channels then;
- for each pivot point it searches all pivot points in its own channel with dynamic width
- while creating the S/R channel it calculates its strength
- then sorts all S/R channels by strength
- it shows the strongest S/R channels, before doing this it checks old location in the list and adjust them for better visibility
- if any S/R channel was broken on last move then it gives alert and put shape below/above the candle
- The colors of the S/R channels are adjusted automatically
You can set/change following settings:
- Pivot Period
- Source : High/Low or Close/Open can be used
- Maximum Channel Width %: this is the maximum channel width rate, this is calculated using Highest/Lowest levels in last 300 bars
- Number of S/R to show : this is the number of Strongest S/R to show
- Loopback Period: While calculating S/R levels it checks Pivot Points in LoopBack Period
- Show S/R on last # Bars: To see S/R levels only on last N bars
- Start Date: the script starts calculating Pivot Point from this date, the reason I put this option is for visuality. Explained below
- You can set colors/transparency
- and You can enable/disable shapes for broken S/R levels
Examples:
You can change colors as you wish:
here " Show S/R on last # Bars " set 100:
Sometimes visuality may corrupt because of old S/R levels, to solve it you need to set "Start Date" in the options to start the script in visual part (last 292 bars)
here in first screenshot it doesn't look good (shrink), then on second screenshot I set the "Start Date" it looks better, if you change time frame don't forget to set it again :)
Enjoy!
Multi Time Frame Candles with Volume Info / 3DHello Traders,
This is my second Multi Time Frame Candles script but with this new one, you will have some new features such volume info, remaining time to close of higher time frame candle and also developed using new features of Pine such array of lines. also I tried to make it 3D for better visualization ;) also it shows new highs/lows / breakouts.
I tried to make many things optional, so you can change almost everything using options.
What you can change using options:
- Higher time frame
- Number of Candles
- Candle Colors Up/Down
- Wick Color
- Volume colors Up/Down
- Text color of Remaining Time
- Shadow Color
- Background color
- Start bar of the candles (so you can see many higher times frame candles in same window)
- 3D effect, by default it's enables but you can disable 3D view
Lets see some examples:
Remaining time:
Breakouts:
You can combine different higher time frames:
if you don't want 3D view then combining different higher time frames:
You can change background color:
Enjoy!
Volume-Supported Linear Regression TrendHello Traders,
Linear Regression gives us some abilities to calculate the trend and if we combine it with volume then we may get very good results. Because if there is no volume support at up/downtrends then the trend may have a reversal soon. we also need to check the trend in different periods. With all this info, I developed Volume-Supported Linear Regression Trend script. The script checks linear regression of price and volume and then calculates trend direction and strength.
You have option to set Source, Short-Term Period and Long-Term Period. you can set them as you wish.
By default:
Close is used as "Source"
Short-Term Period is 20
Long-Term Period is 50
in following screenshot I tried to explain short term trend (for uptrend). Volume supports the trend? any volume pressure on trend? possible reversal? same idea while there is downtrend.
in following screenshot I tried to explain long term trend:
You can also check Positive/Negative Divergences to figure out possible reversals (to automate it, you can use Divergence for Many Indicators v4 , it has ability to check divergences on external indicators)
Enjoy!
SemaforHello Traders!
I have been away for a while but am recovering back gradually! Here is a gift to all of you.
It is based on the much loved ZigZag++ Script
The Semafor is used to spot future multi-level Supports and Resistance zones.
It is also useful to spot HL or LL or HH or LH zones at different Depth settings.
The red zones are the extreme places where the market has a higher chance of reversing while the green zones have the lowest setting with lower chances of the market reversal
To ease understanding of the code, I used the function `zigzag()` to show the simplicity in calculation
More will be coming this Year!