TradeLibrary "Trade"
A Trade Tracking Library
Monitor conditions with less code by using Arrays. When your conditions are met in chronologically, a signal is returned and the scanning starts again.
Create trades automatically with Stop Loss, Take Profit and Entry. The trades will automatically track based on the market movement and update when the targets are hit.
Sample Usage
Enter a buy trade when RSI crosses below 70 then crosses above 80 before it crosses 40.
Note: If RSI crosses 40 before 80, No trade will be entered.
rsi = ta.rsi(close, 21)
buyConditions = array.new_bool()
buyConditions.push(ta.crossunder(rsi, 70))
buyConditions.push(ta.crossover(rsi, 80))
buy = Trade.signal(buyConditions, ta.crossunder(rsi, 40))
trade = Trade.new(close-(100*syminfo.mintick), close +(200*syminfo.mintick), condition=buy)
plot(trade.takeprofit, "TP", style=plot.style_circles, linewidth=4, color=color.lime)
alertcondition(trade.tp_hit, "TP Hit")
method signal(conditions, reset)
Signal Conditions
Namespace types: bool
Parameters:
conditions (bool )
reset (bool)
Returns: Boolean: True when all the conditions have occured
method update(this, stoploss, takeprofit, entry)
Update Trade Parameters
Namespace types: Trade
Parameters:
this (Trade)
stoploss (float)
takeprofit (float)
entry (float)
Returns: nothing
method clear(this)
Clear Trade Parameters
Namespace types: Trade
Parameters:
this (Trade)
Returns: nothing
method track(this, _high, _low)
Track Trade Parameters
Namespace types: Trade
Parameters:
this (Trade)
_high (float)
_low (float)
Returns: nothing
new(stoploss, takeprofit, entry, _high, _low, condition, update)
New Trade with tracking
Parameters:
stoploss (float)
takeprofit (float)
entry (float)
_high (float)
_low (float)
condition (bool)
update (bool)
Returns: a Trade with targets and updates if stoploss or takeprofit is hit
new()
New Empty Trade
Returns: an empty trade
Trade
Fields:
stoploss (series__float)
takeprofit (series__float)
entry (series__float)
sl_hit (series__bool)
tp_hit (series__bool)
open (series__integer)
E-signal
Sublime Trading | Donchian Breakout SignalsWhat kind of traders/investors are we?
We are trend followers. Our scripts are designed to be used on the higher timeframes (weekly/daily) to catch the large moves/trends in the market.
Most have heard of long-term trend following. Few know how to execute the strategy.
Our scripts are designed specifically to identify and invest in long-term market trends.
What does this script do?
It produces entry signals in a confirmed bull and bear trend.
The logic is based on Donchian 20, which serves the following two purposes:
1. Confirms end-of-day entry points in a long-term trend
2. Filters out entry points in a sideways market
The signal is produced on a break and close of the Donchian 20 high in a bull trend and a break and close of the Donchian 20 low in a bear trend.
How is the entry price produced?
The entry is based on a percentage value of the range of the breakout bar added to the high of the bar in a bull trend.
In a bear trend, the percentage is subtracted from the low of the bar.
This gives an objective entry when placing a position once the OHLC of a bar is confirmed at the end of the trading day.
How is the stoploss price produced?
The script uses the formula ATR 15 x 4.
We use ATR as it produces a stoploss which is unique to the volatility of the asset. The more volatile the asset, the wider the stoploss.
We use ATR 15 as it brings an average reading across half a month, incorporating days of extreme volatility.
The multiplier 4 works well to avoid positions being stopped out prematurely on pullbacks.
When the stoploss is hit, there is when traders and investors may consider exiting positions.
What is the best timeframe to use the script?
We recommend the daily timeframe as this is where trader and investors identify and enter long-term market trends.
The higher timeframes are where traders and investors take fewer positions but hold for longer time periods.
As a result, trend followers place priority on the quality of the entry rather than quantity.
What makes this script unique?
This script has been coded specifically for the daily timeframe to:
Highlight the start of a potential long-term trends.
Confirm entry points at the end of the trading day, absorbing intraday noise.
Reduce fake breakouts in a trend.
Continue to create entry points as the trend develops to allow for compounding.
Filter out breakouts in a sideways market.
This entry signal script helps traders and investors focus on the quality of a potential position when investing in long-term market trends.
Parabolic SAR + EMA 200 + MACD SignalsParabolic SAR + EMA 200 + MACD Signals Indicator, a powerful tool designed to help traders identify optimal entry points in the market.
This indicator combines three popular technical indicators: Parabolic SAR (Stop and Reverse), EMA200 (Exponential Moving Average 200) and MACD (Moving Average Convergence Divergence) - to provide clear and concise buy and sell signals based on market trends.
The MACD component of this indicator calculates the difference between two exponentially smoothed moving averages, providing insight into the trend strength of the market. The Parabolic SAR component helps identify potential price reversals, while the EMA200 acts as a key level of support and resistance, providing additional confirmation of the overall trend direction.
Whether you're a seasoned trader or just starting out, the MACD-Parabolic SAR-EMA200 Indicator is a must-have tool for anyone looking to improve their trading strategy and maximize profits in today's dynamic markets.
Buy conditions
The price should be above the EMA 200
Parabolic SAR should show an upward trend
MACD Delta should be positive
ُSell conditions
The price should be below the EMA 200
Parabolic SAR should show an downward trend
MACD Delta should be negative
Reversal Signals [LuxAlgo]The Reversal Signals indicator is a technical analysis tool that aims to identify when a trend is fading and potentially starting to reverse.
As a counter-trend tool, the Reversal Signals indicator aims to solve the problem of several technical analysis indicators that perform well during trending markets but struggle in ranging markets. By understanding the key concepts and applications of the tool, traders can enhance their market timing and improve their trading strategies.
Note: It's important to explore the settings of the indicator to customize to your own usage & display as there are various options available as covered below.
🔶 USAGE
The Reversal Signals indicator is comprised of two main phases: Momentum Phase and Trend Exhaustion Phase . These phases help identify potential trend reversals in bullish, bearish, and ranging markets.
🔹The Momentum Phase
The momentum phase consists of a 9-candle count and in rare cases 8-candle count. In a bullish trend, a starting number ‘1’ is plotted if a candle closes higher than the close of a candle four periods ago. In a bearish trend, a starting number ‘1’ is plotted if a candle closes lower than the close of a candle four periods ago.
The following numbers are plotted when each successive candle satisfies the four-period rule. The potential reversal point comes when the Reversal Signals plot a label on top of a candle in a bullish trend or at the bottom of a candle in a bearish trend. The momentum phase is immediately canceled if, at any point, a candle fails to satisfy the four-period rule.
Based on the extremes of the momentum phase, the Reversal Signals generate support & resistance levels as well as risk/stop levels.
🔹 The Trend Exhaustion Phase
The trend exhaustion phase starts after completing the momentum phase and consists of a 13-candle count. In a bullish trend exhaustion phase, each candle’s close is compared to the close of two candles earlier, and the close must be greater than the close two periods earlier. In a bearish trend exhaustion phase, each candle’s close is compared to the close of two candles earlier, and the close must be lower than the close two periods earlier.
The trend exhaustion phase does not require a consecutive sequence of candles; if the order of candles is interrupted, the trend exhaustion phase is not canceled. The trend exhaustion phase generates stronger trading signals than the momentum phase, with the potential for longer-lasting price reversals.
🔹 Trading Signals
The Reversal Signals script presents an overall setup and some phase-specific trade setup options, where probable trades might be considered. All phase-specific trade setups, presented as options, are triggered once the selected phase is completed and followed by a price flip in the direction of the trade setup.
Please note that those setups are presented for educational purposes only and do not constitutes professional and/or financial advice
- Momentum: Enter a trade at momentum phase completion, and search for buy (sell) when the bullish (bearish) momentum phase pattern is complete. Ideally, the momentum phase completion should close near its support/resistance line but shall not be above them, which indicates continuation of the trend
- Exhaustion: Enter a trade on trend exhaustion phase completion, and search for buy (sell) when the bullish (bearish) trend exhaustion phase is complete
- Qualified: Buy (sell) when a bullish (bearish) trend exhaustion phase combined with another bullish (bearish) momentum phase sequence is complete
Long trade setups are presented with "L" label and short trade setups with "S" label, where the content of the label displays details related to the probable trade opportunity
Once a phase-specific trade setup is triggered then the Reversal Signals script keeps checking the status of the price action relative to the phase-specific trade setups and in case something goes wrong presents a caution label. Pay attention to the content of the caution labels as well as where they appear. A trade signal, followed immediately by a warning indication can be assumed as a continuation of the underlying trend and can be traded in the opposite direction of the suggested signal
It is strongly advised to confirm trading setups in conjunction with other forms of technical and fundamental analysis, including technical indicators, chart/candlestick pattern analysis, etc.
🔶 DETAILS
The Reversal Signals script performs the detection of the phases by counting the candlestick meeting the specific conditions, which includes:
- Detection of the 8th and 9th candle perfection during the momentum phase
- In some cases, the 8th count will be assumed as momentum phase completion
- Trend exhaustion phase counting stops in case any type of momentum phase completion is detected during the counting process
- Postponing the last count of the trend exhaustion phase, the 13th candle must be below/above the 8th candle and if not the candles will be indicated with '+' sign under them and the script continues to search for a 13th candle at the next ones until the conditions are met
🔶 ALERTS
When an alert is configured, the user will have the ability to be notified in case;
Momentum / Trend Exhaustion phase completion
Support & Resistance level cross detection
Stop / Risk level cross detection
Long / Short Trade Setups are triggered
Please note, alerts are available with 'any alert() function call' and the alerts will be received only for the features that are enabled during alert configuration
🔶 SETTINGS
🔹 Momentum Phase
Display Phases: displays the momentum phases, where the Completed option allows the display of only completed momentum phases. The detailed option allows the display of the entire process of the momentum phase processes
Support & Resistance Levels: Toggles the visibility of the Support & Resistance Levels and Line Styling options
Momentum Phase Risk Levels: Toggles the visibility of the momentum phase Stop/Risk Levels and Line Styling options
For color options please refer to the options available under the style tab
🔹 Trend Exhaustion Phase
Display Phases: displays the trend exhaustion phases, where the Completed option allows the display of only completed trend exhaustion phases. The detailed option allows the display of the entire process of the trend exhaustion phase processes
Trend Exhaustion Phase Risk Levels: Toggles the visibility of the trend exhaustion phase Stop/Risk Levels
Trend Exhaustion Phase Target Levels: Toggles the visibility of the trend exhaustion phase Target Levels
For color options please refer to the options available under the style tab
🔹 Trade Setups
Overall Trend Direction & Trade Setup: displays the overall trend and probable trade setup levels, the users should search for a price flip and confirm with other means of technical and fundamental analysis for the trade setups once the label is plotted
Phase-Specific Trade Setup Options
Momentum: Searches for a trade setup after momentum phase completion
Exhaustion: Searches for a trade setup after trend exhaustion phase completion, stronger trend reversal possibility compared to momentum phase setup
Qualified: Searches for a trade setup after the trend exhaustion phase followed by a momentum phase completion
None: No trade setups are presented
Price Flips against the Phase Specific Trade Setups: enables checking the price action relative to the phase-specific trade setups
🔶 RELATED SCRIPTS
Here are the scripts that may add additional insight during potential trading decisions.
Buyside-Sellside-Liquidity
Support-Resistance-Classification
Oscillator buy and sellThe oscillator in the provided script is a custom indicator designed to help identify choppy market conditions and generate buy and sell signals based on the direction of the price movement. It is derived from the ATR (Average True Range) and the percentage of the ATR relative to the closing price. When the ATR percentage is below the specified threshold, the market is considered choppy. In this script, the oscillator has a value of 1 when the closing price is higher than the opening price, and -1 when the closing price is lower than the opening price.
How to use the buy and sell signals:
1. Buy Signal: When the oscillator transitions from a negative value to a positive value, a buy signal is generated. This indicates that the price is moving upwards, and it might be a good opportunity to enter a long position. A green arrow will appear below the candlestick where the buy signal is generated.
2. Sell Signal: When the oscillator transitions from a positive value to a negative value, a sell signal is generated. This indicates that the price is moving downwards, and it might be a good opportunity to enter a short position or close an existing long position. A red arrow will appear above the candlestick where the sell signal is generated.
It is essential to remember that this oscillator is a simple tool and should not be solely relied upon for making trading decisions. It is recommended to use this oscillator in conjunction with other technical analysis tools and indicators to improve the accuracy of your trading decisions. Additionally, always consider your risk tolerance and trading strategy before entering or exiting trades.
Boftei's StrategyI wrote this strategy about a year ago, but decided to publish it just now. I have not been able to implement this strategy in the market. If you can, then I will be happy for you.
This strategy is based on my "Botvenko Script". (It finds the difference between the logarithms of closing prices from different days.) (Check this script in my profile)
Then the strategy makes trades when the "Botvenko Script" indicator crosses the levels set earlier and manually selected for each currency pair/shares: long/short opening/closing levels, long/short re-entry levels. (They are drawn with horizontal dotted lines.) The names of these lines are: buy/sell level, long/short retry - too low/high, long close up/down, dead - close the short. Manual selection of each of the parameters provides a qualitative entry of the strategy into the deal. However, without restraining mechanisms, the strategy enters into rather controversial deals. In order to avoid going long/short during bear/bull markets, which is unacceptable, I added a fan of EMA lines.
The fan consists of several EMA lines, which are set according to Fibonacci numbers (21, 55, 89, 144). If the lines in the fan are arranged in ascending order (ema_21>ema_55 and ema_55>ema_89 and ema_89>ema_144), then this indicates a bull market, during which I banned shorting. And vice versa: during the bear market (ema_21<ema_55 and ema_55<ema_89 and ema_89<ema_144) I banned long trading. If these two inequalities are not met, then this indicates that the market is flat, and during it it is allowed to enter any transactions, because a flat is a good moment to catch massive movements in the future by entering a transaction. (This is all visualized using semi-transparent thick lines of green, yellow and red colors.)
By default, all parameters are adjusted for the btc/usd (bitstamp) pair. Best of all, the strategy shows itself if 1 candle = 1 day.
At the time of writing, on the pair btcusd (bitstamp) (1d) with pyramiding = 1, the strategy shows a profit of 64728896%. If pyramiding is increased by 1, then the profit will be greater, but I still prefer pyramiding = 1.
There is a possibility that my strategy is doing complete nonsense. I don't vouch for her.
If you select parameters for other pairs of currencies/stocks, then you should not change anything in the fan of lines.
That's all, probably.
Long & Short / Bullish & Bearish & Neutral / Sentiment LONG and SHORT signal generation:
The LONG and SHORT signals in this script are generated based on a combination of sentiment, price strength, and volume strength calculations. The following parameters and calculations are used in determining these signals:
Sentiment:
The sentiment is calculated using a Simple Moving Average ( SMA ) of the SMO (oscillator) over a specified sentiment_length.
Price Strength:
The price strength is calculated as the percentage change in the closing price compared to the previous closing price.
Volume Strength:
The volume strength is calculated as the percentage change in the trading volume compared to the previous trading volume .
Custom Oscillator:
This oscillator is calculated as the difference between price strength and volume strength, followed by calculating its SMA over a specified strength_length.
The LONG signal is triggered when:
The sentiment_diff (difference between the oscillator and the SMA oscillator) is greater than 0, and the close price is greater than the fast EMA ( Exponential Moving Average ) of the close price, OR
The custom oscillator crosses over its SMA , and the close price is greater than the open price, and the close price of the previous period is greater than the close price of two periods ago.
The SHORT signal is triggered when:
The sentiment_diff is less than 0, and the close price is less than the fast EMA of the close price, OR
The custom oscillator crosses under its SMA , and the close price is less than the open price, and the close price of the previous period is less than the close price of two periods ago.
Color change description:
The color change in this script is based on the relationship between the close price and the highest/lowest SMAs of the high/low price over a specified lengthInputRoR. The following colors are used:
Green:
Bullish area (close price is greater than the highest SMA of the high price)
Red:
Bearish area (close price is less than the lowest SMA of the low price)
Yellow:
Neutral area (close price is between the highest and lowest SMAs of the high and low prices)
Color meaning description:
Yellow (Neutral Area):
This color indicates that the close price is between the highest and lowest SMAs of the high and low prices, signaling more caution and uncertainty in the market.
Green ( Bullish Area):
This color represents a bullish market condition where the close price is greater than the highest SMA of the high price, suggesting a higher probability of a successful LONG position.
Red ( Bearish Area):
This color signifies a bearish market condition where the close price is less than the lowest SMA of the low price, indicating a higher probability of a successful SHORT position.
Support and Resistance lines explanation:
Support and resistance lines are calculated based on the highest and lowest prices over a specified number of periods. These lines are used to identify significant price levels where the market may experience increased buying or selling pressure.
Resistance:
The resistance line is calculated using the highest high price over a specified number of periods. This line represents a price level where selling pressure is expected to increase, making it more difficult for the price to rise further. Traders often consider resistance levels as potential entry points for SHORT positions or exit points for LONG positions.
Support:
The support line is calculated using the lowest low price over a specified number of periods. This line represents a price level where buying pressure is expected to increase, making it more difficult for the price to fall further. Traders often consider support levels as potential entry points for LONG positions or exit points for SHORT positions.
The resistance and support lines are plotted using different colors to help traders visualize the important price levels where the market may experience a reversal or consolidation.
Final Words:
This script provides LONG and SHORT signals and alerts based on a combination of sentiment, price strength, and volume strength calculations. It is designed to serve as a high-quality aid for executing well-informed trading ideas. However, it's important to note that the LONG and SHORT signals and alerts generated by this script should not be considered as trading advice. Traders should always conduct their own research and analysis before making any trading decisions. The script aims to assist in visualizing important market trends and price levels, helping traders make more informed decisions based on their personal trading strategies.
SLSMA PullbacksThis script picks up two types of pullbacks using the SLSMA line. The pb1 signal picks up a fast first pullback as price action breaks the SLSMA line. The pb2 signal detects a stronger pivot with the trend. There is an option to filter pb1 signals with trend in the settings. Lower highs and Higher lows are displayed as labels along the SLMSA line. This tool can be overlaid on your chart or over an indicator using it as its external source.
DojiCandle body size RSI-SMMA filter MTF
DojiCandle body size RSI-SMMA filter MTF
Hi. I was inspired by a public script written by @ahmedirshad419, .
I thank him for his idea and hard work.
His script is the combination of RSI and Engulfing Pattern.
//------------------------------------------------------------
I decided to tweak it a bit with Open IA.
I have changed:
1) candle pattern to DojiCandle Pattern;
2) I added the ability for the user to change the size of the candlestick body;
3) Added SMMA 200;
4) Changed the colour of SMMA 200 depending on price direction;
5) Added a change in the colour of candlesticks, depending on the colour of the SMMA 200;
6) Added buy and sell signals with indicator name, ticker and close price;
7) Added ability to use indicator on multi time frame.
How it works
1. when RSI > 70 > SMMA 200 and form the bullish DojiCandle Pattern. It gives sell signal
2. when RSI < 30 < SMMA 200 and form the bearish DojiCandle Pattern. It gives buy signal
settings:
basic setting for RSI, SMMA 200 has been enabled in the script to set the levels accordingly to your trades
Enjoy
[TTI] Whaley Breadth Thrust––––History & Credit
The Whaley Breadth Trust is a powerful signal that has a great success rate. It was invented by Wayne Whaley in 2009. Since 1970 to 2009, the signal has occured only 12 times!
–––––What it does
The indicator uses 3 conditions.
Condition 1: The Advancing and Declining NYSE stocks
Condition 2: The Up and Down volume
Condition 3:The absolute price increase in the SP500
It calculates different ratios and determine bullish or bearish setting based on this.
When only conditions 1 and 2 are present, we call this a Light Thrust. When all 3 conditions have occured then we call this Full Thrust.
–––––How to use it
Consider very bullish signal when you see this.
The light thrust occured on 12JAN23 on the SPX.
The signal occured in the following years: 1974, 1982, 1987, 2002, 2008
Buy Sell Signal ScannerThis is a higher timeframe scanner that detects whether the market is bullish or bearish according to our Buy Sell Indicator on up to 8 different timeframes. It can also be customized to scan different tickers so you can scan tickers that typically move with or against the ticker you are trading for extra confirmation. The scanner can be configured to use the exact same settings that you use with the Buy Sell Indicator so everything is using the same formula.
For price action identification, scalp mode looks at the candle body, candle wicks and size of the body and wicks and compares all of that to the previous candle to see if it is bullish or bearish. Swing mode will compare the current candle to the last 2 candles and long swing mode will compare the current candle to the last 10 candles. It’s looking for higher highs & lower lows, if the candle body is large or small and much more.
There are also filters that prevent signals from being given when the candle is small or has not made a higher high or lower low compared to the previous candle and multiple other filters to help hold positions longer. Once the price action direction has been confirmed, then the script looks at a massive amount of other calculations to determine if a signal should be given or not. These calculations are made up of all of my best indicators combined into a master signal generator as well as more new calculations from things I have learned over time and tested extensively that have not been made available to the public until now.
Price action as well as many other factors will all have to be confirming the direction before a signal can come in, but it reacts very quickly so it can give early signals at the first sign of reversal. Fine tune your settings to match your Buy Sell Indicator settings to get the same signals on the scanner.
HOW TO USE
The scanner will show the higher timeframe in a table on the side of the chart if no other ticker is selected to scan. The timeframe cell will show as green if that timeframe is currently in a bullish signal and red if that timeframe is currently in a bearish signal. If you set it to use a different ticker, the ticker name and timeframe will show up in the table.
The defaults are set up to scan the same ticker as your chart but on higher timeframes. It is set up for a 1 minute chart by default, but each timeframe can be adjusted to suit your preference all the way up to a 1 year timeframe.
You can set the scanner to look at different tickers as well which is very useful for getting confirmation by setting it to scan other tickers that usually move in the same direction or opposite of the ticker you are trading.
TRADE MODE
The signal settings allow you to match the scanner settings to your settings on the Buy Sell Indicator. There is scalp mode, swing mode and long swing mode. All 3 settings use the same calculations for signals, but they have different price action filters to help hold swings longer. Scalp mode will only be looking at the current bar compared to the previous bar, but swing mode will look at the current bar compared to the previous 2 candles. Long swing mode will compare the current candle to the last 10 candles to hold positions even longer.
There is also a candle trailing length that can be adjusted as well to suit your preference. This adds a filter that ensures the current candle is closing higher than the previous X number of candles you choose for a bull signal and is closing lower than X number of previous candles for a bear signal. Make sure to match these settings to how your Buy Sell Indicator is configured to get matching results.
You can also move the position of the scanner table to any part of the chart in the settings menu at the bottom.
ALERTS
There are alerts set up that will give you a signal when all timeframes are bullish on candle close and another signal that will alert when all timeframes are bearish on candle close. There is also an alert for when the first 4 timeframes & ticker are bullish and the last 4 timeframes & ticker are bearish or the opposite. This is useful for looking at forex markets and setting the first 4 to tickers that move together and the last 4 to tickers that move opposite.
MARKETS
This Buy Sell Signal Scanner can be used on any market with price data such as stocks, crypto, forex and futures.
TIMEFRAMES
This Buy Sell Signal Scanner can be used on any timeframe. And will scan any of our available timeframes between 1 minute and 1 year.
PAIRINGS
We recommend pairing this Buy Sell Signal Scanner with our Buy Sell Indicator so you can get signals and price action colored candles on the ticker you are trading and then use the scanner for confirmation of trend on higher timeframes and trade with the trend.
Buy Sell IndicatorThis Buy Sell Indicator uses price action calculations to determine the bullish or bearish nature of the current market and then calculates if the price action is strong enough to give a signal. The indicator is fully adjustable so you can fine tune it to fit your specific trading style with Scalp Mode, Swing Mode, Long Swing Mode and candle trailing length. It also has an automatic trailing stop loss and take profit features that can be customized.
For price action identification, scalp mode looks at the candle body, candle wicks and size of the body and wicks and compares all of that to the previous candle to see if it is bullish or bearish. Swing mode will compare the current candle to the last 2 candles and long swing mode will compare the current candle to the last 10 candles. It’s looking for higher highs & lower lows, if the candle body is large or small and much more.
There are also filters that prevent signals from being given when the candle is small or has not made a higher high or lower low compared to the previous candle and multiple other filters to help hold positions longer. Once the price action direction has been confirmed, then the script looks at a massive amount of other calculations to determine if a signal should be given or not. These calculations are made up of all of my best indicators combined into a master signal generator as well as more new calculations from things I have learned over time and tested extensively that have not been made available to the public until now.
Price action as well as many other factors will all have to be confirming the direction before a signal can come in, but it reacts very quickly so it can give early signals at the first sign of reversal. Fine tune your settings to match your trading style from within the input settings and then look for potential reversal areas and take signals that appear in that reversal area for the highest probability of winning trades. I decided not to include any support or resistance or similar tools in order to keep the indicator lightweight and respond as fast as possible as well as update the candles as quickly as possible. This also lets you keep your charts clean and only use the support & resistance tools that you prefer since everyone has a different trading style.
HIGHER TIMEFRAME AND/OR MARKET SCANNER
There is also a higher timeframe scanner available as a separate indicator titled Buy Sell Signal Scanner that you can find on my profile. It can be customized to show you up to 8 higher timeframes of your current ticker or any other ticker you like. This is useful for trading with the trend of the higher timeframes or you can set it to the same timeframe as your chart and scan other tickers that usually move together or opposite for extra confirmation. Each ticker/timeframe will be displayed in a table on the chart and colored green or red depending if it is currently bullish or bearish. If you are using a different timeframe than the current chart, then it will display the timeframe next to the ticker name.
HOW TO USE
CANDLES
The candles will paint blue or orange according to the price action detected. This can be customized or turned on/off and will follow the price action according to the trade mode settings. Using these candle colors helps to get rid of anxiety when watching candles come in that are in the opposite direction of your trade. I highly recommend using this feature as it helps you control your emotions much better during trading.
TRADE MODE
The trade mode settings let you choose between Scalp Mode, Swing Mode and Long Swing mode. They all use the same price calculations, but each mode has its own filters to hold through ranging price action in a slightly different way. You can also adjust the candle trailing length to make it hold positions even longer. The candle trailing length will not let a signal come in until there is a higher high or lower low than the previous X number of candles from this setting.
Scalp mode will get you in and out of positions the earliest. Swing mode will hold signals longer by filtering out ranging price action. Long swing mode uses even more filtering to hold positions even longer than swing mode and let price range more without calling out every move. Each one of these modes will also be affected by the candle trailing length.
It should be noted that using swing mode and long swing mode or increasing the candle trailing length will make the signals not perform as well when price action is whipsawing up and down and also will not have as early of entries and exits as scalp mode due to the range breaks that are needed for a signal to be given. That being said, it will hold positions much longer when markets are trending and still have great entries and exits, so use the longer settings when markets are trending and then switch to scalp mode when the market is chopping around and moving sideways for best results.
Scalp Mode
Swing Mode
Long Swing Mode
STOPLOSS
There is an automatic stoploss feature as well. It calculates the average candle height and adds/subtracts that from the highest high or lowest low of the past X number of candles according to your Stoploss Candle Trail Length. Use a lower number for a tight trailing stoploss and increase the number for a more loose stoploss. You can also customize the color of the stoploss line and label or turn it off if you prefer. The stoploss will update on every candle for proper trailing but it will not switch to an opposing signal until the candle closes with a new signal.
TAKE PROFIT
There is an automatic take profit level generator as well that also uses the average candle height for its calculations. There are 3 settings that let you set the average candle size multiplier for each take profit level. The default settings are evenly spaced at 3, 6 and 9 times the average candle height from where the most recent signal locked in at candle close. Adjust these numbers to suit your preference. You can also customize the color of the take profit lines and label or turn it off if you prefer. The take profit levels will not change to an opposing signal until the opposing signal is confirmed on the candle close.
Auto Stoploss & Take Profit
SIGNALS
The default signals are green and red arrows. The color can be adjusted in the settings or you can turn the bull or bear signals on or off if you only want entry signals for the direction of the trend.
VOLUME SPIKE SUPPORT & RESISTANCE
There are volume based auto support & resistance levels that are off by default, but can be turned on in the settings. It calculates the average volume over multiple periods and gets the average of that and then looks for volume spikes that were greater than the average, multiplied by the volume spike multiplier in the settings. If set to 3, then the volume spike will need to be 3 times or higher than the average volume bar for a level to show up. Increase or decrease this number to get more or less levels.
VOLUME WARNING
If volume is very low compared to normal, then a volume warning label will appear at the top of the chart letting you know that volume is very low and to trade with caution. I recommend not trading during those times though as price can whipsaw very easily.
ALERTS
There are also alerts that can be triggered for buy signals as well as sell signals. They are set to only send signals when the bar is confirmed so you won’t get alerts for signals that repaint while the candle is still open. You can use these alerts to send signals to your own trading bot if you choose to.
MARKETS
This buy sell indicator can be used on any market with price data such as stocks, crypto, forex and futures.
TIMEFRAMES
This buy sell indicator can be used on any timeframe.
PAIRINGS
We recommend pairing this Buy Sell Indicator with our Buy Sell Signal Scanner so you can check other timeframes and trade with the trend or use the scanner to look at other markets that move together or opposite of the ticker you are trading for extra confirmation of direction.
Alex trading stragedyOverview
This script, named "ALEX TRADING STRATEGY", is a technical trading strategy designed for new investing groups. It uses a combination of various technical indicators to identify potential buying and selling opportunities in the market. The script includes the Relative Strength Index (RSI), Simple Moving Averages (SMA), Exponential Moving Averages (EMA), and Higher High Lower Low (HHLL) strategies to create a complete trading solution.
The user can change the position from long to short in the Input Settings. The script uses bar colors to indicate the current trading position. The script also has exit strategies to help manage the open trades. The user can also set the period for the various indicators used in the strategy.
The script provides various technical indicators and entry/exit signals to make the trading decision easier for the user. It also includes pivot lines, resistance and support levels to help the user make a more informed decision.
This Pine script implements a multi-indicator trading strategy that combines several technical analysis techniques for making trading decisions. The script uses the Relative Strength Index (RSI) to determine overbought and oversold conditions in the market and plots the RSI values on the chart. The RSI values above 70 are considered overbought and plotted as red upward triangles, while the RSI values below 30 are considered oversold and plotted as green downward triangles.
The script also calculates Simple Moving Averages (SMAs) with the user-defined period and plots them along with the Exponential Moving Averages (EMAs) of 20, 50, and 100 periods. Based on the crossover of the close price and the moving averages, the script enters long or short trades. The script sets the trade exit conditions as the low or high crossing the lower or upper band, respectively.
In addition to the moving average crossover, the script uses the highest high and lowest low over a user-defined period to determine long and short entries. The script plots the long and short conditions on the chart as green upward and red downward triangles, respectively. The script allows the user to switch between long and short trades by changing the input settings.
Finally, the script changes the bar colors based on the trade direction, with green bars indicating a long trade, red bars indicating a short trade, and blue bars indicating no trade. Overall, this Pine script provides a comprehensive trading strategy that combines several technical analysis techniques to make informed trading decisions.
HOW TO USE
Input Settings: In the Input Settings section, you can change the long to short position. You can also change the period value (default is 10) used to calculate the Simple Moving Average (SMA) for the Keltner channel.
Indicators: The script uses RSI (Relative Strength Index) with 14 periods as well as multiple EMAs (Exponential Moving Averages) with periods 20, 50, and 100 to help in making trading decisions.
Entry Signals: The script uses two main entry signals: (1) Keltner Channel and (2) HHLL (High-Low). When the closing price crosses above the upper band of the Keltner channel, the script generates a long signal, and when the closing price crosses below the lower band of the Keltner channel, the script generates a short signal. The HHLL strategy generates a long signal when the current high crosses above the highest high of the last "nPeriod" bars, and generates a short signal when the current low crosses below the lowest low of the last "nPeriod" bars.
Exit Signals: The script uses two exit signals: (1) Stop Loss based on Keltner channel and (2) Profit Target based on Keltner channel. The script exits the long position when the closing price crosses below the lower band of the Keltner channel, and the script exits the short position when the closing price crosses above the upper band of the Keltner channel.
To use this script, you will need to have access to a trading platform that supports PineScript, such as TradingView, and attach the script to a chart. The script will then automatically generate entry and exit signals based on the rules described above. It's important to note that this script is just a tool and not a guarantee of profit. As with any trading strategy, it's important to thoroughly test and understand the script before using it for live trading.
Signal ViewerThe "Signal Viewer" script is a debugging tool that can be used for the signal of a Signal Indicator script like the "Two MA Signal Indicator" or the "Template Signal Indicator". This script will visualize the signal based on the convention that was defined in the settings. Also, alerts will be produced based on this convention. It's useful to be used before you connect the signal indicator script to a template strategy like the "Template Trailing Strategy" script. You can cross-validate the correctness of the signal that the indicators emit and make sure it is aligned with the expected behavior after the decomposition of the signal using the convention described in the settings. Please make sure that the connection in the "Signal Viewer" script matches the convention used by the template strategy script.
Strength Index I2-SIIdea:
Enhance the Stoch RSI with DMI to get the visualization of the strength movement.
Concept:
(Note that we take the close to get the closing price).
-Combination of 2 Stoch RSI (using value K): 1 is UP, 1 is DOWN (these settings have been customized).
-Every time they cross, it calculates the direction of 3 nearly previous crossings to get the color of the current line.
-The value has been re-calculated with the processed value from ADX and DI- (That's why it can be more than 100 or -100 in some cases).
-RSI Overbuy and oversell are removed because the value could be beyond it.
How it works:
1. The line is show as the strength index of bars
- Green means the up strength is strong.
- Red means the down strength is strong.
- Gray means the previous strength is getting week.
2. This one can be used to find divergence.
3. This indicator provides a warning signal when the color of the line changes:
- Change color:
+Turn red: "Down Red"
+Turn green: "Up Green"
+Turn gray: "Down Gray"/"Up Gray"
Suitable time frames:
15m, 4h, 1D, 1W
* Please note that this logic does not attempt to predict future prices or 100% accurate signal.
(INVITE ONLY indicator. Please direct message or visit website if you want to try it out)
Hope you guys enjoy!
Examples:
BTCUSD 1D
XAUUSD 4H
EURUSD 1H
SPX 15m
Trend Movement S1-TMIdea:
This script combines: Moving Average (MA), Directional Movement (DMI), MACD
When condition of long or short position from all mentioned indicator are met script opens position. Once trend changes, it closes the position.
Then add some filter conditions to avoid noise.
Concept:
(Note that we take the close to get the closing price)
-Using only cross up down with MA will give a reversal point, but the downside is that it can be noisy.
-MACD will show the current trend detected by cross point.
-Then the +DI , -DI , ADX values are taken into account to confirm the price direction and movement strength.
-This strategy solves this problem by combining 2 more moving averages called 2 trend lines 1 long and 1 short. When the short line crosses up, it will show that the price trend is increasing (at this time the background between these 2 lines will be green) and vice versa (red). To determine if the current trend is bullish or bearish . This will avoid buying when price tend to go down.
-However, there will be many points where some more complex logic is needed. It will add conditions and calculate the probabilities before triggering the signals (You can see them through the item symbols B1, B2, ... ).
How it works:
1. The thin line is stand for short term moving average, and the thick line is stand for long term moving average.
If thin lines cross the thick lines, their color and background will turn green, the price is tend to go up (Uptrend).
If thin lines cross down thick lines, their color and background will turn red, the price is tend to go down (Downtrend).
2. Ability to check the checkbox in setting to show the Golden/De*ath cross.
The yellow symbol "+" is the Golden cross.
The black symbol "+" is the De*th cross.
3. Buy and Sell are show clearly on strategy as the buy and sell point. The default source from bar is CLOSE
4. Setting "Buy only" it using for spot market.
5. When "Not buy in down trend" is checked, it will not trigger buy when in down trend (thin lines cross down thick lines like description in 1.)
6. Setting High spread will call Close buy when it match the High spread bar with the High spread % value
7. It provides setting "Back test From date/To date" for backtest feature. You can set "BacktestFrom date" as the begin of test period. If check box "Using To Date" is check: "Backtest To Date" will be the end of test period.
Suitable time frames:
4h, 1D, 1W
* Please note that this logic does not attempt to predict future prices or 100% accurate signal; Strategy Tester are available to test the profitability of this strategy.
(INVITE ONLY indicator. Please direct message or visit website to try it out)
Hope you guys enjoy!
Examples:
BTCUSD 4H
TSLA 4H
Daily Number/Trend Reversal IndicatorIndicator identifies potential price trend exhaustion.
Compares this period against the 4th prior period for the condition.
9 periods (or more) with the same condition is an indicator that the trend is ending soon.
SignalBuilderSignalBuilder
Utility for building a collection of signal values. Provides a default view for displaying signals.
Simplified API for aggregating signal values.
Flexible for use with indicators and strategies.
See the demo section for an example.
TurntLibraryLibrary "TurntLibrary"
Collection of functions created for simplification/easy referencing. Includes variations of moving averages, length value oscillators, and a few other simple functions based upon HH/LL values.
ma(source, length, type)
Apply a moving average to a float value
Parameters:
source : Value to be used
length : Number of bars to include in calculation
type : Moving average type to use ("SMA","EMA","RMA","WMA","VWAP","SWMA","LRC")
Returns: Smoothed value of initial float value
curve(src, len, lb1, lb2)
Exaggerates curves of a float value designed for use as an exit signal.
Parameters:
src : Initial value to curve
len : Number of bars to include in calculation
lb1 : (Default = 1) First lookback length
lb2 : (Default = 2) Second lookback length
Returns: Curved Average
fragma(src, len, space, str)
Average of a moving average and the previous value of the moving average
Parameters:
src : Initial float value to use
len : Number of bars to include in calculation
space : Lookback integer for second half of average
str : Moving average type to use ("SMA","EMA","RMA","WMA","VWAP","SWMA","LRC")
Returns: Fragmented Average
maxmin(x, y)
Difference of 2 float values, subtracting the lowest from the highest
Parameters:
x : Value 1
y : Value 2
Returns: The +Difference between 2 float values
oscLen(val, type)
Variable Length using a oscillator value and a corresponding slope shape ("Incline",Decline","Peak","Trough")
Parameters:
val : Oscillator Value to use
type : Slope of length curve ("Incline",Decline","Peak","Trough")
Returns: Variable Length Integer
hlAverage(val, smooth, max, min, type, include)
Average of HH,LL with variable lengths based on the slope shape ("Incline","Decline","Trough") value relative to highest and lowest
Parameters:
val : Source Value to use
smooth
max
min
type
include : Add "val" to the averaging process, instead of more weight to highest or lowest value
Returns: Variable Length Average of Highest Lowest "val"
pct(val)
Convert a positive float / price to a percentage of it's highest value on record
Parameters:
val : Value To convert to a percentage of it's highest value ever
Returns: Percentage
hlrange(x, len)
Difference between Highest High and Lowest Low of float value
Parameters:
x : Value to use in calculation
len : Number of bars to include in calculation
Returns: Difference
midpoint(x, len, smooth)
The average value of the float's Highest High and Lowest Low in a number of bars
Parameters:
x : Value to use in calculation
len
smooth : (Default=na) Optional smoothing type to use ("SMA","EMA","RMA","WMA","VWAP","SWMA","LRC")
Returns: Midpoint
Signal AnalyzerThis library contains functions that try to analyze trading signals performance.
Like the % of average returns after a long or short signal is provided or the number of times that signal was correct, in the inmediate 2 candles after the signal.
MarsMine_PEMTThis indicator uses a total of four indicators, 'ParabolicSAR', 'EMA', 'MACD', and 'TSI', to indicate the direction of the trend as well as the progress signal of the trend.
Basically, the overall trend is analyzed by the 'EMA' and 'TSI' indicators, and the buying trend is displayed in green and the selling trend is displayed in red candlesticks.
An additional buy or sell signal is generated, which analyzes all the 'Parabolic SAR', 'EMA', 'MACD' and 'TSI' indicators to indicate the beginning of a trend that is slightly more accurate than the trend displayed on candlesticks.
-----
해당 지표는 'ParabolicSAR', 'EMA', 'MACD', 'TSI' 총 네 가지 지표를 활용하여 추세의 방향성과 함께 추세의 진행 신호를 알려주는 지표입니다.
기본적으론 전반적인 추세는 'EMA', 'TSI' 지표를 분석하여 매수 추세는 초록색 매도 추세는 빨간색으로 캔들에 표시해 주고 있습니다.
추가적으로 매수 또는 매도 신호가 발생하며, 이 신호는 'Parabolic SAR', 'EMA', 'MACD', 'TSI' 지표 모두를 분석하여 캔들에 표시되는 추세보다 조금 더 정확한 추세의 시작을 표시합니다.
MarsMine_OverThis indicator marks the area where the overbought/oversold section of the Stochastic RSI and the overbought/oversold section of the RSI overlap with arrows.
If an upward arrow appears on the indicator, it can be recognized that both StoRSI and RSI have entered the oversold zone.
When a down arrow appears, both the StoRSI and RSI can be considered to have entered the overbought zone.
This is a good signal to identify the direction of the future trend.
이 지표는 Stochastic RSI의 과매수/과매도 구간과 RSI의 과매수/과매도 구간이 겹치는 구간을 화살표로 표기 해주는 지표 입니다.
해당 지표에서 상승 화살표가 출현할 경우에는 StoRSI와 RSI 모두 과매도 구간에 진입했다고 인식할 수 있으며,
하락 화살표가 출현할 경우에는 StoRSI와 RSI 모두 과매수 구간에 진입했다고 인식할 수 있습니다.
이는 추후 추세의 방향성을 파악할 수 있는 좋은 시그널 입니다.
Band of Filtered RS by Mustafa ÖZVERBand of Filtered RS by Mustafa ÖZVER
This code shows a range (max-min values) price may get if we get strong movements. These values is based on RSI (Relative Strange Index). And also these are calculated using RSI, if we get trades to make rsi is equal to 25 (or rsi down limit) or 75 (rsi up limit) or any value you set, how much will price value get? This code calculate these and shows these to you on graph.
This price are between these band limits because we expect cross reaction to hard movements on price.
For scalping, we can use these values as
long signal when price under down limit,
short signal when price over up limit,
But only these values can not guarantee good results for trading. BE CAREFUL