Bollinger and Stochastic with Trailing Stop - D.M.P.This trading strategy combines Bollinger Bands and the Stochastic indicator to identify entry opportunities in oversold and overbought conditions in the market. The aim is to capitalize on price rebounds from the extremes defined by the Bollinger Bands, with the confirmation of the Stochastic to maximize the probability of success of the operations.
Indicators Used
- Bollinger Bands Used to measure volatility and define oversold and overbought levels. When the price touches or breaks through the lower band, it indicates a possible oversold condition. Similarly, when it touches or breaks through the upper band, it indicates a possible overbought condition.
- Stochastic: A momentum oscillator that compares the closing price of an asset with its price range over a certain period. Values below 20 indicate oversold, while values above 80 indicate overbought.
Strategy Logic
- Long Entry (Buy): A purchase operation is executed when the price closes below the lower Bollinger band (indicating oversold) and the Stochastic is also in the oversold zone.
- Short Entry (Sell): A sell operation is executed when the price closes above the upper Bollinger band (indicating overbought) and the Stochastic is in the overbought zone.
Oscillators
PresentTrend RMI Synergy - Strategy [presentTrading] █ Introduction and How it is Different
The "PresentTrend RMI Synergy Strategy" is the combined power of the Relative Momentum Index (RMI) and a custom presentTrend indicator. This strategy introduces a multifaceted approach, integrating momentum analysis with trend direction to offer traders a more nuanced and responsive trading mechanism.
BTCUSD 6h L/S Performance
Local
█ Strategy, How It Works: Detailed Explanation
The "PresentTrend RMI Synergy Strategy" intricately combines the Relative Momentum Index (RMI) and a custom SuperTrend indicator to create a powerful tool for traders.
🔶 Relative Momentum Index (RMI)
The RMI is a variation of the Relative Strength Index (RSI), but instead of using price closes against itself, it measures the momentum of up and down movements in price relative to previous prices over a given period. The RMI for a period length `N` is calculated as follows:
RMI = 100 - 100/ (1 + U/D)
where:
- `U` is the average upward price change over `N` periods,
- `D` is the average downward price change over `N` periods.
The RMI oscillates between 0 and 100, with higher values indicating stronger upward momentum and lower values suggesting stronger downward momentum.
RMI = 21
RMI = 42
For more information - RMI Trend Sync - Strategy :
🔶 presentTrend Indicator
The presentTrend indicator combines the Average True Range (ATR) with a moving average to determine trend direction and dynamic support or resistance levels. The presentTrend for a period length `M` and a multiplier `F` is defined as:
- Upper Band: MA + (ATR x F)
- Lower Band: MA - (ATR x F)
where:
- `MA` is the moving average of the close price over `M` periods,
- `ATR` is the Average True Range over the same period,
- `F` is the multiplier to adjust the sensitivity.
The trend direction switches when the price crosses the presentTrend bands, signaling potential entry or exit points.
presentTrend length = 3
presentTrend length = 10
For more information - PresentTrend - Strategy :
🔶 Strategy Logic
Entry Conditions:
- Long Entry: Triggered when the RMI exceeds a threshold, say 60, indicating a strong bullish momentum, and when the price is above the presentTrend, confirming an uptrend.
- Short Entry: Occurs when the RMI drops below a threshold, say 40, showing strong bearish momentum, and the price is below the present trend, indicating a downtrend.
Exit Conditions with Dynamic Trailing Stop:
- Long Exit: Initiated when the price crosses below the lower presentTrend band or when the RMI falls back towards a neutral level, suggesting a weakening of the bullish momentum.
- Short Exit: Executed when the price crosses above the upper presentTrend band or when the RMI rises towards a neutral level, indicating a reduction in bearish momentum.
Equations for Dynamic Trailing Stop:
- For Long Positions: The exit price is set at the lower SuperTrend band once the entry condition is met.
- For Short Positions: The exit price is determined by the upper SuperTrend band post-entry.
These dynamic trailing stops adjust as the market moves, providing a method to lock in profits while allowing room for the position to grow.
This strategy's strength lies in its dual analysis approach, leveraging RMI for momentum insights and presentTrend for trend direction and dynamic stops. This combination offers traders a robust framework to navigate various market conditions, aiming to capture trends early and exit positions strategically to maximize gains and minimize losses.
█ Trade Direction
The strategy provides flexibility in trade direction selection, offering "Long," "Short," or "Both" options to cater to different market conditions and trader preferences. This adaptability ensures that traders can align the strategy with their market outlook, risk tolerance, and trading goals.
█ Usage
To utilize the "PresentTrend RMI Synergy Strategy," traders should input their preferred settings in the Pine Script™ and apply the strategy to their charts. Monitoring RMI for momentum shifts and adjusting positions based on SuperTrend signals can optimize entry and exit points, enhancing potential returns while managing risk.
█ Default Settings
1. RMI Length: 21
The 21-period RMI length strikes a balance between capturing momentum and filtering out market noise, offering a medium-term outlook on market trends.
2. Super Trend Length: 7
A SuperTrend length of 7 periods is chosen for its responsiveness to price movements, providing a dynamic framework for trend identification without excessive sensitivity.
3. Super Trend Multiplier: 4.0
The multiplier of 4.0 for the SuperTrend indicator widens the trend bands, focusing on significant market moves and reducing the impact of minor fluctuations.
---
The "PresentTrend RMI Synergy Strategy" represents a significant step forward in trading strategy development, blending momentum and trend analysis in a unique way. By providing a detailed framework for understanding market dynamics, this strategy empowers traders to make more informed decisions.
CCI based support and resistance strategy
WARNING:
Commissions and slippage has not been considered! Don’t take it easy adding commissions and slippage could turns a fake-profitable strategy to a real disaster.
We consider account size as 10k and we enter 1000 for each trade.
Less than 100 trades is too small sample community and it’s not reliable, Also the performance of the past do not guarantee future performance. This result was handpicked by author and will differ by other timeframes, instruments and settings.
*PLEASE SHARE YOUR SETTINGS THAT WORK WITH THE COMMUNITY.
Introduction:
The CCI-based dynamic support and resistance is a "Bands and Channels" kind of indicator consisting an upper and lower band. This is a strategy which uses CCI-based (Made by me) indicator to execute trades.
SL and TP are calculated based on max ATR during last selected time period. You can edit strategy settings using "Ksl", "Ktp" and the other button for time period. “KSL” and “KTP” are 2.5 and 5 by default.
Bands are calculated regarding CCI previous high and low pivot. CCI length, right pivot length and left pivot length are 50.
A dynamic support and resistance has been calculated using last upper-cci minus a buffer and last lower-cci plus the buffer. The buffer is 10.
If "Trend matter?" button is on you can detect trend by color of the upper and lower line. Green is bullish and red is bearish! "Trend matter?" is on.
The "show mid?" button makes mid line visible, which is average of upper and lower lines, visible. The button is not active by default.
Reaction to the support could be a buy signal while a reaction to the resistance could interpreted as a sell signal.
How this strategy work?
Donald Lambert, a technical analyst, created the CCI, or Commodity Channel Index, which he first published in 1980. CCI is calculated regarding CCI can be used both as trend-detector or an oscillator. As an oscillator most traders believe in static predefined levels. Overbought and oversold candles which are clear in the chart could be used as sell and buy signals.
During my trading career I’ve noticed that there might be some reversal points for the CCI. I believe CCI could have to potential to reverse more from lately reversal point. Of course, just like other trading strategies we are talking about probabilities. We do not expect a win trade each time.
On price chart
Now this the question! What price should the instrument reach that CCI turns to be equal to our reversing aim for CCI? Imagine we have found last important bearish reversal of CCI in 200. Now, if we need the CCI to be 200 what price should we wait for?
How to calculate?
This is the CCI formula:
CCI = (Typical Price - SMA of TP) / (0.015 x Mean Deviation)
Where, Typical Price (TP) = (High + Low + Close)/3
For probable reversing points, high and low pivots of 50 bars have been used.
So we do have an Upper CCI and a Lower CCI. They are valid until the next pivot is available.
By relocating factors in CCI formula you can reach the “Typical Price”.
“
Typical Price = CCI (0.015 * Mean Deviation) + SMA of TP
So we could have a Support or Resistance by replacing CCI with Upper and Lower CCI.
A buy signal is valid if the trend is bullish (or “trend matter” is off) and lowest low of last 2 candles is lower than support and close is greater than both support and open.
A Sell signal is produced in opposite situation.
There are 2+1 options for trend!
Trend matter box is on by default, which means we’ll just open trades in direction of the trend. It’s available to turn it off.
Other 2 options are cross and slope. Cross calculated by comparing fast SMA and slow SMA. The slope one differentiate slow SMA to last “n” one.
Considering last day and today highest ATR as the ATR to calculating SL and TP is our unique technique.
Monthly Performance Table by Dr. MauryaWhat is this ?
This Strategy script is not aim to produce strategy results but It aim to produce monthly PnL performance Calendar table which is useful for TradingView community to generate a monthly performance table for Own strategy.
So make sure to read the disclaimer below.
Why it is required to publish?:
I am not satisfied with the monthly performance available on TV community script. Sometimes it is very lengthy in code and sometimes it showing the wrong PNL for current month.
So I have decided to develop new Monthly performance or return in value as well as in percentage with highly flexible to adjust row automatically.
Features :
Accuracy increased for current month PnL.
There are 14 columns and automatically adjusted rows according to available trade years/month.
First Column reflect the YEAR, from second column to 13 column reflect the month and 14 column reflect the yearly PnL.
In tabulated data reflects the monthly PnL (value and (%)) in month column and Yearly PnL (value and (%)) in Yearly column.
Various color input also added to change the table look like background color, text color, heading text color, border color.
In tabulated data, background color turn green for profit and red for loss.
Copy from line 54 to last line as it is in your strategy script.
Credit: This code is modified and top up of the open-source code originally written by QuantNomad. Thanks for their contribution towards to give base and lead to other developers. I have changed the way of determining past PnL to array form and keep separated current month and year PnL from array. Which avoid the false pnl in current month.
Strategy description:
As in first line I said This strategy is aim to provide monthly performance table not focused on the strategy. But it is necessary to explain strategy which I have used here. Strategy is simply based on ADX available on TV community script. Long entry is based on when the difference between DIPlus and ADX is reached on certain value (Set value in Long difference in Input Tab) while Short entry is based on when the difference between DIMinus and ADX is reached on certain value (Set value in Short difference in Input Tab).
Default Strategy Properties used on chart(Important)
This script backtest is done on 1 hour timeframe of NSE:Reliance Inds Future cahrt, using the following backtesting properties:
Balance (default): 500 000 (default base currency)
Order Size: 1 contract
Comission: 20 INR per Order
Slippage: 5 tick
Default setting in Input tab
Len (ADX length) : 14
Th (ADX Threshhold): 20
Long Difference (DIPlus - ADX) = 5
Short Difference (DIMinus - ADX) = 5
We use these properties to ensure a realistic preview of the backtesting system, do note that default properties can be different for various reasons described below:
Order Size: 1 contract by default, this is to allow the strategy to run properly on most instruments such as futures.
Comission: Comission can vary depending on the market and instrument, there is no default value that might return realistic results.
We strongly recommend all users to ensure they adjust the Properties within the script settings to be in line with their accounts & trading platforms of choice to ensure results from the strategies built are realistic.
Disclaimer:
This script not provide indicative of any future results.
This script don’t provide any financial advice.
This strategy is only for the readymade snippet code for monthly PnL performance calender table for any own strategy.
RSI & Backed-Weighted MA StrategyRSI & MA Strategy :
INTRODUCTION :
This strategy is based on two well-known indicators that work best together: the Relative Strength Index (RSI) and the Moving Average (MA). We're going to use the RSI as a trend-follower indicator, rather than a reversal indicator as most are used to. To the signals sent by the RSI, we'll add a condition on the chart's MA, filtering out irrelevant signals and considerably increasing our winning rate. This is a medium/long-term strategy. There's also a money management method enabling us to reinvest part of the profits or reduce the size of orders in the event of substantial losses.
RSI :
The RSI is one of the best-known and most widely used indicators in trading. Its purpose is to warn traders when an asset is overbought or oversold. It was designed to send reversal signals, but we're going to use it as a trend indicator by increasing its length to 20. The RSI formula is as follows :
RSI (n) = 100 - (100 / (1 + (H (n)/L (n))))
With n the length of the RSI, H(n) the average of days closing above the open and L(n) the average of days closing below the open.
MA :
The Moving Average is also widely used in technical analysis, to smooth out variations in an asset. The SMA formula is as follows :
SMA (n) = (P1 + P2 + ... + Pn) / n
where n is the length of the MA.
However, an SMA does not weight any of its terms, which means that the price 10 days ago has the same importance as the price 2 days ago or today's price... That's why in this strategy we use a RWMA, i.e. a back-weighted moving average. It weights old prices more heavily than new ones. This will enable us to limit the impact of short-term variations and focus on the trend that was dominating. The RWMA used weights :
The 4 most recent terms by : 100 / (4+(n-4)*1.30)
The other oldest terms by : weight_4_first_term*1.30
So the older terms are weighted 1.30 more than the more recent ones. The moving average thus traces a trend that accentuates past values and limits the noise of short-term variations.
PARAMETERS :
RSI Length : Lenght of RSI. Default is 20.
MA Type : Choice between a SMA or a RWMA which permits to minimize the impact of short term reversal. Default is RWMA.
MA Length : Length of the selected MA. Default is 19.
RSI Long Signal : Minimum value of RSI to send a LONG signal. Default is 60.
RSI Short signal : Maximum value of RSI to send a SHORT signal. Default is 40.
ROC MA Long Signal : Maximum value of Rate of Change MA to send a LONG signal. Default is 0.
ROC MA Short signal : Minimum value of Rate of Change MA to send a SHORT signal. Default is 0.
TP activation in multiple of ATR : Threshold value to trigger trailing stop Take Profit. This threshold is calculated as multiple of the ATR (Average True Range). Default value is 5 meaning that to trigger the trailing TP the price need to move 5*ATR in the right direction.
Trailing TP in percentage : Percentage value of trailing Take Profit. This Trailing TP follows the profit if it increases, remaining selected percentage below it, but stops if the profit decreases. Default is 3%.
Fixed Ratio : This is the amount of gain or loss at which the order quantity is changed. Default is 400, which means that for each $400 gain or loss, the order size is increased or decreased by a user-selected amount.
Increasing Order Amount : This is the amount to be added to or subtracted from orders when the fixed ratio is reached. The default is $200, which means that for every $400 gain, $200 is reinvested in the strategy. On the other hand, for every $400 loss, the order size is reduced by $200.
Initial capital : $1000
Fees : Interactive Broker fees apply to this strategy. They are set at 0.18% of the trade value.
Slippage : 3 ticks or $0.03 per trade. Corresponds to the latency time between the moment the signal is received and the moment the order is executed by the broker.
Important : A bot has been used to test the different parameters and determine which ones maximize return while limiting drawdown. This strategy is the most optimal on BITSTAMP:ETHUSD with a timeframe set to 6h. Parameters are set as follows :
MA type: RWMA
MA Length: 19
RSI Long Signal: >60
RSI Short Signal : <40
ROC MA Long Signal : <0
ROC MA Short Signal : >0
TP Activation in multiple ATR : 5
Trailing TP in percentage : 3
ENTER RULES :
The principle is very simple:
If the asset is overbought after a bear market, we are LONG.
If the asset is oversold after a bull market, we are SHORT.
We have defined a bear market as follows : Rate of Change (20) RWMA < 0
We have defined a bull market as follows : Rate of Change (20) RWMA > 0
The Rate of Change is calculated using this formula : (RWMA/RWMA(20) - 1)*100
Overbought is defined as follows : RSI > 60
Oversold is defined as follows : RSI < 40
LONG CONDITION :
RSI > 60 and (RWMA/RWMA(20) - 1)*100 < -1
SHORT CONDITION :
RSI < 40 and (RWMA/RWMA(20) - 1)*100 > 1
EXIT RULES FOR WINNING TRADE :
We have a trailing TP allowing us to exit once the price has reached the "TP Activation in multiple ATR" parameter, i.e. 5*ATR by default in the profit direction. TP trailing is triggered at this point, not limiting our gains, and securing our profits at 3% below this trigger threshold.
Remember that the True Range is : maximum(H-L, H-C(1), C-L(1))
with C : Close, H : High, L : Low
The Average True Range is therefore the average of these TRs over a length defined by default in the strategy, i.e. 20.
RISK MANAGEMENT :
This strategy may incur losses. The method for limiting losses is to set a Stop Loss equal to 3*ATR. This means that if the price moves against our position and reaches three times the ATR, we exit with a loss.
Sometimes the ATR can result in a SL set below 10% of the trade value, which is not acceptable. In this case, we set the SL at 10%, limiting losses to a maximum of 10%.
MONEY MANAGEMENT :
The fixed ratio method was used to manage our gains and losses. For each gain of an amount equal to the value of the fixed ratio, we increase the order size by a value defined by the user in the "Increasing order amount" parameter. Similarly, each time we lose an amount equal to the value of the fixed ratio, we decrease the order size by the same user-defined value. This strategy increases both performance and drawdown.
Enjoy the strategy and don't forget to take the trade :)
EUR/USD 45 MIN Strategy - FinexBOTThis strategy uses three indicators:
RSI (Relative Strength Index) - It indicates if a stock is potentially overbought or oversold.
CCI (Commodity Channel Index) - It measures the current price level relative to an average price level over a certain period of time.
Williams %R - It is a momentum indicator that shows whether a stock is at the high or low end of its trading range.
Long (Buy) Trades Open:
When all three indicators suggest that the stock is oversold (RSI is below 25, CCI is below -130, and Williams %R is below -85), the strategy will open a buy position, assuming there is no current open trade.
Short (Sell) Trades Open:
When all three indicators suggest the stock is overbought (RSI is above 75, CCI is above 130, and Williams %R is above -15), the strategy will open a sell position, assuming there is no current open trade.
SL (Stop Loss) and TP (Take Profit):
SL (Stop Loss) is 0.45%.
TP (Take Profit) is 1.2%.
The strategy automatically sets these exit points as a percentage of the entry price for both long and short positions to manage risks and secure profits. You can easily adopt these inputs according to your strategy. However, default settings are recommended.
Adaptive SMI Ergodic StrategyThe Adaptive SMI Ergodic Strategy aims to capture the momentum and direction of a financial asset by leveraging the Stochastic Momentum Index Indicator (SMI) in an ergodic form. The strategy uses two lengths for the SMI, a shorter and a longer one, and an Exponential Moving Average (EMA) to serve as the signal line. Additionally, the strategy incorporates customizable overbought and oversold thresholds to improve the probability of successful trade execution.
How It Works:
Long Entry: A long position is taken when the ergodic SMI crosses over the EMA signal line, and both the SMI and EMA are below the oversold threshold.
Short Entry: A short position is initiated when the ergodic SMI crosses under the EMA signal line, and both the SMI and EMA are above the overbought threshold.
The strategy plots the SMI in yellow and the EMA signal line in purple. Horizontal lines indicate the overbought and oversold thresholds, and a colored background helps in visually identifying these zones.
Parameters:
Long Length: The length of the long EMA in SMI calculation.
Short Length: The length of the short EMA in SMI calculation.
Signal Line Length: The length for the EMA serving as the signal line.
Oversold: Customizable threshold for the oversold condition.
Overbought: Customizable threshold for the overbought condition.
Historical Context: The SMI Indicator
The Stochastic Momentum Index (SMI) was developed by William Blau in the early 1990s as an enhancement to traditional stochastic oscillators. The SMI provides a range of values like a traditional stochastic, but it differs in that it calculates the distance of the current close relative to the median of the high/low range, as opposed to the close relative to the low. As a result, the SMI is less erratic and more responsive, offering a clearer picture of market trends.
In recent years, the SMI has been adapted into ergodic forms to facilitate smoother data analysis, reduce lag, and improve trading accuracy. The Adaptive SMI Ergodic Strategy leverages these modern enhancements to offer a more robust, customizable trading strategy that aligns with various market conditions.
YinYang RSI Volume Trend StrategyThere are many strategies that use RSI or Volume but very few that take advantage of how useful and important the two of them combined are. This strategy uses the Highs and Lows with Volume and RSI weighted calculations on top of them. You may be wondering how much of an impact Volume and RSI can have on the prices; the answer is a lot and we will discuss those with plenty of examples below, but first…
How does this strategy work?
It’s simple really, when the purchase source crosses above the inner low band (red) it creates a Buy or Long. This long has a Trailing Stop Loss band (the outer low band that's also red) that can be adjusted in the Settings. The Stop Loss is based on a % of the inner low band’s price and by default it is 0.1% lower than the inner band’s price. This Stop Loss is not only a stop loss but it can also act as a Purchase Available location.
You can get back into a trade after a stop loss / take profit has been hit when your Reset Purchase Availability After condition has been met. This can either be at Stop Loss, Entry or None.
It is advised to allow it to reset in case the stop loss was a fake out but the call was right. Sometimes it may trigger stop loss multiple times in a row, but you don’t lose much on stop loss and you gain lots when the call is right.
The Take Profit location is the basis line (white). Take Profit occurs when the Exit Source (close, open, high, low or other) crosses the basis line and then on a different bar the Exit Source crosses back over the basis line. For example, if it was a Long and the bar’s Exit Source closed above the basis line, and then 2 bars later its Exit Source closed below the basis line, Take Profit would occur. You can disable Take Profit in Settings, but it is very useful as many times the price will cross the Basis and then correct back rather than making it all the way to the opposing zone.
Longs:
If for instance your Long doesn’t need to Take Profit and instead reaches the top zone, it will close the position when it crosses above the inner top line (green).
Please note you can change the Exit Source too which is what source (close, open, high, low) it uses to end the trades.
The Shorts work the same way as the Long but just opposite, they start when the purchase source crosses under the inner upper band (green).
Shorts:
Shorts take profit when it crosses under the basis line and then crosses back.
Shorts will Stop loss when their outer upper band (green) is crossed with the Exit Source.
Short trades are completed and closed when its Exit Source crosses under the inner low red band.
So, now that you understand how the strategy works, let’s discuss why this strategy works and how it is profitable.
First we will discuss Volume as we deem it plays a much bigger role overall and in our strategy:
As I’m sure many of you know, Volume plays a huge factor in how much something moves, but it also plays a role in the strength of the movement. For instance, let’s look at two scenarios:
Bitcoin’s price goes up $1000 in 1 Day but the Volume was only 10 million
Bitcoin’s price goes up $200 in 1 Day but the Volume was 40 million
If you were to only look at the price, you’d say #1 was more important because the price moved x5 the amount as #2, but once you factor in the volume, you know this is not true. The reason why Volume plays such a huge role in Price movement is because it shows there is a large Limit Order battle going on. It means that both Bears and Bulls believe that price is a good time to Buy and Sell. This creates a strong Support and Resistance price point in this location. If we look at scenario #2, when there is high volume, especially if it is drastically larger than the average volume Bitcoin was displaying recently, what can we decipher from this? Well, the biggest take away is that the Bull’s won the battle, and that likely when that happens we will see bullish movement continuing to happen as most of the Bears Limit Orders have been fulfilled. Whereas with #2, when large price movement happens and Bitcoin goes up $1000 with low volume what can we deduce? The main takeaway is that Bull’s pressured the price up with Market Orders where they purchased the best available price, also what this means is there were very few people who were wanting to sell. This generally dictates that Whale Limit orders for Sells/Shorts are much higher up and theres room for movement, but it also means there is likely a whale that is ready to dump and crash it back down.
You may be wondering, what did this example have to do with YinYang RSI Volume Trend Strategy? Well the reason we’ve discussed this is because we use Volume multiple times to apply multiplications in our calculations to add large weight to the price when there is lots of volume (this is applied both positively and negatively). For instance, if the price drops a little and there is high volume, our strategy will move its bounds MUCH lower than the price actually dropped, and if there was low volume but the price dropped A LOT, our strategy will only move its bounds a little. We believe this reflects higher levels of price accuracy than just price alone based on the examples described above.
Don’t believe us?
Here is with Volume NOT factored in (VWMA = SMA and we remove our Volume Filter calculation):
Which produced -$2880 Profit
Here is with our Volume factored in:
Which produced $553,000 (55.3%)
As you can see, we wen’t from $-2800 profit with volume not factored to $553,000 with volume factored. That's quite a big difference! (Please note previous success does not predict future success we are simply displaying the $ amounts as example).
Now how about RSI and why does it matter in this strategy?
As I’m sure most of you are aware, RSI is one of the leading indicators used in trading. For this reason we figured it would only make sense to incorporate it into our calculations. We fiddled with RSI for quite awhile and sometimes what logically seems to be the right way to use it isn’t. Now, because of this, our RSI calculation is a little odd, but basically what we’re doing is we calculate the RSI, then turn it into a percentage (between 0-1) that can easily be multiplied to the price point we need. The price point we use is the difference between our high purchase zone and our low purchase zone. This allows us to see how much price movement there is between zones. We multiply our zone size with our RSI multiplication and we get the amount we will add +/- to our basis line (white line). This officially creates the NEW high and low purchase zones that we are actually using and displaying in our trades.
If you found that confusing, here are some examples to why it is an important calculation for this strategy:
Before RSI factored in:
Which produced 27.8% Profit
After RSI factored in:
Which produced 553% Profit
As you can see, the RSI makes not only the purchase zones more accurate, but it also greatly increases the profit the strategy is able to make. It also helps ensure an relatively linear profit slope so you know it is reliable with its trades.
This strategy can work on pretty much anything, but you should tweak the values a bit for each pair you are trading it with for best results.
We hope you can find some use out of this simple but effective strategy, if you have any questions, comments or concerns please let us know.
HAPPY TRADING!
Stochastic StrategyThis strategy is designed to make trading decisions based on the Stochastic Oscillator (Stoch) indicator with settings of (7,2,2). The strategy opens a long (buy) position when the Stoch indicator crosses above the 50 level from below. Conversely, it opens a short (sell) position when the Stoch indicator crosses below the 50 level from above. Additionally, when a long position is opened, any existing short position is closed, and vice versa.
Key Parameters:
Stochastic Oscillator Settings: Length = 7, SmoothK = 2, SmoothD = 2.
Overbought Level: 80.
Oversold Level: 20.
Strategy Description:
The Stochastic Oscillator (Stoch) is calculated based on the closing price, high price, and low price with a period of 7, and both the %K and %D lines are smoothed with periods of 2.
When the %K line crosses above the oversold level (20), it generates a long (buy) signal.
When the %K line crosses below the overbought level (80), it generates a short (sell) signal.
The strategy visually marks long and short signals on the chart using upward and downward triangles, respectively.
The strategy automatically enters long or short positions when the respective conditions are met.
If a long position is opened, any existing short position is closed, and vice versa.
Please note that this is a basic example of a trading strategy and does not take into account all possible risk factors or optimizations. Before using this strategy in live trading, it's essential to thoroughly test and customize it to suit your specific needs, and carefully analyze the results. Trading carries risks, and it's important to use proper risk management techniques when implementing any trading strategy.
Strategy Gaussian Anomaly DerivativeConcept behind this Strategy :
Considering a normal "buy/sell" situation, an asset would be bought in average at the median price following a Gaussian like concept. A higher or lower average trend would significate that the current perceived value is respectively higher or lower than the current median price, which mean that the buyers are evaluating the price underpriced or overpriced.
This behaviour would be even more relevent depending on its derivative evolution.
Therefore, this Strategy setup is based on this Gaussian like concept anomaly of average close positionning compare to high-low average derivative, such as the derivative of the following ploted basic signal : 1-(high+low)/(2*close).
This Strategy can actually be used like a trend change and continuation strength indicator aswell.
In the Setup Signal part :
You can define the filtering of the basis signal "1-(high+low)/(2*close)" on EMA or SMA as you wish.
You can define the corresponding period and the threathold as a mutiply of the average 1/3 of all time value of the basis signal.
You can define the SMA filtering period of the Derivative signal and the corresponding threathold on the same mutiply of the average 1/3 of all time value of the derivative.
In the Setup Strategy part :
You can set up your strategy assesment based on Long and/or Short. You can also define the considered period.
The most successful tuned strategies I did were based on the derivative indicator with periods on the basis signal and the derivative under 30, can be 1 to 3 of te derivative and 7 to 21 for the basis signal. The threathold depends on the asset volatility aswell, 1 is usually the most efficient but 0 to 10 can be relevent depending on the situation I met. You can find an example of tuning for this strategy based on Kering's case hereafter.
I hoping that you will enjoy using this Strategy, don't hesitate to comment, to question, to correct or complete it ! I would be very curious about similar famous approaches that would have already been made.
Thank to you !
[OKX Signal Bot] Strategy Script Set Up TemplateWelcome to the Beginner's Guide: Creating a Custom Trading Signal on TradingView with OKX Signal Bot Integration. This entry-level script provides a step-by-step reference for beginner TradingView users who want to develop their own trading signal and seamlessly integrate it with the OKX Signal Bot.
Using a simple yet effective Relative Strength Index (RSI) strategy as an example, this script walks you through the process of creating a trading signal that generates buy and sell alerts based on RSI conditions. By following this guide, you will gain hands-on experience in building and customizing your trading signals while learning how to connect them with the OKX Signal Bot for automated trading execution.
The script begins with defining the necessary strategy parameters, such as the RSI length, overbought level, and oversold level. These parameters can be adjusted to suit your trading style and preferences.
Next, the script calculates the RSI value based on the specified length. The RSI is a popular momentum indicator used to identify potential overbought and oversold market conditions.
The script then establishes the trading signal conditions. In this example, a long entry signal is generated when the RSI crosses above the oversold level, indicating a potential entry point. Conversely, a long exit signal is triggered when the RSI crosses below the overbought level, suggesting a potential exit point. Similarly, the script also supports short entry and short exit signals.
To integrate the script with the OKX Signal Bot, the script includes the necessary inputs for the Signal Token. You can provide your unique Signal Token to connect with the OKX Signal Bot and enable automated trade alerts and execution.
The script also incorporates a custom alert message function specific to the OKX Signal Bot integration. This function generates the alert messages required for the bot, including the action (e.g., "ENTER_LONG"), the trading instrument, and the Signal Token.
Once the buy and sell signals are generated, the script sends the corresponding alert messages to the OKX Signal Bot, triggering the desired trading actions.
By following this entry-level script, beginner TradingView users can gain a practical understanding of how to create their own custom trading signals and seamlessly integrate them with the OKX Signal Bot. It serves as an excellent starting point for those interested in automated trading and empowers traders to take control of their strategies with confidence.
Please note that while this guide provides a basic framework, it is essential to test and optimize your trading signals before implementing them with real capital. Always exercise proper risk management techniques and validate your strategies in different market conditions.
Embark on your trading journey and unlock the potential of custom trading signals with OKX Signal Bot integration. Build your expertise, automate your trades, and make informed decisions using TradingView as your trusted platform.
These scripts are only functioning as sample script templates to support okx alert standards. It is not intended to provide any investment, tax, or legal advice, nor should it be considered an offer to purchase, sell, hold or offer any services relating to digital assets. Digital assets, including stablecoins, involve a high degree of risk, can fluctuate greatly, and can even become worthless. You should carefully consider whether trading or holding digital assets is suitable for you in light of your financial condition and risk tolerance. OKX does not provide investment or asset recommendations. You are solely responsible for your investment decisions, and OKX is not responsible for any potential losses. Past performance is not indicative of future results. Please consult your legal/tax/investment professional for questions about your specific circumstances.
Golden Transform The Golden Transform Oscillator contains multiple technical indicators and conditions for making buy and sell decisions. Here's a breakdown of its components and what it's trying to achieve:
Strategy Setup:
The GT is designed to be plotted on the chart without overlaying other indicators.
Rate of Change (ROC) Calculation:
The Rate of Change (ROC) indicator is calculated with a specified period ("Rate of Change Length").
The ROC measures the percentage change in price over the specified period.
Hull Modified TRIX Calculation:
The Hull Modified TRIX indicator is calculated with a specified period ("Hull TRIX Length").
The Hull MA (Moving Average) formula, a modified WMA, is used to calculate a modified TRIX indicator, which is a momentum oscillator.
Hull MA Calculation:
A Hull Moving Average (Hull MA) is calculated as an entry filter.
Fisher Transform Calculation:
The Fisher Transform indicator is calculated to serve as a preemptive exit filter.
It involves mathematical transformations of price data to create an oscillator that can help identify potential reversals. The Fisher Transform is further smoothed using a Hull Moving Average (HMA).
Conditions and Signals:
Long conditions are determined based on crossovers between ROC and TRIX, as well as price relative the the MA. Short conditions are inversed.
Exit Conditions:
Exit conditions are defined for both long and short positions.
For long positions, the strategy exits if ROC crosses under TRIX, or if the smoothed Fisher Transform crosses above a threshold and declines. Once again, short conditions are the inverse.
Visualization and Plotting:
The script uses background colors for entry and shapes for exits to highlight different levels and conditions for the ROC/TRIX correlation.
It plots the Fisher Transform values and a lag trigger on the chart.
Overall, this script is a complex algorithm that combines multiple technical indicators and conditions to generate trading signals and manage positions in the financial markets. It aims to identify potential entry and exit points based on the interplay of the mentioned indicators and conditions.
Gaussian Detrended ReversionThis strategy, titled "Gaussian Detrended Reversion Strategy," aims to identify potential price reversals using the customized Gaussian Detrended Price Oscillator (GDPO) in combination with smoothed price cycles.
Key Elements of the Strategy:
GDPO Calculation: The strategy first calculates the Detrended Price Oscillator (DPO) by comparing the close price to an Exponential Moving Average (EMA) of a specified period. This calculation helps identify short-term price cycles by detrending the price data.
Gaussian Smoothing: The DPO values are then smoothed using the Arnaud Legoux Moving Average (ALMA), applying a Gaussian smoothing technique. This smoothed version of the DPO is intended to filter out noise and provide a clearer picture of price trends.
Entry and Exit Conditions: The strategy defines conditions for both long and short entry points as well as exit points. It looks for specific crossover events between the smoothed GDPO and its lagged version. The strategy enters a long position when the smoothed GDPO crosses above the lag and is negative, and exits the long position when the smoothed GDPO crosses below the lag or the zero line. Similarly, the strategy enters a short position when the smoothed GDPO crosses below the lag and is positive, and exits the short position when the smoothed GDPO crosses above the lag or the zero line.
Visualization: The smoothed GDPO and its lag are plotted on the chart using distinct colors. The zero line is also displayed as a reference point. Additionally, the chart background changes color when the strategy enters a long or short position. Cross markers are also plotted at the crossover points as exit cues.
Overall, this strategy aims to capture potential price reversals using the GDPO and Gaussian smoothing, with specific entry and exit conditions to guide trading decisions.
Vortex Cross w/MA ConfirmationThis script is a trading strategy that combines the Vortex Indicator and a Moving Average (MA) to generate potential entry signals for long and short positions.
1. Vortex Indicator:
The Vortex Indicator consists of two lines: Vortex Positive (VIP) and Vortex Negative (VIM). It is designed to identify trend direction and measure the strength of a trend.
2. Moving Average (MA):
The script uses a chosen type of Moving Average (SMA, EMA, SMMA, WMA, or VWMA) to smooth the price data. The smoothed line is referred to as the "Smoothing Line."
3. Determine Long and Short Conditions:
The script looks for potential long entry signals when VIP crosses above VIM, highlighting each crossover on the chart, and the closing price is above the Smoothing Line. It searches for short entry signals when VIM crosses above VIP, with the closing price is below the Smoothing Line. When the long or short conditions are met, the strategy enters either a long or short position accordingly.
Potential Usage:
The strategy can be utilized in trending markets, where the Vortex Indicator helps identify trend direction and strength, and the Moving Average smooths the price data to filter out some noise. It aims to capture trends and ride them while avoiding false signals during choppy or sideways markets.
Bullish Divergence Short-term Long Trade FinderThis script is a Bullish divergence trade finder built to find small periods where Bitcoin will likely rise from. It looks for bullish divergence followed by a higher low as long as the hour RSI value is below the 40 mark, if then it will enter an long. It marks out Buy signals on the RSI if the value dips below 'RSI Bull Condition Minimum' (Default 40) on the current time frame in view. It also marks out Sell signals found when the RSI is above the 'RSI Bearish Condition Minimum' (Default 50). The sell signals are bearish divergence that has occurred recently on the RSI. When a long is in play it will sell if it finds bearish divergence or the time frame in view reaches RSI value higher than the 'RSI Sell Value'(Default 75). You can set your stop loss value with the 'Stop loss Percentage' (default 5).
Available inputs:
RSI Period: relative strength measurement length(Typically 14)
RSI Oversold Level: the bottom bar of the RSI (Typically 30)
RSI Overbought Level: the top bar of the RSI (Typically 70)
RSI Bearish Condition Minimum: The minimum value the script will use to look for a pivot high that starts the Bearish condition to Sell (Default 50)
RSI Bearish Condition Sell Min: the minimum value the script will accept a bearish condition (Default 60)
RSI Bull Condition Minimum: the minimum value it will consider a pivot low value in the RSI to find a divergence buy (Default 40)
Look Back this many candles: the amount of candles thee script will look back to find a low value in the RSI (Default 25)
RSI Sell Value: The RSI value of the exit condition for a long when value is reached (Default 75)
Stop loss Percentage: Percentage value for amount to lose (Default 5)
The formula to enter a long is stated below:
If price finds a lower low and there is a higher low found following a lower low and price has just made another dip and price closes lower than the last divergence and Relative strength index hour value is less than 40 enter a long.
The formula to exit a long is stated below:
If the value drops below the stop loss percentage OR (the RSI value is greater than the value of the parameter 'RSI Sell Value' or bearish divergence is found greater than the parameter 'RSI Bearish Condition Minimum' )
This script was built from much strategy testing on BTC but works with alts (occasionally) also. It is most successful to my knowledge using the 15 min and 7 min time frames with default values. Hope it helps! Follow for further possible updates to this script or other entry or exit strategies.
snapshot:
I only have a Pro trading view account so I cannot share a larger data set about this script because the buy signals happen pretty rarely. The most amount that I could find within a view for me was 40 trades within a viewable time. The suggested/default parameters that I have do not occur very often so it limits the data set. Adjustments can be made to the parameters so that trades can be entered more often. The scripts success is dependent on the values of the parameters set by the user. This script was written to be used for BTC/USD or BTC/USDT trading. I am unable to share a larger dataset without putting out results that are intended to fail or having a premium account so reaching the 100 trade minimum is not possible with my account.
TRAX Detrended Price StrategyIn this script, the "TRAX" (TRIX) indicator is calculated using the Volume Weighted Moving Average (VWMA) instead of Exponential Moving Average (EMA) like the standard TRIX. The Detrended Price is used to identify short term cycles with a rate of change verses the rate of change from a triple smoothed TRAX VWMA . The strategy is intended for counter-trend trading, meaning it tries to capture potential reversals.
1. Indicators Used:
TRAX is calculated using the Volume Weighted Moving Average (VWMA) of the logarithm of the closing price.
DPO (Detrended Price Oscillator) is calculated by taking the closing price and subtracting a simple moving average (SMA) of the closing price shifted back.
2. Crossover Conditions:
Longs occur when DPO crosses above the TRAX, with the TRAX trending below 0, and the stock is trading above an adjustable simple moving average. Shorts occur due to the inverse conditions.
3. Visualization:
This script plots the SMA and the TRAX-DPO Combined Oscillator.
It highlights the periods of zero-line crossover using a green background for potential long positions and a red background for potential short positions. However, it will trigger verified entries/exits in accordance with the SMA.
In conclusion, this fun prototype underwent a unique alteration using the Volume Weighted Moving Average and focuses on capturing shorter counter-trend cycles. You have the freedom to fine-tune the strategy by adjusting parameters and incorporating other analysis methods that resonate with your trading style and risk tolerance.
Good Mode RSI v2► Description:
"Good Mode RSI v2" is a powerful trading strategy designed to provide informed trading decisions. This script utilizes the popular RSI (Relative Strength Index) indicator to identify potential buying and selling opportunities in the market. It goes beyond the traditional use of RSI by incorporating carefully selected parameters to enhance its effectiveness. The strategy stands out for its customized combination of RSI levels and stop-loss/take-profit thresholds, allowing for precise trade entries and exits while effectively managing risk.
► How to Use:
To utilize the "Good Mode RSI v2" strategy, follow these steps:
1. Apply the script to your desired trading instrument and timeframe in TradingView.
2. Monitor the chart for trade signals generated by the strategy.
3. When the RSI reaches the sell level of 96, a sell signal is generated. Consider placing a sell order to take advantage of potential downward price movements.
4. take-profit level at 60 to secure profits in a strong downtrend.
5. When the RSI drops below the buy level of 4, a buy signal is generated. Consider placing a buy order to enter the market at a favorable price.
6. take-profit level at 30 to secure profits in a strong uptrend.
7. Monitor the RSI indicator on the chart to stay updated on its current value and anticipate potential trade signals.
Please note that trading decisions should be made based on a comprehensive analysis of multiple factors, including market conditions, trend analysis, and risk management. The "Good Mode RSI v2" strategy can serve as a valuable tool in your trading journey, but it should be used in conjunction with your own research and analysis.
► About it:
The "Good Mode RSI v2" strategy is not a mere replication or slight modification of existing strategies or indicators. It has been carefully crafted to provide traders with an original and purposeful approach to trading using the RSI indicator. The strategy's unique configuration of RSI levels and stop-loss/take-profit thresholds allows for improved performance and profitability. Backtesting results have shown impressive metrics, including a gain factor of 2.445 and a compelling profitability of 78.07% during the testing period.
► Referrals:
If you have any questions or need further assistance with the "Good Mode RSI v2" strategy, feel free to ask. Good luck with your trading endeavors!
Buy Only Strategy with Dynamic Re-Entry and ExitThe strategy aims to create a simple buy-only trading system based on moving average crossovers and the Weekly Commodity Channel Index (CCI) or Weekly Average Directional Index (ADX). It generates buy signals when the fast-moving average crosses above the slow-moving average and when the Weekly CCI and or Weekly ADX meet the specified conditions.
The strategy also allows for dynamic re-entry, which means it can open new long positions if the price goes above the three moving averages after an exit. However, the strategy will exit the long position if the price closes below the third moving average.
ENTRY CONDITIONS
The script defines the conditions for generating buy signals. It checks for two conditions for a valid buy signal:
• If the fast-moving average crosses above the slow-moving average -THERE IS Dynamic Re-Entry also
• If the user chooses HE OR SHE CAN FILTER TRADES BY USING CCI OR ADX
Dynamic Re-Entry:
the script allows for dynamic re-entry. If there is no active long position and the price is above all three moving averages a new long position is opened.
Exit Conditions
The script defines the exit condition for closing a long position. If the price closes below the third moving average, the script closes the long position.
IMPORTANT NOTICE
ONLY DAILY TIME FRAME
THERE WOULD BE WHIPSAW USE YOUR OWN ACCUMEN TO MINIMISE THEM
ITS ONLY BUY STRATEGY
EXIT CAN BE STRATEGY BASED OR SET PROFIT AND TARGETS AS PER RISK APETITE /RISK MANAGEMENT
DONT TRADE OPTIONS ON THIS
SUITABLE FOR STOCKS OF USA AND INDIAN MARKETS
ALWAYS REMEMBER TO DO YOUR OWN RESEARCH BEFORE TRADING AND INVESTING
BTFD strategy [3min]Hello
I would like to introduce a very simple strategy to buy lows and sell with minimal profit
This strategy works very well in the markets when there is no clear trend and in other words, the trend going sideways
this strategy works very well for stable financial markets like spx500, nasdaq100 and dow jones 30
two indicators were used to determine the best time to enter the market:
volume + rsi values
volume is usually the number of stocks or contracts traded over a certain period of time. Thus, it is an important indicator of market activity and liquidity. Each transaction constitutes an individual exchange between the buyer and the seller and constitutes the trading volume of a given instrument or asset.
The RSI measures the strength of uptrends versus downtrends. The signal is the entry or exit of the indicator value of the oversold or overbought level of the market. It is assumed that a value below or equal 30 indicates an oversold level of the market, and an RSI value above or equal 70 indicates an overbought level.
the strategy uses a maximum of 5 market entries after each candle that meets the condition
uses 5 target point levels to close the position:
tp1= 0.4%
tp2= 0.6%
tp3= 0.8%
tp4= 1.0%
tp5= 1.2%
after reaching a given profit value, a piece of the position is cut off gradually, where tp5 closes 100% of the remaining position
each time you enter a position, a stop loss of 5.0% is set, which is quite a high value, however, when buying each, sometimes very active downward price movement, you need a lot of space for market decisions in which direction it wants to go
to determine the level of stop loss and target point I used a piece of code by RafaelZioni , here is the script from which a piece of code was taken
this strategy is used for automation, however, I would recommend brokers that have the lowest commission values when opening and closing positions, because the strategy generates very high commission costs
Enjoy and trade safe ;)
3-Signal Directional Trend Strategy for E-MinisThis is a conceptual strategy intended for E-mini S&P 500 futures with hourly bars.
It uses three signals, going long or short when two or more change in the same direction.
First is MACD. A positive oscillator is considered a bullish signal and a falling oscillator is interpreted bearishly.
Next, stochastics are used as an overbought/oversold indicator. Overbought conditions are considered bearish and oversold readings are viewed as bullish.
Third is a custom indicator based on our Moving Average Speed script. It takes the rate of change of the 50-hour simple moving average (SMA), and then smooths it using a 10-period average. This provides a directional signal.
Traders may want to experiment with different settings for moving average speed.
Note: This is intended for use with stock index futures, which have round-the clock price data to populate the data in the indicators. It may not yield good results with stocks or ETFs.
TradeStation has, for decades, advanced the trading industry, providing access to stocks, options, futures and cryptocurrencies. See our Overview for more.
Important Information
TradeStation Securities, Inc., TradeStation Crypto, Inc., and TradeStation Technologies, Inc. are each wholly owned subsidiaries of TradeStation Group, Inc., all operating, and providing products and services, under the TradeStation brand and trademark. TradeStation Crypto, Inc. offers to self-directed investors and traders cryptocurrency brokerage services. It is neither licensed with the SEC or the CFTC nor is it a Member of NFA. When applying for, or purchasing, accounts, subscriptions, products, and services, it is important that you know which company you will be dealing with. Please click here for further important information explaining what this means.
This content is for informational and educational purposes only. This is not a recommendation regarding any investment or investment strategy. Any opinions expressed herein are those of the author and do not represent the views or opinions of TradeStation or any of its affiliates.
Investing involves risks. Past performance, whether actual or indicated by historical tests of strategies, is no guarantee of future performance or success. There is a possibility that you may sustain a loss equal to or greater than your entire investment regardless of which asset class you trade (equities, options, futures, or digital assets); therefore, you should not invest or risk money that you cannot afford to lose. Before trading any asset class, first read the relevant risk disclosure statements on the Important Documents page, found here: www.tradestation.com .
Volatility Capture RSI-Bollinger - Strategy [presentTrading]- Introduction and how it is different
The 'Volatility Capture RSI-Bollinger - Strategy ' is a trading strategy that combines the concepts of Bollinger Bands (BB), Relative Strength Index (RSI), and Simple Moving Average (SMA) to generate trading signals. The uniqueness of this strategy is it calculates which is a dynamic level between the upper and lower Bollinger Bands based on the closing price. This unique feature allows the strategy to adapt to market volatility and price movements.
The market in Crypto and Stock are highly volatile, making them suitable for a strategy that uses Bollinger Bands. The RSI can help identify overbought or oversold conditions in this often speculative market.
BTCUSD 4hr chart
(700.hk) 3hr chart
Remember, the effectiveness of a trading strategy also depends on other factors such as the timeframe used, the specific settings of the indicators, and the overall market conditions. It's always recommended to backtest and paper trade a strategy before using it in live trading.
- Strategy, How it Works
Dynamic Bollinger Band: The strategy works by first calculating the upper and lower Bollinger Bands based on the user-defined length and multiplier. It then uses the Bollinger Bands and the closing price to dynamically adjust the presentBollingBand value. In the end, it generates a long signal when the price crosses over the present Bolling Band and a short signal when the price crosses under the present Bolling Band.
RSI: If the user has chosen to use RSI for signals, the strategy also calculates the RSI and its SMA, and uses these to generate additional long and short signals. The RSI-based signals are only used if the 'Use RSI for signals' option is set to true.
The strategy then checks the chosen trading direction and enters a long or short position accordingly. If the trading direction is set to 'Both', the strategy can enter both long and short positions.
Finally, the strategy exits a position when the close price crosses under the present Bolling Band for a long position, or crosses over the present Bolling Band for a short position.
- Trade direction
The strategy also includes a trade direction parameter, allowing the user to choose whether to enter long trades, short trades, or both. This makes the strategy adaptable to different market conditions and trading styles.
- Usage
1. Set the input parameters as per your trading preferences. You can choose the price source, the length of the moving average, the multiplier for the ATR, whether to use RSI for signals, the RSI and SMA periods, the bought and sold range levels, and the trading direction.
2. The strategy will then generate buy and sell signals based on these parameters. You can use these signals to enter and exit trades.
- Default settings
1. Source: hlc3
2. Length: 50
3. Multiplier: 2.7183
4. Use RSI for signals: True
5. RSI Period: 10
6. SMA Period: 5
7. Bought Range Level: 55
8. Sold Range Level: 50
9. Trade Direction: Both
- Strategy's default Properties
1. Default Quantity Type: 'strategy.percent_of_equity'
2. commission_value= 0.1, commission_type=strategy.commission.percent, slippage= 1: These parameters set the commission and slippage for the strategy. The commission is set to 0.1% of the trade value, and the slippage (the difference between the expected price of a trade and the price at which the trade is executed) is set to 1.
3. default_qty_type = strategy.percent_of_equity, default_qty_value = 15: These parameters set the default quantity for trades. The default_qty_type is set to strategy.percent_of_equity, which means that the size of each trade will be a percentage of the account equity. The default_qty_value is set to 15, which means that each trade will be 15% of the account equity.
4. initial_capital= 10000: This parameter sets the initial capital for the strategy to $10,000.
PresentTrend - Strategy [presentTrading]- Introduction and how it is different
The PresentTrend strategy is a unique custom trend-following strategy. This combination allows the strategy to take advantage of both short-term and long-term market trends, making it suitable for various market conditions.
BTCUSDT 4hr chart
(700.hk) 3D chart
- Strategy, How it Works
RSI or MFI: The first part uses a custom indicator based on either the Relative Strength Index (RSI) or the Money Flow Index (MFI). The indicator calculates a PresentTrend value, which generates buy and sell signals based on its crossover and crossunder, indicating potential trend reversals.
ATR: The second part is a popular trend-following indicator that uses the Average True Range (ATR).
The strategy enters a long position when all buy signals from both strategies are true, and a short position when all sell signals are true. This ensures trades are entered when both short-term and long-term trends align, potentially increasing the strategy's reliability.
- Trade direction
The strategy also includes a trade direction parameter, allowing the user to choose whether to enter long trades, short trades, or both. This makes the strategy adaptable to different market conditions and trading styles.
- Usage
1. Set the input parameters for the custom trend-following strategy.
2. Choose whether to use the RSI or MFI for the custom strategy.
3. Choose the trade direction: long, short, or both.
4. The strategy will generate buy and sell signals based on the conditions of both strategies.
5. Enter a trade when a buy or sell signal is generated, depending on the chosen trade direction.
Please note that this strategy is meant to be a tool to aid in your trading decisions and not a standalone trading system. Always use proper risk management and make sure to test the strategy thoroughly before using it in live trading.
- Default settings
1. Source: 'hlc3', a balanced price level for calculations.
2. Length: 14, a common setting for many technical indicators.
3. Multiplier: 1.618 (the golden ratio), used in calculating the upper and lower thresholds.
4. RSI or MFI: Set to use MFI by default, both are momentum indicators.
5. Trade Direction: 'Both', allowing for both long and short trades.
The default settings are designed to provide a balanced approach to trend detection. However, these can be adjusted based on the user's preferences and the specific characteristics of the market being traded.
- Strategy's default Properties
1. Default Quantity Type: 'strategy.percent_of_equity'
2. commission_value= 0.1, commission_type=strategy.commission.percent, slippage= 1: These parameters set the commission and slippage for the strategy. The commission is set to 0.1% of the trade value, and the slippage (the difference between the expected price of a trade and the price at which the trade is executed) is set to 1.
3. default_qty_type = strategy.percent_of_equity, default_qty_value = 10: These parameters set the default quantity for trades. The default_qty_type is set to strategy.percent_of_equity, which means that the size of each trade will be a percentage of the account equity. The default_qty_value is set to 10, which means that each trade will be 10% of the account equity.
4. initial_capital= 10000: This parameter sets the initial capital for the strategy to $10,000.
Ta StrategyHello guys
This script follows traditional technical indicators
MACD, ADX, RSI and pivot points
If the price is above the resistance and the MACD has crossover ,and the RSI 14 is above 50
ADX is higher than 20, and DI+ is higher than DI-. This is a buy signal and vice versa for a sell signal
The script moves the stop loss to the entry price after the first target is reached
You can specify the quantity you want to sell when the price reaches the first target
There are also options like if you want the script to entry long or short, or both
you can reverse the strategy if it does not work well
If you want to inquire about any details, please let me know in the comments