Enhanced ShareGenius Swing TradingSwing Trading Strategy Features:
1. Point out candles where days low price matched 20 day low price (Blue Triangle with Yellow Bar)
2. Hollow Body candles depict days when days close is within the threshold of 20 day high (defaulted to 5%). An indication to start GTT buy orders.
3. Point out candles when GTT buy order was triggered (Light Green body)
Experimental:
1. Using tolerance to low price matching logic (instead of exact match)
As a result if the days low is within the tolerance, such candles will be highlighted with light blue triangle and yellow body
Канал Дончиана (DC)
Donchian Trendline - Support Resistance Slope [UhoKang]// This is a strategy that draws a trend line in the form of a slope whenever the high point and low point are updated.
// The upper slope serves as a resistance line, and the lower slope serves as a support line.
// Buy when the of the candle crosses the slope
Donchian Channels Multitimeframe JaimeSimple indicador with Donchian channels multitimeframe but you can see a cloud similar to ichimoku with the middle of the donchain channels between the actual timeframe and the upper one.
Advanced Donchian Channels
Advanced Donchian Channels displays future donchian channel values based on the current information on the chart.
It displays a normal donchian channel at the specified user length with the future values extending from the current bar.
Depending on the direction of price movement, these values do not repaint. It is known when it does and does not repaint, and the actions are normal. See below for more information.
In a down trend, when the price is making new lows, the future "channel low" value will update every time the low is broken. The mean will also update, since the mean is the average of the channel high and channel low.
In a downtrend, the "channel high" value is concrete . It will not update until the high is broken.
Reverse these examples for uptrends.
Q;
How does it know the future values?
A:
Consider This: If we are below the current highest high, going down (aka: not setting new highs), the donchian channel "high" value will create a flat top, the flat top will start to decrease after we go further than our specified length. This is because the highest high within our specified length is no longer what it was previously. This action of time decay is a consistent movement of donchian channels . Because of this I am able to calculate these values before the current bar actually reaches them.
The indicator calculates the current length donchian channel at the current bar and then for every future bar up to your length specified it subtracts 1 from your length, calculates and displays the values accordingly.
The farthest future value is 1 length and the current bar is your specified length.
VALUES WILL ONLY BE UPDATED WHEN THE CHANNEL HIGH OR LOW IS BROKEN.
If price stays within the channel, all the future channel values will become solidified when the time reaches them.
This is not a gimmick, This data is accurate and can be used to help see future price trends
This chart should assist in visualizing what data you are seeing in this indicator.
Enjoy!
Trend Breakout high/low #1What is the Trend Breakout high/low #1?
This script uses the high/low of each fixed time period as a conditional judgment, and when the high/low is broken as a buy/sell signal, trying to capture a trend.
How to use this script?
Start date and Stop date: You can choose the date of the test.
Trading cycle: Selected time period is used as the basis for determining the high/low and is limited to one trade only.
Stop range: This value will calculate the stop loss range. Set 50-100 that is better
Fixed mode: Fixed of lots per transaction.
---Additional Functions---
Reversal mode: Reversing the buy and sell signals, may be useful in certain situations.
Wighted mode: Increased profitability under certain conditions
When win & When lose:Judgment when there is an ongoing loss/profit as a condition, may be useful in certain situations.
Use closing price: Use the closing price breakout high/low as a conditional judgment, but this function sometimes fails.
Notes:
Trading cycle and your chart time period can't be set too close,that will result repainting.
Stop range can't be set too small,that will result repainting either.
Donchian Channels+Standard Donchian Channels, this includes a Trend EMA which can be configured and the channels will use to give buy and sell signals. The channels are also colored in such a way to indicate a trend reversals. My favorite part that sets this apart from others is, if using the bClose option (which I recommend you do) the trend will not reverse until there is a close above/below the previous channel high/low. i.e. a reversal into an uptrend requires the current bar to close above the previous upper channel rather than just a new high.
The coloring of the current trend allows for a quick read of current market conditions and I use this on any timeframe across all forms of charts (forex stock, futures , crypto, etc). When taking one of the signals I use the opposite channel as the stop loss (when buying use bottom, and selling use top channel)
Update 1:
- Added my name to the code
- Updated the picture to show off the indicator better
- Raised the brightness of the fill color a bit, looks nicer I think
As a warning: I have obviously hand picked this picture to really show off this indicator's power to work in a trending market. Donchian Channels are a trending indicator and work best in trending markets with decent pull backs. If there are multiple signals going in each direction, it is a choppy market and you should stay out until it starts trending again. I generally use a 1:1.5 risk to reward ratio but sometimes will stretch it to 1:2 if it is a nice trade and I feel the market is in my favor as you can see from the trades placed in the picture (and I use that method for any commodity / chart and timeframe). I use the close of the white candle and then (since they are trades going short) I use the upper Donchian Channel as my stop loss.
I personally like to have the lines and labels turned off and enable all other options. Labels are just there to really stand out so you don't miss the white candle indication for a trade. OH! Also, I've had comments from friends that the white candles are hard to see, I turn off my candle borders in settings; makes it super easy to see them then. I turn lines off as the fill does the job well enough and it seems cleaner in my eyes.
If you'd like to see this picture on your chart, it is Micro E-Mini S&P 500 Futures from July 10, 2022 @ 18:00 on the 1-min chart.
just now
Update 2:
- Added day trading time highlights
- Added ranging market indicator (This I'm still working on so use at your own discretion, it's intended purpose is to tell when the Donchian Channels are not going to give great signals and to use a ranging indicator instead)
- Added multi-timeframe trend screener (handy if you want to quickly see the trend direction (based on the Trend EMA you set) of several time frames without having to change charts). It will draw in the bottom right of the chart.
Donchian with Trend IndicatorStandard Donchian Channels, this includes a Trend EMA which can be configured and the channels will use to give buy and sell signals. The channels are also colored in such a way to indicate a trend reversal. My favorite part that sets this apart from others is, if using the bClose option (which I recommend you do) the trend will not reverse until there is a close above/below the previous channel high/low. i.e. a reversal into an uptrend requires the current bar to close above the previous upper channel rather than just a new high.
The coloring of the current trend allows for a quick read of current market conditions and I use this on any timeframe across all forms of charts (forex stock, futures, crypto, etc). When taking one of the signals I use the opposite channel as the stop loss (when buying use bottom, and selling use top channel)
SST Table NewData Table for Update GTT Orders in Stocks....
Updated GTT Order details for SST , also added Relative Strength of Stock compared with NIFTY Index for 55 Days (3 Months) period.
RS line plotted on chart… taken reference of close price of day candle… just a bigger picture of actual RS indicator plotted on chart itself... RS line in red color means below zero line (negative) and green color means above zero line (positive).
Added code for checking RS value on chart for any previous day.
Jurik Filtered, Composite Fractal Behavior (CFB) Channels [Loxx]Double Jurik-Filtered Composite Fractal Behavior (CFB) Channels is a channel indicator that acts as both a baseline, similar to Donchian, and as support and resistance levels. This indicator is price time adaptive meaning it flexes to price volatility waves. The indicators adaptive nature is calculated using the Composite Fractal Behavior (CFB) algorithm. The result of this adaptive calculation is then smoothed using Jurik Filtering, and then it's normalized to conform to a range of values. This helps better identify trends.
What is Composite Fractal Behavior (CFB)?
All around you mechanisms adjust themselves to their environment. From simple thermostats that react to air temperature to computer chips in modern cars that respond to changes in engine temperature, r.p.m.'s, torque, and throttle position. It was only a matter of time before fast desktop computers applied the mathematics of self-adjustment to systems that trade the financial markets.
Unlike basic systems with fixed formulas, an adaptive system adjusts its own equations. For example, start with a basic channel breakout system that uses the highest closing price of the last N bars as a threshold for detecting breakouts on the up side. An adaptive and improved version of this system would adjust N according to market conditions, such as momentum, price volatility or acceleration.
Since many systems are based directly or indirectly on cycles, another useful measure of market condition is the periodic length of a price chart's dominant cycle, (DC), that cycle with the greatest influence on price action.
The utility of this new DC measure was noted by author Murray Ruggiero in the January '96 issue of Futures Magazine. In it. Mr. Ruggiero used it to adaptive adjust the value of N in a channel breakout system. He then simulated trading 15 years of D-Mark futures in order to compare its performance to a similar system that had a fixed optimal value of N. The adaptive version produced 20% more profit!
This DC index utilized the popular MESA algorithm (a formulation by John Ehlers adapted from Burg's maximum entropy algorithm, MEM). Unfortunately, the DC approach is problematic when the market has no real dominant cycle momentum, because the mathematics will produce a value whether or not one actually exists! Therefore, we developed a proprietary indicator that does not presuppose the presence of market cycles. It's called CFB (Composite Fractal Behavior) and it works well whether or not the market is cyclic.
CFB examines price action for a particular fractal pattern, categorizes them by size, and then outputs a composite fractal size index. This index is smooth, timely and accurate
Essentially, CFB reveals the length of the market's trending action time frame. Long trending activity produces a large CFB index and short choppy action produces a small index value. Investors have found many applications for CFB which involve scaling other existing technical indicators adaptively, on a bar-to-bar basis.
What is Jurik Volty used in the Juirk Filter?
One of the lesser known qualities of Juirk smoothing is that the Jurik smoothing process is adaptive. "Jurik Volty" (a sort of market volatility ) is what makes Jurik smoothing adaptive. The Jurik Volty calculation can be used as both a standalone indicator and to smooth other indicators that you wish to make adaptive.
What is the Jurik Moving Average?
Have you noticed how moving averages add some lag (delay) to your signals? ... especially when price gaps up or down in a big move, and you are waiting for your moving average to catch up? Wait no more! JMA eliminates this problem forever and gives you the best of both worlds: low lag and smooth lines.
Ideally, you would like a filtered signal to be both smooth and lag-free. Lag causes delays in your trades, and increasing lag in your indicators typically result in lower profits. In other words, late comers get what's left on the table after the feast has already begun.
[APD] Sharegenius Swing Trading StrategyThis script plots GTT Price , Target Prices , Buy Zone , Target Zone and Information Dashboard according to Sharegenius Swing Trading Strategy. SST is for Swing Trading.
👉🏻 Strategy by Mahesh Kaushik -
1️⃣ Track the 20-Day Low of the instrument.
2️⃣ Create a GTT order which is 5% above 20 DL.
3️⃣ If the share makes a new 20 DL before getting purchased, then update your GTT order to be 5% above the new 20 DL.
4️⃣ Next GTT will be started when the average price falls by 10%. (GTT will be created as 5% above the last 20 DL or Buy on 10%, 20%, 30% fall in average price.)
5️⃣ Sell target is 5% of the average price. Sell all units or Set sell target on buy price.
6️⃣ No stop loss is needed as we buy when the stock falls.
👉🏻 Note:-
Trade in fundamentally good stocks & strong stocks those are outperforming index because we do not take stop loss in this strategy.
DISCLAIMER:- This Script is for educational purposes only. Nothing in this content should be interpreted as financial advice or a recommendation to buy or sell any sort of security or investment.
donchian diff [LM]Hello traders,
I would like to present you Donchian diff script. The idea behind this script is that as in Ichimoku I consider base line as equilibrium so I calculate percentages between base line and current price and calculate percentage between base line and conversion line and use them as a filter. For signals I used also that candle has to be highest or lowest in x(configurable) consecutive candles.
It has following setting:
Base line setting
Conversion line setting
buy/sell signal setting - here you can setup buy/sell condition
filter setting - here you can set up percentages of the distances
Hope you will enjoy it,
L
Straight Trend V1Hello everyone,
We are proud to present you our "Straight Trend" Strategy.
Strategy is use a specified timeline's opening price as reference and draw a line between the current price and trend line.
Trend line is smoothed with last X times of highest and lowest values ( Donchian Methodology) in order to create less noise and fake alerts , therefore creates a channel of current prices time based opening price.
The timeline can be adjusted according to your specifications in the settings.
------
Why opening price ?
We are traders ,no matter what we do ,we always make a benchmark at the end of a day , week or at the end of a specified time line.
Example :
X commodity's price increased %15 in last days or Y commodity's price dropped %30 in last 2 weeks etc. etc.
Thats why the opening price have a hidden and much more important role in our trading sessions.
------
After the channel is created we remove the unnecessary lines from our output by filtering the direction with closing price.
IF the closing price is higher than Chanel reference price and direction goes upward the script gives you a BUY signal.
The same methodology is applied for SELL operations.
When to Take Profit?
We put a setting for profit percentage in scripts setting you can adjust the ratio as your choices.
When to Stop Loss or change direction of the trade?
The Straight Trends previously mentioned channel's inverse line was set as STOP LOSS and direction changer in the strategy with "STR-X" Marker.
Note : Strategy is much more effective with heikin-ashi bars due methodology of heikin ashi and with this bars it creates less signals with more accuracy, use at your own discretion.
Please don't hesitate to write us if you need support or assistance, we also appreciate your feedbacks.
Please be advised that this strategy is published with Educational Purposes and it is not a investment advice.
Thank you in advance.
Donchian Channels (Close)This indicator shows Donchian Channels based on close prices only. Additionally, a box with the bands and the center line for the last bar can be shown.
The center line, the bands and the box can be hidden independently.
Four periods are being shown at the moment, but the indicator is easily extensible with copy and paste.
Donchian Channel Strategy IdeaThis strategy idea is a variation of the "Donchian Channel" trading strategy. It is built with a highest-high band, a lowest-low band, and a baseline which is average the highest-high and the lowest-low bands. This strategy is very useful in trending instruments on 1W and 1D timeframes. This is the implementation used in the QuantCT app.
You can set the operation mode to be Long/Short or long-only.
You also can set a fixed stop-loss or ignore it so that the strategy acts solely based on entry and exit signals.
Trade Idea
When the close price breaks up the previous highest-high, it is a long signal, the market is considered rising (bullish), and the plotted indicator becomes green. Long positions are held until the close price crosses under the baseline.
When the close price breaks down the previous lowest-low, it is a short signal, the market is considered falling (bearish), and the plotted indicator becomes red. Short positions are held until the close price crosses above the baseline.
Otherwise, if we have no position in the market, the market is considered ranging, and the plotted indicator becomes orange.
Entry/Exit rules
Enter LONG if the close price breaks up the previous highest-high (i.e. when the plotted indicator becomes green).
Exit LONG if the close price crosses under the baseline (i.e. when the plotted indicator becomes orange).
Enter SHORT if the close price breaks down the previous lowest-low (i.e. when the plotted indicator becomes red).
Exit SHORT if the close price crosses above the baseline (i.e. when the plotted indicator becomes orange).
CAUTION
It's just a bare trading idea - a profitable one. However, you can enhance this idea and turn it into a full trading strategy with enhanced risk/money management and optimizing it, and you ABSOLUTELY should do this!
DON'T insist on using Long/Short mode on all instruments! This strategy performs much better in Long-Only mode on many (NOT All) trending instruments (Like BTC, ETH, etc.).
Trade Helper [Trading Nerd]Position Size Calculator / Lot Size Calculator
Disclaimer: I do my best to avoid wrong calculations and bugs. I provide this indicator without warranties of any kind. You bear all risks associated with the use of this indicator.
Inputs:
Market: Adds a name tag to the Table to keep track of the trades.
Entry Price: The entry Price of the Position.
Entry Time: The entry Time/Candle of the Position. If Stop Loss Type is 'ATR' or 'HH/LL' the Value for this is calculated by this Candle.
Stop Loss Type: Changes the Stop Loss Type.
Direction: Define if the trade direction is 'Long' or 'Short'. Has no effect on Stop Loss Type 'Custom'. For this you can just set the Stop Loss below/above the Entry Price .
ATR Multiplier: Multiplies the ATR Value by this number. Has only an effect on Stop Loss Type 'ATR'.
HH/LL Lookback Length: Lookback length for determine Highest High/Lowest Low value. Has only an effect on Stop Loss Type 'HH/LL'.
Custom SL Price: The Stop Loss Price if the Stop Loss Type is set to 'Custom'.
Risk Reward Ratio: The Risk is multiplied by this number to determine the Take Profit Price.
Balance: Balance Amount and Currency
Contract Size: The Position Size is divided by this number. E.G. in Forex one Lot is 100.000 Contracts. Change this Value depending on your Broker and Market.
Risk in %: Percent that is risked of the Balance for one Trade.
Stochastic ChannelsDonchain trend following system with overbought/ oversold areas inspired by stochastic. Multiplier to get non repainting HTF capability. features a smoothed price as well as moving average of the smoothed price, also inspired by the stochastic indicators %K and %D. This and slow stochastics compliment each other nicely.
%D line colored by direction.
Filled color areas represent overbought/oversold.
Shows breakouts as well as giving targets and entries in rangebound markets.
Channel IndicatorSimple Donchian Channels and two EMA so you can trade the bottom and the top of the channel.
Classic Long Term Trend Following SystemThis is a classic long term trend following system.
The breakout period is 50 days instead of 20 and the moving average crossover are 40 and 120.
The moving averages are also exponential instead of simple.
The stoploss is 4 ATRs away from the price.
Recommendations:
Donchian Channels settings > 50 days
Moving Averages > 40 and 120, 80 and 140
Important to note:
My first strategy, DC Breakout System | This is simplicity at its finest, is best used on the crypto market and this one for stocks, commodities, currencies, etc. Those markets tend to trend a lot longer than crypto do.
Donchian SARCombination of Donchian channels and sar. The donchian channels provides simple and easy data of support and resistances and SAR tells the price trend
DC Breakout Strategy | This is simplicity at its finest.As the title already describes: this is a Donchian breakout strategy. This strategy, as of now, only goes long. It goes long when the price close makes a new high and the 8 day moving average is above the 32 day moving average. The strategy exits the trade if the price breaks the atr trailing stop of * 3 or the 8 day moving average crosses below the 32 day moving average.
This is simplicity at its finest.
Bagheri IG Ether v2In this version, the winning ratio has been decreased, but the Risk to Reward Ratio (RRR) has been set to be better than the previous version.
This is a technical trading strategy for Ethereum ( BINANCE:ETHUSDT ). We built and developed it on MetaEditor and optimized it with MetaTrader optimizer.
The main indicators are Donchian Channel, Oscillator of ROC , Bears Power, Balance of Power , and Simple Moving Average ( SMA ). Default values in the input panel are the best combination of these indicators, but you can change any of them and try it for better results.
Please notice that this strategy has been optimized on the 1-minute chart of Ethereum .
For each position, you can see the Take Profit (TP) and Stop Loss (SL) levels. Also, you can find the values of mentioned TP and SL in points from the input panel of the script.
Attention: The price of Ethereum has 2 decimal places.
Therefore, 3000 points for TP means 30 USDT for trading 1 BINANCE:ETHUSDT .
Keltner Center Of Gravity Channel ( KeltCOG )I have the ambition to create a ‘landscape’ which enables the user to see the ‘mood’ of the market about the price of an instrument, simply by looking where the candles go. Prices are a simple phenomenon , they go up or down or stay the same. This is represented quite well for the short term by a candle. I recommend to study candle patterns. Prices not only fluctuate but also trend up, down or go sideways. The user should analyze this by determining the COG (Center Of Gravity) and the ‘normal’ current range by using the historical data in a lookback period.
As a COG the center line of a Donchian Channel is often used. I.m.o. a COG should be a zone, in this channel I use the gray zone of my Donchian Fibonacci Channel, The ‘normal’ range is a multiple of Average True Range, as used in a Keltner Channel. Combining the two can give a cumbersome result, as one can see in my Keltner Fibonacci Channel. In this KeltCOG channel I solved this by not using all Fibonacci levels and by making the Keltner lines strictly parallel to the nearest COG line. To do this, I use the fact that the COG lines have horizontal stretches, there I make the Keltner lines horizontal too. Only where the COG lines change value, the Keltner lines are recalculated. This way the channel gets a very regular shape with three clear zones.
Interpretation of a chart by using the KeltCOG channel.
Overbought: If the candles go higher then the blue zone, the market is hyper enthusiast, creating an overbought situation. This is often followed by a reversion to the COG.
Uptrend: If the candles form in the blue zone, the market is enthusiast and willing to pay more.
Hopeful: If the candles form in or near the upper uncolored zone, the market is hopeful and is thinking about paying more. Sometimes prices go a little up.
Content: If the candles form in the gray zone, which represents COG, the market is happy with the current prices, so these move sideways
Disappointed: If the candles form in or near the lower uncolored zone, the market is disappointed and contemplates paying less, sometimes prices go a little down.
Downtrend: If the candles form in red zone, the market doesn’t like the instrument at all, rejects the current price and is only prepared to pay less.
Oversold: If the candles form below the red zone, the market overdoes its disgust, creating an oversold situation, often followed by a reversion to the COG.
Strategy Template - V2This is an educational script created to demonstrate few basic building blocks of a trend based strategy and how to achieve different entry and exit types. My initial intention was to create a comprehensive strategy template which covers all the aspects of strategy. But, ended up creating fully fledged strategy based on trend following.
This is an enhancement on Strategy-Template But this script is comparitively more complex. Hence I decided to create new version instead of updating the existing one.
Lets dive deep.
SIMPLE COMPONENTS OF TREND FOLLOWING STRATEGY
TREND BIAS - This defines the direction of trend. Idea is not to trade against the trend direction. If the bias is bullish, look for long opportunities and if bias is bearish, look for short opportunities. Stay out of the market when the bias is neutral.
Often, trend bias is determined based on longer timeframe conditions. Example - 200 Moving Average, Higher timeframe moving averages, Higher timeframe high-lows etc. can be used for determining the trend bias.
In this script, I am using Weekly donchian channels combined with daily donchian channels to define trend bias.
Long Bias - 40 Day donchian channel sits completely in upper portion of 40 Week dochnial channel.
Short Bias - 40 Day donchian channel sits completely in lower portion of 40 Week donchian channel.
ENTRY CONDITION - Entry signals are generated only in the direction of bias. Hence, when in LongBias, we only get Long signals and when in short bias, we only get short signals.
In our case, when in Long Bias - if price hits 40 day high for the first time, this creates our long entry signal. Similarly when in Short Bias , price hitting 40 day low will create signal for going short. Since we do not take trades opposite to trend, no entry conditions are formed when price hits 40 day high in Short Bias or 40 day low in Long Bias.
EXIT CONDITION - Exit conditions are formed when we get signals of trend failure.
In our case, when in long trade, price hitting 40 day low creates exit signal. Similarly when in short trade price hitting 40 day high creates exit signal for short trade.
DIFFERENT TYPES OF ENTRY AND EXIT
In this script, I have tried to demonstrate different entry and exit types.
Entry types
Market - Enter immediately when entry signal is received. That is, in this case when price crossover over high in long bias and crosses under low in short bias
Stop - This method includes estimating at what level new highs are made and creating a stop buy order at that level. This way, we do not miss if the break out is stronger. But, susciptible to fail during fakeouts.
Limit - This method includes executing a limit order to buy at lower price or sell at higher price. In trend following methods, downside of limit order is when there is genuine breakout, these limit orders may not hit and during trend failures the limit orders are likely to hit and go straight to stop.
Stop-Limit - this is same as stop order but will also place a limit condition to avoid buying on overextended breakout or with lots of slippage.
Exit types
Market - whether to keep the existing trade running or whether to close it is determined after close of each bar and exit orders are executed manually upon receiving exit signal.
Stop - We place stop loss orders beforehand when there is a trade in place. This can help in avoiding big movements against trade within bar. But, this may also stop on false signals or fakeouts.
Take profit
Stop - No take profits are configured.
Target - 30% of the positions are closed when take profit levels are hit. Take profit levels are defined by risk reward.
USING THE CODE AS TEMPLATE
As mentioned earlier, I intended to create a fully fledged strategy template. But, ended up creating a fully fledged stratgy. However, you can take some part of this code and use it to start your own strategy. Will explain what all things can be adopted without worrying about the strategy implementation within
Strategy definition : This can be copied as is and just change the title of strategy. This defines some of the commonly used parameters of strategy which can help with close to realistic backtesting results for your coded strategy and comparison with buy and hold.
Generic Strategy Parameters : The parameter which defines controlling alllowed trade direction and trading window are present here. This again can be copied as is and variable inDateRange can be directly used in entry conditions.
Generic Methods : f_getMovingAverage and f_secureSecurity are handy and can be used as is. atr method provideded by pine gives you ATR based on RMA. If you want SMA or any other moving average based ATR, you can use the method f_getCustomAtr
Trade Statements : This section has all types of trading instructions which includes market/stop/limit/stop-limit type of entries and exits and take profit statements. You can adopt the type of entry you are interested in and change when condition to suit your strategy.
Trade conditions and levels : This section is required. But, cannot be copied. All the trade logic goes here which also sets parameters which are used in when of Trade Statements.
Hope this helps.