Negroni MA & RSI Strategy, plus trade entry and SL/TP optionsI will start with the context, and some things to think about when using a strategy tool to back-test ideas.
CONTEXT
FIRST: This is derived from other people's work, but I honestly hadn't found a mixed indicator MA strategy tool that does what this now does. If it is out there, apologies!!
This tool can help back-test various MA trends (SMA, EMA, HMA, VWMA); as well as factoring in RSI levels (or not); and can factor in a fixed HTF MA (or not). You can apply a 'retest entry' or a 'breakout entry', and you can also apply various risk mgt for SL/TP orders: 1) No SL/TP; or 2) a fixed %, or 3) dynamic ATR multipliers.
Find below, some details explaining what this tool is attempting to do.
Thank you, tack, salute!
THINGS TO REVIEW (it is not just about 'profitability'!!)
Whilst discretion is always highly encouraged as a trader, and a 100% indicator-driven strategy is VERY unlikely to yield sustainable results going forward, at the very least back-testing your strategies can help provide some guidance, not just on win rate Vs profit factor, but other things including:
a) Trade frequency: if a strategy has an 75% win rate and profit factor of 4, with all your parameters and confluence checks, but only triggers 3 trades every 5 years, is that realistically implementable to your trading situation if you have a $10,000 account?
b) Trade entry type: is it consistently better to wait for a retest of an 'MA zone', or is it better to market buy/sell on breakout of the 'MA zone'?
c) Risk management (SL/TP): is it consistently better to have a fixed static % for SL/TP ("I always place my stops 2% away, whether it is EURUSD or BTCUSDT"), or would you be better placed to try using an ATR multiplier of the respective assets?
d) Moving average type: is your old faithful 100 EMA really serving you well, or is the classic SMA more reliable, or how about the HMA, or the VWMA? Is the 100/200 cross holding up, or do you need something more sensitive? Is there any significant difference between a 10 EMA/20 EMA trend zone compared to a 13 EMA /25 EMA zone?
e) Confluence: Do added confluence checks (RSI, higher timeframe MA) actually improve profitability? But even if they do, is at the cost of cutting too many trades?
INPUTS AND PARAMETERS
Choice 1) Entry Strategy: Retest or Breakout - You can select both!
[ ]:
a) RETEST entry strat: price crosses UNDER FastMA INTO the 'MA trend zone'.
b) BREAKOUT entry strat: price crosses OVER FastMA OUT the 'MA trend zone'.
Choice 2) Risk Management (SL and TP) - You can select more than 1 strategy!
a) No SL/TP: Long trades are closed when the LOW crosses back UNDER the fastMA again, and shorts are closed when the HIGH crosses back OVER the fastMA again.
b) Static % SL/TP: Your SL/TP will be a fixed % away from avg. position price... WARNING: You should change this for various asset classes; FX vol is not the same as crypto altcoin vol!
c) Dynamic ATR SL/TP: Your SL/TP is a multiple of your selected ATR range (default is 50, see 'info' when you select ATR range). ATR accounts for the change in vol of different asset classes somewhat, HOWEVER... you should probably still not have the same multiplier trading S&P500 as you would trading crypto altcoins!
Then select your preferred parameters: EMA, SMA, HMA, VWMA, etc. You can mix and match, and most options have a info/tooltip guide.
RSI note: If you don't care for RSI levels, then set buy signal at 1... i.e always buys! Similarly set sell signal at 99.
ATR note: standard ATR length is usually 14, however... your SL/TP will move POST entry, and can tighten or widen your initial SL/TP... for better AND usually for worse! Go find a trade (strat 3) on the chart, look at the SL/TP lines, now change the number to 5, you'll see.
Fixed HTF MA note: If you don't care for HTF MA confluence, just change the timeframe/options to match the 'Slow MA' options you've chosen.
Wyszukaj w skryptach "entry"
DIY Entry SignalsThis indicator allows you to set up entry signals based on your own conditions.
Note that this indicator DOES NOT give any information about exits. It is not intended to be a signal indicator that someone could blindly follow. It is intended for use in backtesting to help spot entry points more easily.
Also note that this indicator DOES NOT plot anything other than moving averages and entry signals. The other indicators referenced will need to be added on their own to be visible on the chart.
Credit to The_Caretaker for both BBWP and PMARP indicators. For more information on how those work, see their descriptions. Big thanks to him for making them open source, as well.
Instructions for use:
Signal Types:
This section allows you to choose whether you want long, short, or both types of signals.
Moving Averages:
Configure up to 4 moving averages to be plotted on the chart. Options include show/hide, color, length, and type.
RSI:
Choose the period and source used for the Relative Strength Index indicator, a very commonly used momentum oscillator.
Stochastic:
Choose the K, D, smoothing, and source for the Stochastic indicator, a very commonly used momentum oscillator.
BBWP:
Choose settings for the Bollinger Band Width Percentile indicator. This measures volatility based on Bollinger Bands and was created by The_Caretaker. The indicator is free and open source, so definitely check it out.
This section allows the user to choose the price source, basis type ( SMA , EMA , or VWMA ), length, and lookback. It also includes a threshold setting to determine the BBWP requirement used for entry signals.
PMARP:
Choose settings for the Price Moving Average Ratio & Percentile. This calculates the ratio between a source price and moving average over a lookback period. This was also created by The_Caretaker, and it is a free and open source indicator.
This section allows the user to choose price source, lookback, PMAR length, and moving average type.
DMI/ADX:
Choose settings for the Directional Movement Index and the Average Directional Index. This shows which direction the price is moving by comparing prior highs and lows and calculating a positive directional movement and a negative directional movement. The average of the positive and negative movements is used to plot the ADX line.
Long/Short Conditions:
Choose which indicators will be used to determine entry signals, as well as some options for each indicator that is included.
Note: A signal will only be plotted if ALL selected conditions are met.
Options in these sections include:
Faster moving averages above or below slower moving averages (implying a trend direction)
RSI thresholds (separate for long and short)
Stochastic thresholds (separate for long and short)
Whether K should be above or below D (implying trend direction of the Stochastic indicator)
Whether a signal should only be generated on the bar when the Stochastic first crosses the threshold.
BBWP on/off (The threshold for this is determined in the BBWP section of the settings)
PMARP thresholds (separate for long and short)
2x take profit, move stop loss to entryTwo take profit targets moving stop loss to entry after first take profit hit
This strategy shows a method to achieve the following trade management:
1) Open a position with two take profit targets
2) When first take profit is hit, move the stop loss to entry price
3) Position is closed when either second take profit is hit or position is stopped out at entry
Trading Conditions
The trading conditions used in this script are for illustrative purposes only and are not meant to be profitable.
Bollinger Bands
Used to show areas where price is moving outside of the normal range
Stochastic
Used to show overbought and oversold conditions.
Green dots are plotted when the K line crosses over its SMA. Red dots are plotted when the K line crosses under its SMA.
The option to use overbought/oversold thresholds is again illustrative.
Bogdan Ciocoiu - Sniper EntryWhat is Sniper Entry
Sniper Entry is a set indicator that encapsulates a collection of pre-configured scripts using specific variables that enable users to extract signals by interpreting market behaviour quickly, suitable for 1-3min scalping. This instrument is a tool that acts as a confluence for traders to make decisions concerning current market conditions. This indicator does not apply solely to an asset.
What Sniper Entry is not
Sniper Entry is not interpreting fundamental analysis and will also not be providing out of box market signals. Instead, it will provide a collection of integrated and significantly improved open-source subscripts designed to help traders speculate on market trends. Traders must apply their strategies and configure Sniper Entry accordingly to maximise the script's output.
Originality and usefulness
The collection of subscripts encapsulated in this tool makes it unique in the Trading View ecosystem. This indicator enables traders to consider entry positions or exit positions by comparing similar algorithms at once.
Its usefulness also emerges from the unique configurations embedded in the indicator's settings, which are different from those of the original scripts.
This indicator's originality is also reflected in how its modules are integrated, including the integration of the settings.
Open-source reuse
I used the following open-source resources, which I simplified significantly and pre-configured for short term scalping. The source codes for the below are already in the public domain, including the following links listed below.
www.tradingview.com (open source)
(open source and generic algorithm)
www.tradingview.com (open source)
(open source)
(open source)
www.tradingview.com (generic MA algorithm and open source)
(generic VWAP algorithm and open source)
LCDT Trade Entry ToolLCDT Trade Entry Tool
Enter the Offset for the X Axis for the Entry Tool.
Enter the Offset for the Y Axis for the Entry Tool.
Enter the Price for your Stop Loss in $.
Enter your desired Risk Amount in $.
Enter the max amount of of Capital per Trade in $.
There are toggle buttons in the setup to reveal/remove more data in the label that pops up, as well as a toggle to make the text larger.
[blackcat] L1 GMMA Long EntryLevel: 1
Background
The Guppy Multiple Moving Average (GMMA) is a technical indicator that identifies changing trends, breakouts, and trading opportunities in the price of an asset by combining two sets of moving averages (MA) with different time periods. There is a short term group of MAs and a long term group of MAs.
Function
L1 GMMA Long Entry classify short-mid term GMMA cluster and long term GMMA cluster with key Fibnocci numbers. Long entry signal is generated with GMMA cluster relationship.
Key Signal
Long entry 1~6 ---> Long entry signal generated with GMMA cluster relationship.
Pros and Cons
Pros:
1. easy observe price trend
2. it covers short, middle and long term trend analysis
Cons:
1. Only long entry signal is disclosed here
2. No complex trading strategy is used yet
Remarks
NA
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
[blackcat] L1 Banker Entry IndicatorLevel: 1
Background
@testtttt1111 inquired me how to model banker entry
Function
L1 Banker Entry Indicator demostrates a simple model of banker entry for long or short
Key Signal
bankerthreshold ---> customized input for threshold value for banker move identification
pumpdumpsoon ---> alerts for pump or dump start soon in green color
longshortentry ---> alerts for long or short entry in orange color
bankermove ---> alerts for banker move in yellow color
Pros and Cons
Pros:
1. indicating banker move and entries
2. simple classification of banker move alerts
Cons:
1. no direction can be identified
2. no volume information is utilized for big fund move
Remarks
A demo for banker entry inquired by @testtttt1111
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
L1 Moving Average Fingerprint for Long EntryLevel: 1
Background
This script combines moving average processing with highest high and lowest low to disclose the "fingerprint" of a specific trading pair to describe its unique behavior.
Function
Moving Average Fingerprint for Long Entry is a Level 1 pine script. It utilize several moving average of inherent highest high and lowest low and combine them with customized fingerprint coefficients to depict the unique behavior of a specific trading pair across multiple markets for long entry point identification.
Key Signal
FingerPrint1~6 are basic-level fingerprints with moving average of highest high and lowest low.
FingerPrint7~8 are composite fingerprint definitions with coefficients/weights,where coefficients/weights need to be tuned to discover the inherent "fingerprint" of a specific trading pair.
FingerPrint10~12 are composite fingerprint calculation for long entry alerts
ReadytoLong is a long entry filter where long entry point may happen within it. By using crossover() function to a customized threshold value, you can define accurate long entries.
Pros and Cons
Pros:
1. Combine moving average and extreme points to disclose a trading pair behavior.
2. Smart to tune specific set of parameters to obtain unique fingerprints of trading pairs.
3. Smart position sizing scheme by adjusting the threshold values.
Cons:
1. Require tune input parameters for each trading pair in a specific period and time frame.
2. Only long entry was studied, no short entry and re-entry are available yet to form as a trading system.
3. "ReadytoLong" is an inaccurate range where multiple long entries may happen at improper points in chop market.
4. Complex input parameters to obtain a unique fingerprint set.
Remarks
Although I wrote pine script for more than two years, this is the first script published in the community. I will publish more with my works in this platform.
Hope the community can improve this concept and make it as a trading system.
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
SMA Cross Entry & Exit StrategyThis is a TradingView Strategy Script meaning you can't execute real trades using your exchange API connected to your TradingView account, it is designed for backtesting only
This is a basic backtesting script for charting the bullish and bearish cross of two user defined simple moving averages, select the cog next to the name of the script ON the price chart in the left hand corner. The script will print to the screen either "Long Entry" or "Short Entry" depending on the direction of the cross. The script using TradingView strategies will subsequently close the opposite of the position that is executed when the bullish or bearish cross occurs. Simply put, if you are short and a bullish cross occurs, your short trade will close and be logged in strategies and the long will fire. You can pyramid the long and short positions to continue entering as long as the trend doesn't flip. You will find this in the script settings. Since this script is for backtesting you can manually set the "backtesting range" for TradingView Strategies and firing the "Long Entry" and "Short Entry". This as well, is in the settings.
Notice: When the SMA cross occurs, you have to wait till the next candle before TradingView Strategy will print the "Long Entry" or "Short Entry" to the screen
TradingView - How To Use Strategies: www.tradingview.com
Momentum and Trend Strength Entry Exit Pivot StudyUpdated version of previous Momentum Strength Entry Exit Pivot Study:
//************************
// @TheGeeBee - Credit where used
//
//Notes:
//
// Use 1,2,3,5 minute timeframes
// EMA Cross line and offset allows user to alter the sell characteristics where the candle low is above the EMA line and indicates a possible pre-pivot reversal
// Adjust Min and Max pivots based on risk profile
// Single Candle drawdown value represents the maximum size of a single red candle before an Exit Pivot is generated
// ADX Threshold inhibits Pivots when trending signal is below the threshold value
// Percentage Max drawdown since Entry Pivot allows the system to generate an Exit Pivot if the security has dropped X percent from the most recent Entry Pivot point
// Use Bars, Candles (preferred) or Heikin-Ashi
// Multiple Green Bars = BTFD
// Multiple Red bars = If you didn't already get out, do it now!
//
//************************
Allows for Alerts to be set for Entry and Exit Pivots.
LongSetups with Entry Signals and Trailing Stop(HA)High probable Long Setups for any time frame and asset.
75+ win rate
Trailing stop always used as exit point
To trade only with the trand - enable MAs in the Inputs tab
x - means Entry signal is active and waiting for long validation
B - on a closed bar is entry signal for long
C - on a developing bar is exit long signal
Green line - long validation line. must close above to go long
Pink line - trailing stop
On Long Entry alert - use Once Per Bar Close option.
On Long Exit alert (Trailing stop triggered) - use Once Per Bar option to trigger sooner and protect your capital.
Always do your own analysis and make trades on your own risk. Find a confluence point where everything aligns and make your own decision. Don't enter a trade because the indicator tells you so. You are free to make a copy of the script and change it to your own needs for your own personal use.
RSI/MFI - MTF - Entry signals/Trend colored bars - JD@version=2
This indicator is designed to give early entry signals as well as to follow trend moves, according to different settings.
The indicator shows a histogram of the RSI ro MFI in relation to an ema of the RSI or MFI.
The histogram is then smoothed to give early reversal/entry signals.
The actual RSI/MFI line with oversold/overbought indication can be displayed or omitted, as preferred.
in addition to the RSI/MFI line or as an alternative to it, the background colour can be set to change folowing the RSI/MFI signals.
The timeframe can be chosen. Higher timeframes (eg. 3h) tend to give less false signals.
version 5.
added support for custom Multiple Time Frame selection.
added option for choice of RSI or MFI as base indicator.
added option for price bar coloring according to the indicator. (deselecting "borders" in the "style" tab is recommended)
price bar coloring can be adjusted for different strategies:
1. following the slope of the histogram (for faster entry/exit signals)
2. according to positive or negative histogram (for longer moves)
3. according to pos. or neg. RSI/MFI (for longer term trend holds)
4. uptrend: biased towards faster buy signals and slower sell signals to stay in the uptrend
5. downtrend: biased towards faster sell signals and slower buy signals to stay in the downtrend
A longer timeframe (eg. 3x) is recommended for following trend moves.
try different strategies to see what works better for RSI or MFI.
JD.
[COG]TMS Crossfire 🔍 TMS Crossfire: Guide to Parameters
📊 Core Parameters
🔸 Stochastic Settings (K, D, Period)
- **What it does**: These control how the first stochastic oscillator works. Think of it as measuring momentum speed.
- **K**: Determines how smooth the main stochastic line is. Lower values (1-3) react quickly, higher values (3-9) are smoother.
- **D**: Controls the smoothness of the signal line. Usually kept equal to or slightly higher than K.
- **Period**: How many candles are used to calculate the stochastic. Standard is 14 days, lower for faster signals.
- **For beginners**: Start with the defaults (K:3, D:3, Period:14) until you understand how they work.
🔸 Second Stochastic (K2, D2, Period2)
- **What it does**: Creates a second, independent stochastic for stronger confirmation.
- **How to use**: Can be set identical to the first one, or with slightly different values for dual confirmation.
- **For beginners**: Start with the same values as the first stochastic, then experiment.
🔸 RSI Length
- **What it does**: Controls the period for the RSI calculation, which measures buying/selling pressure.
- **Lower values** (7-9): More sensitive, good for short-term trading
- **Higher values** (14-21): More stable, better for swing trading
- **For beginners**: The default of 11 is a good balance between speed and reliability.
🔸 Cross Level
- **What it does**: The centerline where crosses generate signals (default is 50).
- **Traditional levels**: Stochastics typically use 20/80, but 50 works well for this combined indicator.
- **For beginners**: Keep at 50 to focus on trend following strategies.
🔸 Source
- **What it does**: Determines which price data is used for calculations.
- **Common options**:
- Close: Most common and reliable
- Open: Less common
- High/Low: Used for specialized indicators
- **For beginners**: Stick with "close" as it's most commonly used and reliable.
🎨 Visual Theme Settings
🔸 Bullish/Bearish Main
- **What it does**: Sets the overall color scheme for bullish (up) and bearish (down) movements.
- **For beginners**: Green for bullish and red for bearish is intuitive, but choose any colors that are easy for you to distinguish.
🔸 Bullish/Bearish Entry
- **What it does**: Colors for the entry signals shown directly on the chart.
- **For beginners**: Use bright, attention-grabbing colors that stand out from your chart background.
🌈 Line Colors
🔸 K1, K2, RSI (Bullish/Bearish)
- **What it does**: Controls the colors of each indicator line based on market direction.
- **For beginners**: Use different colors for each line so you can quickly identify which line is which.
⏱️ HTF (Higher Timeframe) Settings
🔸 HTF Timeframe
- **What it does**: Sets which higher timeframe to use for filtering (e.g., 240 = 4 hour chart).
- **How to choose**: Should be at least 4x your current chart timeframe (e.g., if trading on 15min, use 60min or higher).
- **For beginners**: Start with a timeframe 4x higher than your trading chart.
🔸 Use HTF Filter
- **What it does**: Toggles whether the higher timeframe filter is applied or not.
- **For beginners**: Keep enabled to reduce false signals, especially when learning.
🔸 HTF Confirmation Bars
- **What it does**: How many bars must confirm a trend change on higher timeframe.
- **Higher values**: More reliable but slower to react
- **Lower values**: Faster signals but more false positives
- **For beginners**: Start with 2-3 bars for a good balance.
📈 EMA Settings
🔸 Use EMA Filter
- **What it does**: Toggles price filtering with an Exponential Moving Average.
- **For beginners**: Keep enabled for better trend confirmation.
🔸 EMA Period
- **What it does**: Length of the EMA for filtering (shorter = faster reactions).
- **Common values**:
- 5-13: Short-term trends
- 21-50: Medium-term trends
- 100-200: Long-term trends
- **For beginners**: 5-10 is good for short-term trading, 21 for swing trading.
🔸 EMA Offset
- **What it does**: Shifts the EMA forward or backward on the chart.
- **For beginners**: Start with 0 and adjust only if needed for visual clarity.
🔸 Show EMA on Chart
- **What it does**: Toggles whether the EMA appears on your main price chart.
- **For beginners**: Keep enabled to see how price relates to the EMA.
🔸 EMA Color, Style, Width, Transparency
- **What it does**: Customizes how the EMA line looks on your chart.
- **For beginners**: Choose settings that make the EMA visible but not distracting.
🌊 Trend Filter Settings
🔸 Use EMA Trend Filter
- **What it does**: Enables a multi-EMA system that defines the overall market trend.
- **For beginners**: Keep enabled for stronger trend confirmation.
🔸 Show Trend EMAs
- **What it does**: Toggles visibility of the trend EMAs on your chart.
- **For beginners**: Enable to see how price moves relative to multiple EMAs.
🔸 EMA Line Thickness
- **What it does**: Controls how the thickness of EMA lines is determined.
- **Options**:
- Uniform: All EMAs have the same thickness
- Variable: Each EMA has its own custom thickness
- Hierarchical: Automatically sized based on period (longer periods = thicker)
- **For beginners**: "Hierarchical" is most intuitive as longer-term EMAs appear more dominant.
🔸 EMA Line Style
- **What it does**: Sets the line style (solid, dotted, dashed) for all EMAs.
- **For beginners**: "Solid" is usually clearest unless you have many lines overlapping.
🎭 Trend Filter Colors/Width
🔸 EMA Colors (8, 21, 34, 55)
- **What it does**: Sets the color for each individual trend EMA.
- **For beginners**: Use a logical progression (e.g., shorter EMAs brighter, longer EMAs darker).
🔸 EMA Width Settings
- **What it does**: Controls the thickness of each EMA line.
- **For beginners**: Thicker lines for longer EMAs make them easier to distinguish.
🔔 How These Parameters Work Together
The power of this indicator comes from how these components interact:
1. **Base Oscillator**: The stochastic and RSI components create the main oscillator
2. **HTF Filter**: The higher timeframe filter prevents trading against larger trends
3. **EMA Filter**: The EMA filter confirms signals with price action
4. **Trend System**: The multi-EMA system identifies the overall market environment
Think of it as multiple layers of confirmation, each adding more reliability to your trading signals.
💡 Tips for Beginners
1. **Start with defaults**: Use the default settings first and understand what each element does
2. **One change at a time**: When customizing, change only one parameter at a time
3. **Keep notes**: Write down how each change affects your results
4. **Backtest thoroughly**: Test any changes on historical data before trading real money
5. **Less is more**: Sometimes simpler settings work better than complicated ones
Remember, no indicator is perfect - always combine this with proper risk management and other forms of analysis!
Dachan Strategy (BOS & CHoCH) - Wick Break EntryThe Dachan Strategy is a trend-following breakout system that uses Break of Structure (BOS) and Change of Character (CHoCH) to identify potential trade entries based on price action and market structure shifts. Trades are triggered when price wicks above/below a key swing high or low, confirmed by an Exponential Moving Average (EMA) filter and a Gaussian Trend Filter to ensure trend direction. Stop Loss (SL) is dynamically set using an ATR-based multiplier, allowing for adaptive risk management based on market volatility. The strategy visually marks potential breakout levels, entry points, and stop-loss placements, making it ideal for traders looking to capitalize on momentum while managing risk efficiently. 🚀
Dachan Strategy (BOS & CHoCH) - Wick Break EntryThe Dachan Strategy is a trend-following breakout system that uses Break of Structure (BOS) and Change of Character (CHoCH) to identify potential trade entries based on price action and market structure shifts. Trades are triggered when price wicks above/below a key swing high or low, confirmed by an Exponential Moving Average (EMA) filter and a Gaussian Trend Filter to ensure trend direction. Stop Loss (SL) is dynamically set using an ATR-based multiplier, allowing for adaptive risk management based on market volatility. The strategy visually marks potential breakout levels, entry points, and stop-loss placements, making it ideal for traders looking to capitalize on momentum while managing risk efficiently.
B-Xtrender MTF Long Only Strategy with BX Entry - W Candle CloseB-Xtrender MTF Long Only Strategy with BX Entry - W Candle Close
RSI EMA ENTRY//@version=6
indicator(title="RSI EMA ENTRY", overlay=false)
// RSI Inputs
rsiLengthInput = input.int(21, minval=1, title="RSI Length", group="RSI Settings")
rsiSourceInput = input.source(close, "Source", group="RSI Settings")
// UT Bot Alerts Inputs
key_value = input.int(2, title="Key Value (Sensitivity)")
atr_period = input.int(5, title="ATR Period")
use_heikin_ashi = input.bool(false, title="Use Heikin Ashi Candles")
// ATR Calculation
atr_value = ta.atr(atr_period)
nLoss = key_value * atr_value
// Source Selection
ha_ticker = ticker.heikinashi(syminfo.ticker)
src = use_heikin_ashi ? request.security(ha_ticker, timeframe.period, close) : close
// ATR Trailing Stop Calculation
var float atr_trailing_stop = na
atr_trailing_stop := if src > nz(atr_trailing_stop ) and src > nz(atr_trailing_stop )
math.max(nz(atr_trailing_stop ), src - nLoss)
else if src < nz(atr_trailing_stop ) and src < nz(atr_trailing_stop )
math.min(nz(atr_trailing_stop ), src + nLoss)
else if src > nz(atr_trailing_stop )
src - nLoss
else
src + nLoss
// Position Logic
var int pos = 0
pos := if src < nz(atr_trailing_stop ) and src > nz(atr_trailing_stop )
1
else if src > nz(atr_trailing_stop ) and src < nz(atr_trailing_stop )
-1
else
nz(pos )
// Buy and Sell Signals
ema_value = ta.ema(src, 1)
above = ta.crossover(ema_value, atr_trailing_stop)
below = ta.crossunder(ema_value, atr_trailing_stop)
buy_signal = src > atr_trailing_stop and above
sell_signal = src < atr_trailing_stop and below
// Bar Coloring
barbuy = src > atr_trailing_stop
barsell = src < atr_trailing_stop
plotshape(buy_signal, title="Buy", text="Buy", style=shape.labelup, location=location.belowbar, color=color.green, textcolor=color.white, size=size.tiny, display=display.all,force_overlay = true)
plotshape(sell_signal, title="Sell", text="Sell", style=shape.labeldown, location=location.abovebar, color=color.red, textcolor=color.white, size=size.tiny, display=display.all,force_overlay = true)
barcolor(barbuy ? color.green : na)
barcolor(barsell ? color.red : na)
alertcondition(buy_signal, title="UT Long", message="UT Long")
alertcondition(sell_signal, title="UT Short", message="UT Short")
// RSI Calculation (Separate Pane)
change = ta.change(rsiSourceInput)
up = ta.rma(math.max(change, 0), rsiLengthInput)
down = ta.rma(-math.min(change, 0), rsiLengthInput)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
rsiPlot = plot(rsi, "RSI", color=#0e0e0f)
rsiUpperBand = hline(60, "RSI Upper Band", color=#787B86)
midline = hline(50, "RSI Middle Band", color=color.new(#787B86, 50))
rsiLowerBand = hline(40, "RSI Lower Band", color=#787B86)
fill(rsiUpperBand, rsiLowerBand, color=color.rgb(126, 87, 194, 90), title="RSI Background Fill")
// Smoothing MA inputs
GRP = "Smoothing"
maTypeInput = input.string("EMA", "Type", options = , group = GRP, display = display.data_window)
maLengthInput = input.int(14, "Length", group = GRP, display = display.data_window)
var enableMA = maTypeInput != "None"
// Smoothing MA Calculation
ma(source, length, MAtype) =>
switch MAtype
"SMA" => ta.sma(source, length)
"EMA" => ta.ema(source, length)
"SMMA (RMA)" => ta.rma(source, length)
"WMA" => ta.wma(source, length)
"VWMA" => ta.vwma(source, length)
// Smoothing MA plots
smoothingMA = enableMA ? ma(rsi, maLengthInput, maTypeInput) : na
plot(smoothingMA, "RSI-based MA", color=color.yellow, display = enableMA ? display.all : display.none, editable = enableMA)
// EMA 5 Offset 2 (Forcefully on Chart)
ema5 = ta.ema(close, 5)
plot(ema5, title="5 EMA Offset 2", color=color.black, offset=2, linewidth=3, display=display.all,force_overlay = true)
Midline Rejection Entry with TP/SL at Supply/DemandThis strategy is an unrefined way of trading on the 5 min timeframe to take an entry based on an identified trend's retracement, taking profit or stopping losses at previously identiffied supports or resistances.
NSE Index Strategy with Entry/Exit MarkersExplanation of the Code
Trend Filter (200 SMA):
The line trendSMA = ta.sma(close, smaPeriod) calculates the 200‑period simple moving average. By trading only when the current price is above this SMA (inUptrend = close > trendSMA), we aim to trade in the direction of the dominant trend.
RSI Entry Signal:
The RSI is calculated with rsiValue = ta.rsi(close, rsiPeriod). The script checks for an RSI crossover above the oversold threshold using ta.crossover(rsiValue, rsiOversold). This helps capture a potential reversal from a minor pullback in an uptrend.
ATR-Based Exits:
ATR is computed by atrValue = ta.atr(atrPeriod) and is used to set the stop loss and take profit levels:
Stop Loss: stopLossPrice = close - atrMultiplier * atrValue
Take Profit: takeProfitPrice = close + atrMultiplier * atrValue
This dynamic approach allows the exit levels to adjust according to the current market volatility.
Risk and Money Management:
The strategy uses a fixed percentage of equity (10% by default) for each trade. The built‑in commission parameter helps simulate real-world trading costs.
RSI (Kernel Optimized) | Flux Charts💎 GENERAL OVERVIEW
Introducing our new KDE Optimized RSI Indicator! This indicator adds a new aspect to the well-known RSI indicator, with the help of the KDE (Kernel Density Estimation) algorithm, estimates the probability of a candlestick will be a pivot or not. For more information about the process, please check the "HOW DOES IT WORK ?" section.
Features of the new KDE Optimized RSI Indicator :
A New Approach To Pivot Detection
Customizable KDE Algorithm
Realtime RSI & KDE Dashboard
Alerts For Possible Pivots
Customizable Visuals
❓ HOW TO INTERPRET THE KDE %
The KDE % is a critical metric that reflects how closely the current RSI aligns with the KDE (Kernel Density Estimation) array. In simple terms, it represents the likelihood that the current candlestick is forming a pivot point based on historical data patterns. a low percentage suggests a lower probability of the current candlestick being a pivot point. In these cases, price action is less likely to reverse, and existing trends may continue. At moderate levels, the possibility of a pivot increases, indicating potential trend shifts or consolidations.Traders should start monitoring closely for confirmation signals. An even higher KDE % suggests a strong likelihood that the current candlestick could form a pivot point, which could lead to a reversal or significant price movement. These points often align with overbought or oversold conditions in traditional RSI analysis, making them key moments for potential trade entry or exit.
📌 HOW DOES IT WORK ?
The RSI (Relative Strength Index) is a widely used oscillator among traders. It outputs a value between 0 - 100 and gives a glimpse about the current momentum of the price action. This indicator then calculates the RSI for each candlesticks, and saves them into an array if the candlestick is a pivot. The low & high pivot RSIs' are inserted into two different arrays. Then the a KDE array is calculated for both of the low & high pivot RSI arrays. Explaining the KDE might be too much for this write-up, but for a brief explanation, here are the steps :
1. Define the necessary options for the KDE function. These are : Bandwidth & Nº Steps, Array Range (Array Max - Array Min)
2. After that, create a density range array. The array has (steps * 2 - 1) elements and they are calculated by (arrMin + i * stepCount), i being the index.
3. Then, define a kernel function. This indicator has 3 different kernel distribution modes : Uniform, Gaussian and Sigmoid
4. Then, define a temporary value for the current element of KDE array.
5. For each element E in the pivot RSI array, add "kernel(densityRange.get(i) - E, 1.0 / bandwidth)" to the temporary value.
6. Add 1.0 / arrSize * to the KDE array.
Then the prefix sum array of the KDE array is calculated. For each candlestick, the index closest to it's RSI value in the KDE array is found using binary search. Then for the low pivot KDE calculation, the sum of KDE values from found index to max index is calculated. For the high pivot KDE, the sum of 0 to found index is used. Then if high or low KDE value is greater than the activation threshold determined in the settings, a bearish or bullish arrow is plotted after bar confirmation respectively. The arrows are drawn as long as the KDE value of current candlestick is greater than the threshold. When the KDE value is out of the threshold, a less transparent arrow is drawn, indicating a possible pivot point.
🚩 UNIQUENESS
This indicator combines RSI & KDE Algorithm to get a foresight of possible pivot points. Pivot points are important entry, confirmation and exit points for traders. But to their nature, they can be only detected after more candlesticks are rendered after them. The purpose of this indicator is to alert the traders of possible pivot points using KDE algorithm right away when they are confirmed. The indicator also has a dashboard for realtime view of the current RSI & Bullish or Bearish KDE value. You can fully customize the KDE algorithm and set up alerts for pivot detection.
⚙️ SETTINGS
1. RSI Settings
RSI Length -> The amount of bars taken into account for RSI calculation.
Source -> The source value for RSI calculation.
2. Pivots
Pivot Lengths -> Pivot lengths for both high & low pivots. For example, if this value is set to 21; 21 bars before AND 21 bars after a candlestick must be higher for a candlestick to be a low pivot.
3. KDE
Activation Threshold -> This setting determines the amount of arrows shown. Higher options will result in more arrows being rendered.
Kernel -> The kernel function as explained in the upper section.
Bandwidth -> The bandwidth variable as explained in the upper section. The smoothness of the KDE function is tied to this setting.
Nº Bins -> The Nº Steps variable as explained in the upper section. It determines the precision of the KDE algorithm.
MA15, MA50 with Support/Resistance, CHoCH, Trend, and Entry/Exita comprehensive indicator that includes moving averages (MA), support and resistance levels, Change of Character (CHoCH) detection, trend identification, and entry/exit signals. Here's a breakdown of its components:
Input Parameters:
ma15_length and ma50_length: Lengths for the moving averages.
lookback: Period for detecting support and resistance levels.
Moving Averages:
ma15 and ma50 are simple moving averages with lengths defined by the user.
Support and Resistance Levels:
The script identifies swing highs and lows to update support and resistance levels.
These levels are plotted using extended lines for visualization.
Change of Character (CHoCH):
CHoCH up is detected when ma15 crosses above ma50.
CHoCH down is detected when ma15 crosses below ma50.
Corresponding signals are plotted on the chart.
Trend Identification:
An uptrend is confirmed when ma15 crosses above ma50 and the close price is above ma50.
A downtrend is confirmed when ma15 crosses below ma50 and the close price is below ma50.
Background colors are used to highlight uptrend (green) and downtrend (red).
Entry and Exit Signals:
Buy signals are generated when CHoCH up occurs, and the price pulls back to support during an uptrend.
Sell signals are generated when CHoCH down occurs, and the price pulls back to resistance during a downtrend.
These signals are plotted on the chart.
Alerts:
Alerts are set up to notify the user when a buy or sell signal is detected.
Contrarian DC Strategy - w Entry SL Pause and TrailingStopDonchian Channel Setup:
The strategy uses a tool called the Donchian Channel. Imagine this as two lines (bands) on a chart that show the highest and lowest prices over a certain number of past trading days (default is 20 days).
There's also a centerline, which is the average of these two bands.
Entry Conditions for Trades:
Buying (Going Long): The strategy considers buying when the price touches or falls below the lower band of the Donchian Channel. However, this only happens if there has been a pause after a previous losing trade. This pause is a number of candles where no new trades are taken.
Selling (Going Short): Similarly, the strategy considers selling when price reaches or exceeds the upper band of the Donchian Channel. Again, this is subject to a pause after a losing trade.
Stop Loss and Take Profit:
Each trade has a "Stop Loss" and "Take Profit" set. The Stop Loss is a preset price level where the trade will close to prevent further losses if the market moves against your position. The Take Profit does the same but locks in profit if the market moves in your favor.
The Stop Loss is set based on a percentage of the price at which you entered the trade.
The Take Profit is determined by the Risk/Reward Ratio. This ratio helps balance how much you're willing to risk versus the potential reward.
Trailing Stop Loss:
When a trade is profitable, the strategy should involve a "Trailing Stop Loss." This means the Stop Loss level moves (or trails) the price movement to lock in profits as the market moves in your favor.
For a buy trade, if the price moves above the centerline of the Donchian Channel, the Trailing Stop Loss should be adjusted in the middle between the entry price and the centerline. Viceversa for a sell trade, it should be adjusted in the same way if the price goes below the centerline.
IMPORTANT: There's no allert for the trailing stop at the moment.
Post-Stop Loss Pause:
If a trade hits the Stop Loss (i.e., it's a losing trade), the strategy takes a break before opening another trade in the same direction. This pause helps to avoid entering another trade immediately in a potentially unfavorable market.
In summary, this strategy is designed to make trades based on the Donchian Channel, with specific rules for when to enter and exit trades, and mechanisms to manage risk and protect profits. It's contrarian because it tends to buy when the price is low and sell when the price is high, which is opposite to what many traders might do.
ZIP Entry Strategy( Using 50 SMA and 100 SMA)Description:
This strategy uses only two simple moving averages, specifically the 50 SMA and the 100 SMA.
Simple moving average : A simple moving average (SMA) calculates the average of a selected range of prices, usually closing prices, by the number of periods in that range.
Here's how it works:
Background color:
The chart background is colored green when the price is above the 100 SMA.
The chart background turns red when the price is below the 100 SMA.
The greenback ground suggest the bullish momentum and the red background suggests the bearish momentum.
We can use this long term trend to take the trades in alignment with the trend to increase our odds.
We will use the 50 SMA to identify the spots when a new trend is starting. When the price crosses above the 50 SMA while the background is green, the candle/bar color changes to white indicating a new trend beginning.
Conversely, when the price crosses below the 50 SMA while the background is red, the candle/bar color also changes to white indicating a new trend beginning.
The occurrence of white candles indicates the start of a potential new trend in alignment with the long term trend.
However, it's essential to remember that like any trading strategy, this one is not perfect. For more reliable results, it's advisable to combine it with a consideration of the overall price structure to minimize false entry signals.
Originality and usefulness
Even though it makes use of two moving averages, we don't use the moving average crossover. The moving average crossovers are either lagging or provide too many false signals. We have tried to address these issue with this strategy. While maintaining the long-term trend and ignoring false signals, it gives out signals early.
You can choose the moving average that best suits your needs by changing these moving averages to a different moving average . The 50 SMA and 100 SMA appeared to be giving the better signals in my experience.
I dont use any other indicators but i would like to check the price structure to make sure its moving along with the 50 SMA. Sometimes the choppy markets might give false signals.
Its okay to see multiple white candles as long as the price structure holds.
I have highlighted the white candles in the above chart. The color of the candle is always the same so the background decides whether its bearish or bullish cross