BankNifty_Bullish_Intraday
The script uses following mechanism to give a signal of BUY if multiple parameters evaluated are all passed.
ENTRY-
1. 5 min MACD should be more than its previous tick
2. 15 min MACD should be more than its previous tick
3. 60 min MACD should be more than its previous tick
4. ADX should be more than 12
5. RSI should be more than 60
6. Stochastic %k should have cross over with %d
7. Bollinger band upper band value should be more than previous tick
EXIT
If the 5 min bar price closes below 5 min EMA , it gives an exit signal.
Indicatori e strategie
BankNifty_Bearish_Intraday
The script uses following mechanism to give a signal of SELL if multiple parameters evaluated are all passed.
ENTRY-
1. 5 min MACD should be less than its previous tick
2. 15 min MACD should be less than its previous tick
3. 60 min MACD should be less than its previous tick
4. ADX should be more than 12
5. RSI should be less than 40
6. Stochastic %k should have negative cross over with %d
7. Bollinger band lower band value should be less than previous tick
EXIT
If the 5 min bar price closes above 5 min EMA , it gives an exit signal.
Volume Strike Strategy 1.1Volume Strike
This custom non-repainting indicator is based on an extremely simple strategy we came up with using only the default Volume indicator and key price levels.
We’ll start by explaining the time settings. You will see 4 of them.
The 2 times on the left represent the closed-volume candles at those times.
The 2 times on the right MUST be 1 minute after the times on the left. This is just a technicality based on pine script, so you can ignore the reasoning behind It. Just make sure these times are always 1 minute after the times on the left.
How signals are plotted
-If Volume 1 is higher than Volume 2, we are bullish
-If Volume 1 is lower than Volume 2, we are bearish
It's that simple! We added key price levels to also limit where to display trades. So if you only enable "Quarter Levels", this means trades will only be entered at or around Quarter Levels based on the "Price Offset" you enter.
Rounding Value: This is to help determine where to start marking Whole Levels.
Example: You’re trading USDJPY. The rounding value will be 10. The reasoning for this is that every $10 movement in price is equivalent to 1,000 pips, so a half level is 500 pips, and a quarter level is 250 pips. For a pair such as NAS100, we’ll use a rounding value of 1,000.
Price offset: This is to only show trades X price or less away from the enabled levels.
Example: You're trading NAS100 and enter 100 for the "Price Offset" setting. This means trades will only be displayed within a $100 price of the levels you selected. Keep in mind, if no levels are selected the Price Offset setting is disabled by default, and if Price Offset is 0, the levels are disabled by default, and trades will be displayed regardless if it's around a key price level or not.
Risk Management
We added several options to choose from for determining your SL and TP.
TP: Price, Percent or Next Level
SL: Price or Percent
Next Level: This option is only available for TP. Next level is just how it sounds, the next level in the direction of your trade. Keep in mind, if price is too close to the level, it’ll skip that one and set your TP at the next level.
Inverse Signals: This was added in case you find a losing strategy. You can inverse the trades to potentially have a winning strategy
Position Tool: This will display boxes on the cart with the price of your SL + TP, and the % movement in price of your SL + TP
An example of settings we are using for NAS100 are below:
NAS100. M15
09:30 - 09:31
12:00 - 12:01
MA Filter = 5
Rounding Value = 1,000
Price Offset = 0
Target = 100 price
Stop loss = 100 price
RSI and MA with Trailing Stop Loss and Take Profit (by Coinrule)The relative strength index is a momentum indicator used in technical analysis. It measures the speed and magnitude of a coin's recent price changes to evaluate overvalued or undervalued conditions in the price of that coin. The RSI is displayed as an oscillator (a line graph essentially) on a scale of zero to 100. When the RSI reaches oversold levels, it can provide a signal to go long. When the RSI reaches overbought levels, it can mark a good exit point or alternatively, an entry for a short position. Traditionally, an RSI reading of 70 or above indicates an overbought situation. A reading of 30 or below indicates an oversold condition.
A moving average (MA) calculates the average of a selected range of prices, usually closing prices, by the number of periods in that range. Essentially it is used to help smooth out price data by creating a constantly updated average price.
The Strategy enters and closes trades when the following conditions are met:
Entry Conditions:
RSI is greater than 50
MA9 is greater than MA50
RSI increases by 5
Exit Conditions:
Price increases by 1% trailing
Price decreases by 2% trailing
This strategy is back-tested from 1 January 2022 to simulate how the strategy would work in a bear market. The strategy provides good returns.
The strategy assumes each order is using 30% of the available coins to make the results more realistic and to simulate you only ran this strategy on 30% of your holdings. A trading fee of 0.1% is also taken into account and is aligned to the base fee applied on Binance.
Weird Renko StratThis strategy uses Renko, it generates a signal when there is a reversal in Renko. When using historical data, it provides a good entry and an okay exit. However, in a real-time environment, this strategy is subject to repaint and may produce a false signal.
As a result, the backtesting result should not be used as a metric to predict future results. It is highly recommended to forward-test the strategy before using it in real trading. I forward test it from 12/18/2022 to 12/21/2022 in paper trading, using the alert feature in Tradingview. I made 60 trades trading the BTCUSDT BINANCE 3 min with 26 as the param and under the condition that I use 20x margin, compounding my yield, and having 0 trading fee, a steady loss is generated: from $10 to $3.02.
This is quite interesting. As if I flip the signal from "Long" to "Short" and another way too, it will be a steady profit from $10 to $21.85. Hence, if I'm trying to anti-trade the real-time alert signal, the current "4 Days Result" will be good. Nevertheless, I still have to forward-test it for longer to see if it will fail eventually.
Dive into the setting of the strategy
- Margin is the leverage you use. 1 means 1x, 10 means 10x. It affects the backtest yield when you backtest
- Compound Yield button is for compound calculation, disable it to go back to normal backtesting
- Anti Strategy button is to do the opposite direction trade, when the original strat told you to "Long", you "Short" instead. Enable it to use the feature
- Param is the block size for the Renko chart
- Drawdown is just a visual tool for you in case you want to place a stop loss (represent by the semitransparent red area in the chart)
- From date Thru Date is to specify the backtest range of the strategy, This feature is turned off by default. It is controlled by the Max Backtest Timeframe which will be explain below
- Max Backtest Timeframe control the From date Thru Date function, disable it to enable the From Date Thru Date function
Param is the most important input in this strategy as it directly affects performance. It is highly recommended to backtest nearly all the possible parameters before deploying it in real trading. Some factors should be considered:
- Price of the asset (like an asset of 1 USD vs an asset of 10000 USD required different param)
- Timeframe (1-minute param is different than 1-month param)
I believe this is caused by the volatility of the selected timeframe since different timeframe has different volatility. Param should be fine-tuned before usage.
Here is the param I'm using:
BTCUSDT BINANCE 3min: 26
BTCUSDT BINANCE 5min: 28
BTCUSDT BINANCE 1day: 15
Background of the strategy:
- The strategy starts with $10 at the start of backtesting (customizable in setting)
- The trading fee is set to 0.00% which is not common for most of the popular exchanges (customizable in setting)
- The contract size is not a fixed amount, but it uses your balance to buy it at the open price. If you are using the compound mode, your balance will be your current total balance. If you are using the non-compound mode, it will just use the $10 you start with unless you change the amount you start with. If you are using a margin higher than 1, it will calculate the corresponding contract size properly based on your margin. (Only these options are allowed, you are not able to change them without changing the code)
Macro Score - DFMA-BasedA "macro score", as defined here, is created by giving various weights to different signals and adding them together to get one smooth score. Positive or negative values are assigned to each of the signals depending on if the statement is true or false (e.g. DPO > 0: +1, DPO < 0: -1). This manner of strategy allows for a subset of the available signals to be present at one time as opposed to every technical signal having to be active in order for a long/short signal to trigger.
The DFMA - Democratic Fibonacci Moving Average - is a separate indicator that we have released that takes 10 different Fibonacci MAs (lengths of 3 to 233, at Fibonacci intervals) and averages them to form the DFMA line. This helps by creating a consensus on the trend based on moving averages alone. Crossovers of the DFMA with the various Fib MA lengths as well as a cross of the price source and these lines can provide adequate long and short signals.
This strategy has the signals and weights pre-determined in the code. Heaviest weights have been given to crosses of the DFMA line/Fib MA (233) as well as the crosses of the Fib MA (3)/DFMA. Additionally, there are thresholds for DPO ( Detrended Price Oscillator , above or below 0), CMO ( Chande Momentum Oscillator , above or below 0), Jurik Volatility Bands (above or below 0), and Stoch RSI (above or below 50). These foursignals hold a lighter weight than the MA cross signals.
The macro score itself is printed in an underlay as a white line that goes between -10 and 10 for this strategy. In addition to the macro score line, a blue momentum line (sourced by the macro score itself) has been included. A crossover/crossunder of the macro score and the macro momentum line is included into the long/short signal syntax in addition to a threshold for the macro score (-5/5).
Take profit, stop loss, and trailing percentages are also included, found at the bottom of the Input tab under “TT and TTP” as well as “Stop Loss”. Make sure to understand the TP/SL ratio that you desire before use, as the desired hit rate/profitability percentage will be affected accordingly. This strategy does NOT guarantee future returns. Apply caution in trading regardless of discretionary or algorithmic. Understand the concepts of risk/reward and the intricacies of each strategy choice before utilizing them in your personal trading.
Profitview Settings:
If you wish to utilize Profitview’s automation system, find the included “Profitview Settings” under the Input tab of the strategy settings menu. If not, skip this section entirely as it can be left blank. Options will be “OPEN LONG TITLE”, “OPEN SHORT TITLE”, “CLOSE LONG TITLE”, and “CLOSE SHORT TITLE”. If you wished to trade SOL, for example, you would put “SOL LONG”, “SOL SHORT”, “SOL CLOSE LONG”, and “SOL CLOSE SHORT” in these areas. Within your Profitview extension, ensure that your Alerts all match these titles. To set an alert for use with Profitview, go to the “Alerts” tab in TradingView, then create an alert. Make sure that your desired asset and timeframe are currently displayed on your screen when creating the alert. Under the “Condition” option of the alert, select the strategy, then select the expiration time. If using TradingView Premium, this can be open-ended. Otherwise, select your desired expiration time and date. This can be updated whenever desired to ensure the strategy does not expire. Under “Alert actions”, nothing necessarily needs to be selected unless so desired. Leave the “Alert name” option empty. For the “Message”, delete the generated message and replace it with {{strategy.order.alert_message}} and nothing else.
Default Properties, for AVAX 20M:
DPO - 40, uncentered
CMO - 25, open
K/D - 3/3
RSI Stoch Length - 3
Stoch Length - 4
Stoch Source - open
JVB Length - 25
JVB Smoothing - 2
DFMA source - close
Macro Length - 13
TP % - 1.5%
TTP % - 0.005%
SL % - 2%
MACD + RSI + ADX Strategy (ChatGPT-powered) by TradeSmartThis is a trading strategy made by TradeSmart, using the recommendations given by ChatGPT . As an experiment, we asked ChatGPT on which indicators are the most popular for trading. We used all of the recommendations given, and added more. We ended up with a strategy that performs surprisingly well on many crypto and forex assets. See below for exact details on what logic was implemented and how you can change the parameters of the strategy.
The strategy is a Christmas special , this is how we would like to thank the support of our followers.
The strategy has performed well on Forex, tested on 43 1-hour pairs and turned a profit in 21 cases. Also it has been tested on 51 crypto pairs using the 1-hour timeframe, and turned a profit in 45 cases with a Profit Factor over 1.4 in the top-5 cases. Tests were conducted without commission or slippage, unlike the presented result which uses 0.01% commission and 5 tick slippage.
Some of the top performers were:
SNXUSDT
SOLUSDT
CAKEUSDT
LINKUSDT
EGLDUSDT
GBPJPY
TRYJPY
USDJPY
The strategy was implemented using the following logic:
Entry strategy:
Long entry:
Price should be above the Simple Moving Average (SMA)
There should be a cross up on the MACD (indicated by the color switch on the histogram, red to green)
RSI should be above the 50 level
Volume is above the selected volume-based Exponential Moving Average (EMA)
ADX should also agree to this position: below 50 and over 20, and above the Regularized Moving Average (REMA)
Short entry:
Price should be under the Simple Moving Average (SMA)
There should be a cross down on the MACD (indicated by the color switch on the histogram, red to green)
RSI should be below the 50 level
Volume is above the selected volume-based Exponential Moving Average (EMA)
ADX should also agree to this position: below 50 and over 20, and above the Regularized Moving Average (REMA)
Exit strategy:
Stop Loss will be placed based on ATR value (with 1.5 Risk)
Take profit level will be placed with a 2.5 Risk/Reward Ratio
Open positions will be closed early based on the Squeeze Momentum (Long: change to red, Short: change to green)
NOTE! : The position sizes used in the example is with 'Risk Percentage (current)', according which the position size will be determined such
that the potential loss is equal to % of the current available capital. This means that in most of the cases, the positions are calculated using leverage.
Parameters of every indicator used in the strategy can be tuned in the strategy settings as follows:
Plot settings:
Plot Signals: true by default, Show all Long and Short signals on the signal candle
Allow early TP/SL plots: false by default, Checking this option will result in the TP and SL lines to be plotted also on the signal candle rather than just the entry candle. Consider this only when manual trading, since backtest entries does not happen on the signal candle.
Entry Signal:
Fast Length: 12 by default
Slow Length: 26 by default
Source: hlcc4 by default
Signal Smoothing: 9 by default
Oscillator MA Type: EMA by default
Signal Line MA Type: EMA by default
Exit Strategy:
ATR Based Stop Loss: true by default
ATR Length (of the SL): 14 by default
ATR Smoothing (of the SL): EMA by default
Candle Low/High Based Stop Loss: false by default, recent lowest or highest point (depending on long/short position) will be used to calculate stop loss value. Set 'Base Risk Multiplier' to 1 if you would like to use the calculated value as is. Setting it to a different value will count as an additional multiplier. Please select only one active stop loss. Default value (if nothing or multiple stop losses are selected) is the 'ATR Based Stop Loss'.
Candle Lookback (of the SL): 10 by default
Base Risk Multiplier: 1.5 by default, the stop loss will be placed at this risk level (meaning in case of ATR SL that the ATR value will be multiplied by this factor and the SL will be placed that value away from the entry level)
Risk to Reward Ratio: 2.5 by default, the take profit level will be placed such as this Risk/Reward ratio is met
Force Exit based on Squeeze Momentum: true by default, a Long position will be closed when Squeeze Momentum turns red inside an open position and a Short position will be closed when Squeeze Momentum turns green inside an open position
BB Length: 20 by default
BB Mult Factor: 1.0 by default
KC Length: 20 by default
KC Mult Factor: 1.5 by default
Use True Range (KC): Yes by default
Base Setups:
Allow Long Entries: true by default
Allow Short Entries: true by default
Order Size: 1.5 by default
Order Type: Risk Percentage (current) by default, allows adjustment on how the position size is calculated: Cash: only the set cash ammount will be used for each trade Contract(s): the adjusted number of contracts will be used for each trade Capital Percentage: a % of the current available capital will be used for each trade Risk Percentage (current): position size will be determined such that the potential loss is equal to % of the current available capital Risk Percentage (initial): position size will be determined such that the potential loss is equal to % of the initial capital
Trend Filter:
Use long trend filter: true by default, only enter long if price is above Long MA
Show long trend filter: true by default, plot the selected MA on the chart
MA Type (Long): SMA by default
MA Length (Long): 100 by default
MA Source (Long): close by default
Use short trend filter: true by default, only enter long if price is under Short MA
Show short trend filter: false by default, plot the selected MA on the chart
MA Type (Short): SMA by default
MA Length (Short): 100 by default
MA Source (Short): close by default
Simple RSI Limiter:
Limit using Simple RSI: true by default, if set to 'Normal', only enter long when Simple RSI is lower then Long Boundary, and only enter short when Simple RSI is higher then Short Boundary. If set to 'Reverse', only enter long when Simple RSI is higher then Long Boundary, and only enter short when Simple RSI is lower then Short Boundary.
Simple RSI Limiter Type:
RSI Length: 14 by default
RSI Source: hl2 by default
Simple RSI Long Boundary: 50 by default
Simple RSI Short Boundary: 50 by default
ADX Limiter:
Use ADX Limiter: true by default, only enter into any position (long/short) if ADX value is higher than the Low Boundary and lower than the High Boundary.
ADX Length: 5 by default
DI Length: 5 by default
High Boundary: 50 by default
Low Boundary: 20 by default
Use MA based calculation: Yes by default, if 'Yes', only enter into position (long/short) if ADX value is higher than MA (ADX as source).
MA Type: REMA by default
MA Length: 5 by default
Volume Filter:
Only enter trades where volume is higher then the volume-based MA: true by default, a set type of MA will be calculated with the volume as source, and set length
MA Type: EMA by default
MA Length: 10 by default
Session Limiter:
Show session plots: false by default, show crypto market sessions on chart: Sidney (red), Tokyo (orange), London (yellow), New York (green)
Use session limiter: false by default, if enabled, trades will only happen in the ticked sessions below.
Sidney session: false by default, session between: 15:00 - 00:00 (EST)
Tokyo session: false by default, session between: 19:00 - 04:00 (EST)
London session: false by default, session between: 03:00 - 11:00 (EST)
New York session: false by default, session between: 08:00 - 17:00 (EST)
Date Range:
Limit Between Dates: false by default
Start Date: Jul 01 2021 00:00:00 by default
End Date: Dec 31 2022 00:00:00 by default
Trading Time:
Limit Trading Time: false by default, tick this together with the options below to enable limiting based on day and time
Valid Trading Days Global: 1234567 by default, if the Limit Trading Time is on, trades will only happen on days that are present in this field. If any of the not global Valid Trading Days is used, this field will be neglected. Values represent days: Sunday (1), Monday (2), ..., Friday (6), Saturday(7) To trade on all days use: 123457
(1) Valid Trading Days: false, 1234567 by default, values represent days: Sunday (1), Monday (2), ..., Friday (6), Saturday(7) The script will trade on days that are present in this field. Please make sure that this field and also (1) Valid Trading Hours Between is checked
(1) Valid Trading Hours Between: false, 0930-1600 by default, hours between which the trades can happen. The time is always in the exchange's timezone
Fine-tuning is highly recommended when using other asset/timeframe combinations.
[Strategy]Turtle's 20day High Low Break StrategyJapanese below / 日本語説明は下記
Overview
I have made this strategy mimicking the legendary traders group, Turtle’s 20days high low break strategy with more options available for take profit(TP) and stop loss(SL) conditions.
The main component of the strategy is same as my indicator, Previous N days/weeks/months high/low(see the link below) and with this strategy, you can backtest previous N days high/low break strategy.
Unlike the indicator, you can specify another previous N days high/low as TP condition. This is because Turtle used 10days low as TP condition for 20days high break buy strategy, according to articles/books about them.
ATR and other factors which is said to be used in their original strategy are not included in this strategy.
Previous N Days/Weeks/Months High Low
What is Turtle?
Turtle is the group of traders founded by Richard Dennis and William Eckhardt to prove their theory that good traders can be trained or not.
It is said that Turtle had made more than 175 million dollars over 5 years and some of the traders has become fund managers or successful individual traders even after the experiment.
What is this strategy like?
The strategy generates long entries once prices break previous N days highs and short entries when previous N days lows broken.
N is user input so you can adjust it for your own strategy.
As mentioned above, you can also specify another set of different previous N days high/low for TP conditions.
e.g. 55 days high(low) break for entry and 20days low(high) break for take profit condition.
How to use it?
What this strategy shows is almost same as the indicator, Previous N days/weeks/months high/low.
It displays previous N days/weeks/months highs and lows and you can set up entry condition based on previous N days high/low.
Previous N weeks/months highs/lows can be used as take profit points when you develop your own strategy based on this.
See the parameters below for the rest of the details.
Parameters
TP condition:
You can select from “Pips”, “When opposite entries” or “Previous high low break”.
When “When opposite entries” selected, the strategy exits the open positions when opposite directional entries happened. e.g. Long positions will be closed when short entries made.
If you would like to exit positions with specific previous N days highs/lows, you can enter N in Previous N days High/Low for TP field with “Previous high low break” selected.
SL condition:
You can select from “Pips” or “Swing High/Low”.
If “Swing High/Low” selected, left bars and right bars need input to determine swing high/low.
Note: If you select “pips” in TP/SL conditions, it currently works only for forex pairs.
What timeframe is the best for this strategy?
As this strategy is for swing trading, longer timeframes are the best.
Base on my quick check upon strategy’s performance over USD pairs in forex, daily timeframe works best, however, it could fit in with lower timeframes such as 4H and 1H by adjusting TP/SL conditions.
Look at the sample result below. The result shows the strategy’s performance for USDJPY for over 40 years on Daily timeframe and it performs fairly good with more than 2 profit factor over long period of time with up-trending equity curve.
It is just a simulation but the data shows Turtle’s strategy still works.
=================
概要
伝説のトレーダー集団タートルの20日高値・安値ブレイク手法を模倣して作成したストラテジーです。
利益確定や損切り条件を設定可能なようにして、より柔軟性を持たせています。
ストラテジーの主要な構造は過去にリリースしたインジケーターPrevious N days/weeks/months high/lowと同じです(下記リンク参照)。
このストラテジーを使うと、過去N日高値・安値のブレイク手法のバックテストを行うことが可能です。
また、前述のインジケーターとは異なり、このストラテジーでは利益確定条件のために、もう一つ別の過去N日高値・安値を設定することができます。これはタートルが20日高値のブレイクで買いエントリーを行う場合、10日安値ブレイクを手仕舞いの基準として使っていたことからです。
タートルのオリジナル手法ではATRやその他の要素も用いられていたようですが、このストラテジーには含まれていません。
Previous N Days/Weeks/Months High Low
タートルとは何か?
タートルとは、「優れたトレーダーは育成可能か?」の問いを証明するために、投資家リチャード・デニス氏とウィリアム・エックハート氏によって組織されたトレーダー集団です。
タートルは5年間に渡って1億7千5百万ドル以上を稼ぎ出したと言われており、この実験終了後にはヘッジファンドを運営する者や個人投資家として成功したトレーダーを輩出したことで知られています。
このストラテジーの特徴
このストラテジーは、価格が過去N日高値をブレイクした時にロングエントリーを、過去N日安値をブレイクした時にショートエントリーを実行します。
Nはパラメーターで指定可能なので、皆さんの独自の手法開発のために調整することができます。
また、前述の通り、利益確定条件としてエントリー条件とは別の過去N日高値・安値を指定することが可能です。
例:エントリーには55日の高値・安値のブレイクを用い、決済には20日高値・安値のブレイクを用いるなど。
使い方
このストラテジーは前述のインジケーターとほぼ同じ内容のラインを表示します。
過去N日、N週間、Nヶ月の高値・安値を表示でき、エントリーの条件として過去N日高値・安値を指定することができます。
過去N週・Nヶ月高値・安値ラインは利益確定の目安に用いるなど、皆さんが独自の手法を構築するときの参考として使ってください。
その他のパラメーターについては以下の詳細を参照ください。
パラメーター:
TP condition(利益確定条件):
“Pips(Pips指定)”, “When opposite entries(逆方向エントリー時)” or “Previous N days high low break(過去N日高値・安値)”から選択することができます。
“When opposite entries” を選択した場合、現在のポジションは、現在ポジションとは逆方向のエントリー条件が満たされた時に、決済されます。
例: ロングポジションはショートのエントリーが実行されると同時に決済される。
特定の過去N日高値・安値ブレイクを決済条件としたい場合は、“Previous N days high low break”を選択の上、該当するN日を”Previous N days High/Low for TP”の項目に入力してください。
SL condition(損切り基準):
“Pips(Pips指定)”、“Swing High/Low(スウィングハイ・ロー)”から選択することができます。
“Swing High/Low”選択時は、高値・安値決定に必要な左右のバーの本数を指定します。
注:TP、SL条件でPipsを選択した場合は、現時点では為替通貨ペアのみに機能します。
このストラテジーに最適の時間軸は?
当ストラテジーはスウィングトレードの手法となっているため、長期の時間軸が適しています。
為替のドルストレートペアでの結果を見てみると日足が最も適していますが、利益確定や損切り条件を調整することで、4時間足や1時間足向きにもアレンジできると思います。
上に示したストラテジーの例は、ドル円の日足における過去40年間以上でのバックテストの結果ですが、これだけの長期に渡って右上がりのエクイティカーブとともにプロフィットファクター2近くを維持するなど、かなり良い結果と言えるのではないでしょうか。
これは一つのシミュレーション結果に過ぎませんが、データを見る限りタートルの手法は現在でも機能すると言えるでしょう。
Kioseff Trading - AI-Optimized RSIAI-Optimized RSI
Introducing AI-Optimized RSI: a streamlined solution for traders of any skill level seeking to rapidly test and optimize RSI. Capable of analyzing thousands of strategies, this tool cuts through the complexity to identify the most profitable, reliable, or efficient approaches.
Paired with TradingView's native backtesting capabilities, the AI-Optimized RSI learns from historical performance data. Set up is easy for all skill levels, and it makes fine-tuning trading alerts and RSI straightforward.
Features
Purpose : Uncover optimal RSI settings and entry levels with precision. Say goodbye to random guesses and arbitrary indicator use—this tool provides clear direction based on data.
Target Performance : You set the goal, and AI-RSI seeks it out, whether it's maximizing profits, efficient trading, or achieving the highest win rate.
AI-Powered : With intelligent AI recommendations, the tool dynamically fine-tunes your RSI approach, steering you towards ideal strategy performance.
Rapid Testing : Evaluate thousands of RSI strategies.
Dual Direction : Perfect both long and short RSI strategies with equal finesse.
Deep Insights : Access detailed metrics including profit factor, PnL, win rate, trade counts, and more, all within a comprehensive strategy script.
Instant Alerts : Set alerts and trade.
Full Customization : Test and optimize all RSI settings, including cross levels, profit targets and stop losses.
Simulated Execution : Explore the impact of limit orders and other trade types through simulation.
Integrative Capability : Combine your own custom indicators or others from the TradingView community for a personalized optimization experience.
Flexible Timeframes : Set your optimization and backtesting to any date range.
Key Settings
The image above shows explanations for a list of key settings for the optimizer.
Direction : This setting controls trade direction: Long or Short.
Entry Condition : Define RSI entry: Select whether to trigger trades on RSI crossunders or crossovers.
RSI Lengths Range : Choose the range of RSI periods to test and find the best one.The AI will find the best RSI period for you.
RSI Cross Range : Set the range for RSI levels where crosses trigger trade signals. The AI will find the best level for you.
Combinations : Select how many RSI strategies to compare.
Optimization Type : Choose the goal for optimization and the AI: profit, win rate, or efficiency.
Profit Target : Set your profit target with this setting.
Stop Loss : Decide your maximum allowable loss (stop loss) per trade.
Limit Order : Specify whether to include limit orders in the strategy.
Stop Type : Choose your stop strategy: a fixed stop loss or a trailing stop.
How to: Find the best RSI for trading
It's important to remember that merely having the AI-Optimized RSI on your chart doesn't automatically provide you with the best strategy. You need to follow the AI's guidance through an iterative process to discover the optimal RSI settings and strategy.
1.Starting Your Strategy Setup
Begin by deciding your goals for each trade: your profit target and stop loss. You'll also choose how to manage your stops – whether they stay put (fixed) or move with the price (trailing), and whether you want to exit trades at a specific price (limit orders). Keep the initial settings for RSI lengths and cross ranges at their default to give the tool a broad testing field. The AI's guidance will refine these settings to pinpoint the most effective ones through a process of comprehensive testing.
The image above shows our chart prior to any optimization efforts.
Note: the settings shown above in the key settings section will be used to start our demonstration.
2. Follow AI’s suggestions
Optimization Prompt: After loading your strategy, the indicator will prompt you to change the RSI length range and RSI level range to a better performing range.
Continue changing the RSI length range and RSI level range to match the indicator's suggestions until "Best Found" is displayed!
The image above shows results after we applied the tool’s suggestions. New suggestions have appeared, and we will continue to apply them.
Continue to adjust settings as recommended by the optimizer. If no better options are found, the optimizer will suggest increasing the number of combinations. Repeat this process until the optimizer indicates that the optimal setting has been identified.
Success! With the "Best Found" notification, an optimized RSI is now active. The AI will keep refining the strategy based on ongoing performance, ensuring continuous optimization.
AI Mode
AI Mode incorporates Heuristic-Based Adaptive Learning to fine-tune trading strategies in a continuous manner. This feature consists of two main components:
Heuristic-Based Decision Making: The algorithm evaluates multiple RSI-based trading strategies using specific metrics such as Profit and Loss (PNL), Win Rate, and Most Efficient Profit. These metrics act as heuristics to assist the algorithm in identifying suitable strategies for trade execution.
Online Learning: The algorithm updates the performance evaluations of each strategy based on incoming market data. This enables the system to adapt to current market conditions.
Incorporating both heuristic-based decision-making and online learning, this feature aims to provide a framework for trading strategy optimization.
Settings
AI Mode Aggressiveness:
Description: The "AI Mode Aggressiveness" setting allows you to fine-tune the AI's trading behavior. This setting ranges from “Low” to “High”, with “High” indicating a more assertive trading approach.
Functionality: This feature filters trading strategies based on a proprietary evaluation method. A higher setting narrows down the strategies that the AI will consider, leaning towards more aggressive trading. Conversely, a lower setting allows for a more conservative approach by broadening the pool of potential strategies.
Adaptive Learning Aggressiveness:
Description: When Adaptive Learning is enabled, the "Adaptive Learning Aggressiveness" setting controls how dynamically the AI adapts to market conditions using selected performance metrics.
Functionality: This setting impacts the AI's responsiveness to shifts in strategy performance. By adjusting this setting, you can control how quickly the AI moves away from strategies that may have been historically successful but are currently underperforming, towards strategies that are showing current promise.
Optimization
Trading system optimization is immensely advantageous when executed with prudence.
Technical-oriented, mechanical trading systems work when a valid correlation is methodical to the extent that an objective, precisely-defined ruleset can consistently exploit it. If no such correlation exists, or a technical-oriented system is erroneously designed to exploit an illusory correlation (absent predictive utility), the trading system will fail.
Evaluate results practically and test parameters rigorously after discovery. Simply mining the best-performing parameters and immediately trading them is unlikely a winning strategy. Put as much effort into testing strong-performing parameters and building an accompanying system as you would any other trading strategy. Automated optimization involves curve fitting - it's the responsibility of the trader to validate a replicable sequence or correlation and the trading system that exploits it.
MACD Optimizer Pro [Kioseff Trading]Massive update! This script now includes 12 different moving averages and 30+ built-in technical indicators to enhance your trading strategy optimization! (:
This script (MACD Optimizer Pro) allows the user to optimize and test hundreds of MACD strategies, simultaneously, in under 40 seconds. Of course, theoretically, an unlimited number of trading strategies can be tested with the MACD Optimizer Pro. After the optimization period - the MACD Optimizer Pro will show the most profitable MACD strategy or, should you choose, the highest win-rate MACD strategy or the most-efficient MACD strategy!
Optimization results can be backtested and verified using the native TradingView backtester - which is included in the MACD Optimizer Pro - and made easy to use! This feature makes settings alerts a simple practice!
Features
Test hundreds of MACD strategies, simultaneously, in under 40 seconds.
Optimize long MACD strategies and short MACD strategies.
12 different built-in moving averages included to improve your MACD strategy.
30+ built-in technical indicators to improve your MACD strategy.
Runs as a strategy script - profit factor, PnL , win-rate, number of trades, max drawdown, equity curve and other pertinent statistics shown.
Alerts
Optimize any MACD setting
Profit targets, trailing stops, fixed stop losses, and a binary MACD strategy can all be tested.
Strategies can be optimized for highest win rate, highest net profit, most efficient profit.
Limit orders can be simulated.
External indicators can be used for optimization i.e. your own, custom-built indicator, an indicator from your favorite author, or almost any publicly available
TradingView indicator.
Date range for optimization and backtesting are configurable.
Explanation
The image above shows a list of configurations for the optimizer. You can
You can test hundreds of different MACD settings in under 40 seconds on any timeframe, asset, etc.
The image above shows additional settings to filter the outcome of your optimization testing. Additionally, you can test an unlimited number of profit targets and stop losses!
You can add one of several built-in TradingView indicators to filter trade entries.
The image above shows all built-in moving averages and TradingView indicators that can be incorporated into your MACD strategy.
Additionally, you can add your own, custom indicator to the optimization test, your favorite indicator by your favorite author or almost any publicly available indicator on TradingView.
The image above shows the settings section in which you can implement this feature.
The image above shows an example of the custom indicator feature! In this instance, I am using the public indicator titled "Self-Optimizing" RSI and requiring it to measure below a level prior to entry! Almost any custom indicator, your favorite indicator, etc. is compatible with this feature!
The MACD Optimizer has improved user friendliness over previous versions. The optimizer can be as simple or complex as you'd like - capable of handling both "easy" and "difficult" tasks at your discretion.
Additionally, you can configure the optimizer to prioritize MACD strategies that earn profit most efficiently!
The image above shows this feature in action.
You can also configure the optimizer to prioritize MACD strategies that achieve the highest win rate!
The image above shows this feature in action.
Instructions
The instructions below show a rudimentary approach to using the optimizer.
1. Build your strategy in the settings.
You should also disable the "Run a Backtest" feature to improve load times during optimization.
The image above shows my custom strategy settings.
Now that you've got some data on your chart - you should try "Freezing" the "Smoothing" setting for MACD . When doing this, the optimizer will test hundreds of MACD settings with a fixed "Smoothing" setting. Try using the best "Smoothing" setting you were able to find for your initial testing.
2. Take the best "Smoothing" setting and test various MACD and Signal Lengths.
The image above shows me configuring the MACD Optimizer to test different MACD line lengths and Signal line lengths with a fixed "smoothing" setting.
From the results, we can see that there are better MACD settings than what was shown in our initial test!
With this information we can execute a TradingView backtest.
3. Execute a TradingView Backtest.
You must enable the "Run a Backtest" feature to perform a TradingView backtest. Additionally, it's advised to enable the "STOP OPTIMIZATION" feature when performing a TradingView backtest. Enabling this feature will improve load times for the backtest to only a few seconds (since the optimizer won't look for the best setting when this feature is enabled).
The image above shows completion of the process!
From here, you can perform further testing, set alerts, etc.
Backtest Settings Shown
Initial Capital: The initial capital used for the shown backtests is $3,500 USD. Set the initial capital to replicate your true starting capital (: PnL for the MACD strategies (listed in table) is calculated using a starting capital of $10,000 USD.
Slippage: The slippage settings for the displayed backtest was set to 2 ticks.
Commission: Commission was adjusted to 0.1%.
Verify Price for Limit Orders was set to 2 ticks.
Optimization
Trading system optimization is immensely advantageous when executed with prudence.
Technical-oriented, mechanical trading systems work when a valid correlation is methodical to the extent that an objective, precisely-defined ruleset can consistently exploit it. If no such correlation exists, or a technical-oriented system is erroneously designed to exploit an illusory correlation (absent predictive utility), the trading system will fail.
Evaluate results practically and test parameters rigorously after discovery. Simply mining the best-performing parameters and immediately trading them is unlikely a winning strategy. Put as much effort into testing strong-performing parameters and building an accompanying system as you would any other trading strategy. Automated optimization involves curve fitting - it's the responsibility of the trader to validate a replicable sequence or correlation and the trading system that exploits it.
Thanks for checking this out!
Kioseff Trading - AI-Optimized Supertrend
AI-Optimized Supertrend
Introducing AI-Optimized Supertrend: a streamlined solution for traders of any skill level seeking to rapidly test and optimize Supertrend. Capable of analyzing thousands of strategies, this tool cuts through the complexity to identify the most profitable, reliable, or efficient approaches.
Paired with TradingView's native backtesting capabilities, the AI-Optimized Supertrend learns from historical performance data. Set up is easy for all skill levels, and it makes fine-tuning trading alerts and Supertrend straightforward.
Features
Rapid Supertrend Strategy Testing : Quickly evaluate thousands of Supertrend strategies to find the most effective ones.
AI-Assisted Optimization : Leverage AI recommendations to fine-tune strategies for superior results.
Multi-Objective Optimization : Prioritize Supertrend based on your preference for the highest win rate, maximum profit, or efficiency.
Comprehensive Analytics : The strategy script provides an array of statistics such as profit factor, PnL, win rate, trade counts, max drawdown, and an equity curve to gauge performance accurately.
Alerts Setup : Conveniently set up alerts to be notified about critical trade signals or changes in performance metrics.
Versatile Stop Strategies : Experiment with profit targets, trailing stops, and fixed stop losses.
Binary Supertrend Exploration : Test binary Supertrend strategies.
Limit Orders : Analyze the impact of limit orders on your trading strategy.
Integration with External Indicators : Enhance strategy refinement by incorporating custom or publicly available indicators from TradingView into the optimization process.
Key Settings
The image above shows explanations for a list of key settings for the optimizer.
Set the Factor Range Limits : The AI suggests optimal upper and lower limits for the Factor range, defining the sensitivity of the Supertrend to price fluctuations. A wider range tests a greater variety, while a narrower range focuses on fine-tuning.
Adjust the ATR Range : Use the AI's recommendations to establish the upper and lower bounds for the Average True Range (ATR), which influences the Supertrend's volatility threshold.
ATR Flip : This option lets you interchange the order of ATR and Factor values to quicky test different sequences, giving you the flexibility to explore various combinations and their impact on the Supertrend indicator's performance.
Strategies Evaluated : Adjust this setting to determine how many Supertrend strategies you want to assess and compare.
Enable AI Mode : Turn this feature on to allow the AI to determine and employ the optimal Supertrend strategy with the desired performance metric, such as the highest win rate or maximum profitability.
Target Metric : Adjust this to direct the AI towards optimizing for maximum profit, top win rates, or the most efficient profits.
AI Mode Aggressiveness : Set how assertively the AI pursues the chosen performance goal, such as highest profit or win rate.
Strategy Direction : Choose to focus the AI's testing and optimization on either long or short Supertrend strategies.
Stop Loss Type : Specify the stop loss approach for optimization—fixed value, a trailing stop, or Supertrend direction changes.
Limit Order : Decide if you want to execute trades using limit orders for setting your profit targets, stop losses, or apply them to both.
Profit Target : Define your desired profit level when using either a fixed stop loss or a trailing stop.
Stop Loss : Define your desired stop loss when using either a fixed stop loss or a trailing stop.
How to: Find the best Supertrend for trading
It's important to remember that merely having the AI-Optimized Supertrend on your chart doesn't automatically provide you with the best strategy. You need to follow the AI's guidance through an iterative process to discover the optimal Supertrend settings and strategy.
Optimizing Supertrend involves adjusting two key parameters: the Factor and the Average True Range (ATR). These parameters significantly influence the Supertrend indicator's sensitivity and responsiveness to price movements.
Factor : This parameter multiplies the ATR to determine the distance of the Supertrend line from the price. Higher values will create a wider band, potentially leading to fewer trade signals, while lower values create a narrower band, which may result in more signals but also more noise.
ATR (Average True Range) : ATR measures market volatility. By using the ATR, the Supertrend adapts to changing market volatility; a higher ATR value means a more volatile market, so the Supertrend adjusts accordingly.
During the optimization process, these parameters are systematically varied to determine the combination that yields the best performance based on predefined criteria such as profitability, win rate, or risk management efficiency. The optimization aims to find the optimal Factor and ATR settings.
1.Starting Your Strategy Setup
Begin by deciding your goals for each trade: your profit target and stop loss, or if all trades exit when Supertrend changes direction. You'll also choose how to manage your stops – whether they stay put (fixed) or move with the price (trailing), and whether you want to exit trades at a specific price (limit orders). Keep the initial settings for Supertrend Factor Range and Supertrend ATR Range at their default to give the tool a broad testing field. The AI's guidance will refine these settings to pinpoint the most effective ones through a process of comprehensive testing.
Demonstration Start: We'll begin with the settings outlined in the key settings section, using Supertrend's direction change to the downside as our exit signal for all trades.
2. Continue applying the AI’s suggestions
Keep updating your optimization settings based on the AI's recommendations. Proceed with this iterative optimization until the "Best Found" message is displayed, signaling that the most effective strategy has been identified.
While following the AI's suggestions, we've been prompted with a new suggestion: increase the
number of strategies evaluated. Keep following the AI's new suggestions to evaluate more strategies. Do this until the "Best Found" message shows up.
Success! We continued to follow the AI’s suggestions until “Best Found” was indicated!
AI Mode
AI Mode incorporates Heuristic-Based Adaptive Learning to fine-tune trading strategies in a continuous manner. This feature consists of two main components:
Heuristic-Based Decision Making: The algorithm evaluates multiple Supertrend-based trading strategies using metrics such as Profit and Loss (PNL), Win Rate, and Most Efficient Profit. These metrics act as heuristics to assist the algorithm in identifying suitable strategies for trade execution.
Online Learning: The algorithm updates the performance evaluations of each strategy based on incoming market data. This enables the system to adapt to current market conditions.
Incorporating both heuristic-based decision-making and online learning, this feature aims to provide a framework for trading strategy optimization.
AI Mode Settings
AI Mode Aggressiveness:
Description: The "AI Mode Aggressiveness" setting allows you to fine-tune the AI's trading behavior. This setting ranges from “Low” to “High”, with “High” indicating a more assertive trading approach.
Functionality: This feature filters trading strategies based on a proprietary evaluation method. A higher setting narrows down the strategies that the AI will consider, leaning towards more aggressive trading. Conversely, a lower setting allows for a more conservative approach by broadening the pool of potential strategies.
Optimization
Trading system optimization is immensely advantageous when executed with prudence.
Technical-oriented, mechanical trading systems work when a valid correlation is methodical to the extent that an objective, precisely-defined ruleset can consistently exploit it. If no such correlation exists, or a technical-oriented system is erroneously designed to exploit an illusory correlation (absent predictive utility), the trading system will fail.
Evaluate results practically and test parameters rigorously after discovery. Simply mining the best-performing parameters and immediately trading them is unlikely a winning strategy. Put as much effort into testing strong-performing parameters and building an accompanying system as you would any other trading strategy. Automated optimization involves curve fitting - it's the responsibility of the trader to validate a replicable sequence or correlation and the trading system that exploits it.
M0PB (Momentum Pullback)Long/short strategy that identifies extreme readings on the rsi as a *momentum signal*, unlike most RSI strategies the script will look to buy or sell the first pullback in the direction of the extreme RSI reading.
Enters positions on the first pullback to the 5ema(low)/ 5ema(high) and exits at rolling 12 bar high/ low. The rolling high/ low feature means that if the price enters into a prolonged consolidation the profit target will begin to reduce with each new bar. The best trades tend to work within 2-6 bars.
Built for use on 5 min intervals on FX, Indexes, and Crypto. Lower than 5 minute time frames tend to be noisier and mean more commissions and a higher risk of slippage so the suggested timeframe is 5 mins.
Hard stop is X ATR (users can experiment with this) from the position entry price. This can be adjusted in user inputs.
There is a lot of slack left in entries and exits but the overall strategy is fairly robust across timeframes and markets and has between 60%-70% win rate with larger winners.
Signals that occur from economic news volatility are best avoided.
VWMA/SMA 3Commas BotThis strategy utilizes two pairs of different Moving Averages, two Volume-Weighted Moving Averages (VWMA) and two Simple Moving Averages (SMA).
There is a FAST and SLOW version of each VWMA and SMA.
The concept behind this strategy is that volume is not taken into account when calculating a Simple Moving Average.
Simple Moving Averages are often used to determine the dominant direction of price movement and to help a trader look past any short-term volatility or 'noise' from price movement, and instead determine the OVERALL direction of price movement so that one can trade in that direction (trend-following) or look for opportunities to trade AGAINST that direction (fading).
By comparing the different movements of a Volume-Weighted Moving Average against a Simple Moving Average of the same length, a trader can get a better picture of what price movements are actually significant, helping to reduce false signals that might occur from only using Simple Moving Averages.
The practical applications of this strategy are identifying dominant directional trends. These can be found when the Volume Weighted Moving Average is moving in the same direction as the Simple Moving Average, and ideally, tracking above it.
This would indicate that there is sufficient volume supporting an uptrend or downtrend, and thus gives traders additional confirmation to potentially look for a trade in that direction.
One can initially look for the Fast VWMA to track above the Fast SMA as your initial sign of bullish confirmation (reversed for downtrending markets). Then, when the Fast VWMA crosses over the Slow SMA, one can determine additional trend strength. Finally, when the Slow VWMA crosses over the Slow SMA, one can determine that the trend is truly strong.
Traders can choose to look for trade entries at either of those triggers, depending on risk tolerance and risk appetite.
Furthermore, this strategy can be used to identify divergence or weakness in trending movements. This is very helpful for identifying potential areas to exit one's trade or even look for counter-trend trades (reversals).
These moments occur when the Volume-Weighted Moving Average, either fast or slow, begins to trade in the opposite direction as their Simple Moving Average counterpart.
For instance, if price has been trending upwards for awhile, and the Fast VWMA begins to trade underneath the Fast SMA, this is an indication that volume is beginning to falter. Uptrends need appropriate volume to continue moving with momentum, so when we see volume begin to falter, it can be a potential sign of an upcoming reversal in trend.
Depending on how quickly one wants to enter into a movement, one could look for crosses of the Fast VWMA under/over the Fast SMA, crosses of the Fast VWMA over/under the Slow SMA, or crosses over/under of the Slow VWMA and the Slow SMA.
This concept was originally published here on TradingView by ProfitProgrammers.
Here is a link to his original indicator script:
I have added onto this concept by:
converting the original indicator into a strategy tester for backtesting
adding the ability to conveniently test long or short strategies, or both
adding the ability to calculate dynamic position sizes
adding the ability to calculate dynamic stop losses and take profit levels using the Average True Range
adding the ability to exit trades based on overbought/oversold crosses of the Stochastic RSI
conveniently switch between different thresholds or speeds of the Moving Average crosses to test different strategies on different asset classes
easily hook this strategy up to 3Commas for automation via their DCA bot feature
Full credit to ProfitProgrammers for the original concept and idea.
Any feedback or suggestions are greatly appreciated.
[SPOILED]SteadyScalpyHi Traders,
This is my testing strategy which implemented Trading View's trailing stop loss feature. This strategy mainly focus on ETH/USDT perp contract15 minutes timeframe, backtest capital is set to 1000 USDT, 10% equity, 0.04% commission, limited backtest date from Jan 2022 to now, result as shown below. I have faith in this strategy, but still please use only a small amount of money to test, like 5-10% of your total capital.
The strategy contains a couple modules, entry module, trend filter module, take profit, and stop loss module.
How to use:
Stoch RSI:
5 MA types were provided which is HMA / VWMA / WMA / EMA / SMA , HMA with Length setting of 5, 8 seems to be most efficient. VWMA and WMA with 8, 13 will generate less entry signals but with less entry risks.
Price Step:
This is the core feature of this strategy and it is based on Demark9 and price action. With Step 1&2 enabled, it will generate more entry signals. signals can be filtered by trend magic. if disable this option, Stoch RSI will be the only entry signal left in this strategy.
Trend Magic:
Trend Magic uses CCI and ATR to calculate trend status; green means uptrend, red means downtrend, pretty straight forward; the best value for this indicator would be, 21, 34, 55, 89. Only long allow when trend magic turns green and vice versa.
Take Profit and Stop Loss:
The default value for TP is set to 0.4%. Once the price hits 0.4%, it begins trailing; once the price drawdown 0.01%, it will close trade. The orange line indicates the ATR trailing take profit; once 'close' crosses ATR, it will exit the trade immediately. I also added a failsafe as a final stop loss, when price movement exceeds threshold (default 1%), it will exit trade no matter what.
Enjoy :)
[SPOILED]SuperTrench - ETH Super ScalperHi Traders,
I'm republishing this script as I finally polished it to perfection IMO. The script uses 5 coding sections: entry, trend filter, pivot filter, take profit, and stop loss. The script mainly uses trailing as take profit; this is probably the easiest way to make a profitable scalper strategy.
Backtest capital is set to 1000 USDT, 35% equity, 0.04% commission, limited backtest date from Jan 2022 to now, backtested on ETH/USDT prep contracts 15m timeframe, result as shown below.
It looks unreal right? Hell no, I actually tested this strategy on Binance from Dec 06 to Dec 10. I got 8.29% return with 4x leverage, 50% equity setup; 75% win rate,1.58 profit factor, with 4.3% max drawdown, it is amazingly close to the backtest result.
User Manual
Entry >>> Stoch RSI:
I added 5 MA types to the Stoch RSI which is HMA/VWMA/WMA/EMA/SMA, HMA with Length setting of 5, 8 seems to be most efficient, VWMA and WMA with 8, 13 will generate less entry signals but with less entry risks.
Entry >>> R Style:
It based on price action, with candlestick makes a U turn, after 2nd candlestick confirmed, it generates entry signal, this will give you some extra entries, better leave it enabled.
Entry >>> Price Step:
This probably is the core feature of this strategy; also my secret ingredient to making this strategy this efficient. It is recommended to enable step 1-5, more steps basically means more entries, but they are not necessarily profitable.
Trend Filter >>> Price Step:
I couldn't tell you much details about how this indicator works, but it is a reliable indicator, based on price action, and I got some ideas from Demark9 indicator. The bigger the level, the stronger the filter is, please note that if 'Price Step Entries' less than Price Step Trend, entries will be ignored.
Pivot Filter >>> RSI Pivot & Pinbar Pivot:
RSI Pivot detects if the RSI signal line making U turn in certain condition, Pinbar detection combines R Style entry when price action U turn took place, these 2 pivot filter will close the trade once it is counter trend, so it better enable and leave it as is.
Trend Filter >>> Trend Magic:
Trend Magic uses CCI and ATR to calculate trend status, green means uptrend, red means downtrend, pretty straight forward, the best value for this indicator would be, 21, 34, 55, 89.
Trend Filter >>> Alpha:
This filter combines R style pivot, price step, EMA all together to detects consolidation area, because EMA was involved, so the best look back period would be around 15-35, it is best to use default value IMO, in another hands, if you need stronger filter, feel free to use 10, 18, 20, 25, 30, 35, make sure look back period should increase or decrease by 5 every time.
Take Profit and Stop Loss:
The default value for tp is set to 0.4%, but I also give you option to switch to ATR TP; you can adjust in the ATR multiplier, default ATR trailing stop loss uses 1 ATR, but you can adjust it for better drawdown tolerance. Fixed ATR SL is also given when fixed ATR is enabled. There will be a failsafe SL default set to 1% if price moves counter direction of opened position, it will close trade no matter what happens.
Enjoy :)
Time Based Crypto DayTrade StrategyThis is a time based strategy, designed to enter and exit within the same day of the week, using different hours for entry and exit.
The script is long only direction, and it has no risk management inside, so use it with caution.
At the same time you can also calculate each individual hour return within a certain day, and make your own idea about the best moments to be enter.
In order to filter a bit from the bad trades, I have applied an ATR filter, to check if that volatility is rising in order to help eliminate some of the bad trades when there is no volatility around.
For this example, on BTC, it seems that for the last years, on tuesday and thursday, enterring at the beginning of the daily candle, 01:00hours and exit at 00:00 hours, seems to give positive results giving the idea that can be converted in some sort of edge into our favor.
However dont take this entirelly for granted and conduct your own searches
I11L - Meanreverter 4h---Overview---
The system buys fear and sells greed.
Its relies on a Relative Strength Index (RSI) and moving averages (MA) to find oversold and overbought states.
It seems to work best in market conditions where the Bond market has a negative Beta to Stocks.
Backtests in a longer Timeframe will clearly show this.
---Parameter---
Frequency: Smothens the RSI curve, helps to "remember" recent highs better.
RsiFrequency: A Frequency of 40 implies a RSI over the last 40 Bars.
BuyZoneDistance: Spacing between the different zones. A wider spacing reduces the amount of signals and icnreases the holding duration. Should be finetuned with tradingcosts in mind.
AvgDownATRSum: The multiple of the Average ATR over 20 Bars * amount of opentrades for your average down. I choose the ATR over a fixed percent loss to find more signals in low volatility environments and less in high volatility environments.
---Some of my thoughts---
Be very careful about the good backtesting performance in many US-Stocks because the System had a favourable environment since 1970.
Be careful about the survivorship bias as well.
52% of stocks from the S&P500 were removed since 2000.
I discount my Annual Results by 5% because of this fact.
You will find yourself quite often with very few signals because of the high market correlation.
My testing suggests that there is no expected total performance difference between a signal from a bad and a signal from a good market condition but a higher volatility.
I am sharing this strategy because i am currently not able to implement it as i want to and i think that meanreversion is starting to be taken more serious by traders.
The challange in implementing this strategy is that you need to be invested 100% of the time to retrieve the expected annual performance and to reduce the fat tail risk by market crashes.
EURUSD COT Trend StrategyThis is a long term/investment type of strategy designed to have a good idea about where the big trend direction is headed.
Its logic, its made entirely on the COT report, mainly from looking into the net non comercial positions aka the speculators.
For bullish trend we look that the difference between long non comercial vs short non comercial is higher than 0
For bearish trend we look that the difference between long non comercial vs short non comercial is lower than 0.
This is mainly as an educational tool, for a full strategy, I recommend implement other things into it, like technical analysis or risk management.
If you have any questions, please let me know !
Wunder Trend Reversal botWunder Trend Reversal bot
1. Wunder Trend Reversal Bot - this has only one goal to find a reversal of the trend.
2. The strategy determines, based on the specified value for the filter, a market reversal based on the price actions of the previous bars.
3. A short EMA is used to filter false signals after the reversal signal was received. Crossing the EMA and changing its direction confirms the trend change.
4. There are 2 ways to calculate stop loss and take profit. You can choose one of them:
- Classic stop loss and take profit in a fixed percentage
- ATR stop loss and take pro
5. ATR uses risk reward (R:R) to calculate take profit. The script calculates the risk-reward based on a certain stop loss level and uses it to calculate the take profit
6. A function for calculating risk on the portfolio (your deposit) has been added to the script. When this option is enabled, you get a calculation of the entry amount in dollars relative to your Stop Loss. In the settings, you can select the risk percentage on your portfolio. The loss will be calculated from the amount that will be displayed on the chart.
For example. Deposit - $1000, you set the risk to 1%. SL 5%. Entry volume will be $200. The loss at SL will be $10.10$ this is your 1% risk or 1% of the deposit.
Important! The risk per trade must be less than the Stop Loss value. If the risk is greater than SL, then you should use leverage.
The amount of funds entering the trade is calculated in dollars. This option was created if you want to send the dollar amount from Tradingview to the exchange. However, putting your volume in dollars you get the incorrect net profit and drawdown indication in the backtest results, as TradingView calculates the backtest volume in contracts.
To display the correct net profit and drawdown values in Tradingview Backtest results, use the ”Volume in contracts” option.
RSI Divergence Strategywhat is "RSI Divergence Strategy"?
it is a RSI strategy based this indicator:
what it does?
it gives buy or sell signals according to RSI Divergences. it also has different variables such as "take profit", "stop loss" and trailing stop loss.
how it does it?
it uses the "RSI Divergence" indicator to give signal. For detailed information on how it works, you can visit the link above. The quantity of the inputs is proportional to the rsi values. Long trades are directly traded with "RSI" value, while short poses are traded with "100-RSI" value.
How to use it?
The default settings are for scalp strategy but can be used for any type of trading strategy. you can develop different strategies by changing the sections. It is quite simple to use.
RSI length is length of RSİ
source is source of RSİ
RSİ Divergence lenght is length of line on the RSI
The "take profit", "stop" and "trailing stop" parts used in the "buy" group only affect buys. The "sell" group is similarly independent of the variables in the "buy" group.
The "zoom" section is used to enlarge or reduce the indicator. it only changes the appearance, it does not affect the results of the strategy.
Breakeven Line DemoPlug the breakeven line code into the bottom of your strategy to get visualization of your breakeven price. Line is green when net position is long, red when net short and invisible when strategy is risk neutral. Most useful for strategies which use pyramiding (successive entries in same direction stacked upon each other) as it can be difficult to track where prices needs to return to to allow closing in profit. Disclaimer: the strategy logic is garbage do not use it. It is only there so you can see how Breakeven Line logic is implemented.
Fast EMA above Slow EMA with MACD (by Coinrule)An exponential moving average ( EMA ) is a type of moving average (MA) that places a greater weight and significance on the most recent data points. The exponential moving average is also referred to as the exponentially weighted moving average . An exponentially weighted moving average reacts more significantly to recent price changes than a simple moving average simple moving average ( SMA ), which applies an equal weight to all observations in the period.
Moving average convergence divergence ( MACD ) is a trend-following momentum indicator that shows the relationship between two moving averages of a security’s price. The MACD is calculated by subtracting the 26-period exponential moving average ( EMA ) from the 12-period EMA .
The result of that calculation is the MACD line. A nine-day EMA of the MACD called the "signal line," is then plotted on top of the MACD line, which can function as a trigger for buy and sell signals. Traders may buy the coin when the MACD crosses above its signal line and sell—or short—the security when the MACD crosses below the signal line. Moving average convergence divergence ( MACD ) indicators can be interpreted in several ways, but the more common methods are crossovers, divergences, and rapid rises/falls.
The Strategy enters and closes the trade when the following conditions are met:
LONG
The MACD histogram turns bullish
EMA8 is greater than EMA26
EXIT
Price increases 3% trailing
Price decreases 1% trailing
This strategy is back-tested from 1 January 2022 to simulate how the strategy would work in a bear market and provides good returns.
Pairs that produce very strong results include AXSUSDT on the 5-minute timeframe. This short timeframe means that this strategy opens and closes trades regularly.
Additionally, the trailing stop loss and take profit conditions can also be changed to match your needs.
The strategy assumes each order is using 30% of the available coins to make the results more realistic and to simulate you only ran this strategy on 30% of your holdings. A trading fee of 0.1% is also taken into account and is aligned to the base fee applied on Binance.
[-_-] Level Breakout, Auto Backtesting StrategyDescription:
A Long only strategy based on breakout from a certain level formed by High price. It has auto-backtesting capabilities (you set ranges for the three main parameters: Lookback, TP and SL; the strategy then goes through different combinations of those parameters and displays a table with results that you can sort by Percentage of profitable trades AND/OR Net profit AND/OR Number of trades). So you can, for example, sort only by Net profit to find combination of parameters that gives highest net profit, or sort by Net profit and Percentage profitable to find a combination of parameters that gives the best balance between profitability and profit. The auto-backtesting also takes into account the commission which is set in % in the inputs (make sure to set the same value in properties of the strategy so that auto-backtesting and real backtesting results match).
NOTE: auto-backtesting only find the best combinations and displays them in a table, you will then need to manually set the Lookback, TP and SL inputs for real backtesting to match.
Parameters:
- Lookback -> # of bars for filtering signals; recommended range from 2 to 5
- TP (%) -> take profit; recommended range from 5 to 10
- SL (%) -> stop loss; recommended range from 1 to 5
- Commission (%) -> commission per trade
- Min/Max Lookback -> lookback range for auto-backtesting
- Min/Max TP -> take profit range for auto-backtesting
- Min/Max SL -> stop loss range for auto-backtesting
- Percentage profitable -> sort by percentage of profitable trades
- Net profit -> sort by net profit
- Number of trades -> sort by number of trades