RSI Mean Reversion Bot StrategyI started developing this strategy as a way to plug in and test values before defining them in the bots on 3Commas, Coinrule, and Quadency. None of those bots performed the same way my script did and I kept working on it until the strategy finally yielded the same simulated results when paired with the Tradingview bot on Quadency. I looked at all the different RSI strategies already published and saw what each was missing and changed it in mine to make it better:
1. Backtest an actual timeframe by date and time
2. Define the RSI price source
3. Fully manipulate the RSI length
4. Define a stop loss that works
5. Pick Long or Short, or both, based on market conditions. Or compare side by side to decide which you want.
Strategy
hamster-bot RSI AlgoThis is a simple RSI based signal indicator. It is designed for algorithmic bot trading.
For best results, leave a time-frame of at least 1 hour.
When the RSI reaches 70, it gives a buy signal, and when the RSI reaches 30, it gives a sell signal. The position is then maintained until the opposite signal is given. If backtesting shows poor results, but looks like the opposite would be good, there is a simple switch in the settings to turn it over.
original indicator on the basis of which the strategy is made:
MicroStrategy Software Business Share PriceSimilar to the MicroStrategy Premium script. This indicator derives MSTR's core software business value by calculating its Bitcoin holdings as a percentage of market cap. Thus you can do, (1 - Bitcoin holdings as a % of market cap) * current share price = Core business share price
Double EMA CROSS
Double EMA CROSS (DEC)
Useful for identifying and receiving alerts about uptrends and downtrends.
This script uses two Exponential Moving Averages (EMAs) to find price uptrends and downtrends.
An Exponential Moving Average ( EMA ) is a type of moving average that places a greater weight and significance on the most recent data points.
The script produces uptrend and downtrend signals based on crossovers and divergences between the two EMAs,
the user will be able to spot a trend change (when the EMAs crossover) and to determine the strength of the current trend (when the EMAs diverge).
It is also posible to get alerts for uptrends and downtrends on the web and mobile app with sound and pop-ups as well as via email.
The optimal time to enter and exit the market can be concluded from this trend changes.
The user can set their own EMAs, by default they are set to 25 and 75 periods for medium and long term respectively.
When the medium term EMA crosses below the long term EMA the asset is in a downtrend and the price will decline, and when the
medium term EMA crosses above the long term EMA the asset is in an uptrend and price will increase.
This scripts plots the following indicators and signals on the chart to help the user to identify trends:
1.- Medium and long term EMAs as lines overlaid on the price chart.
2.- Up green triangles above bars when the price is on an uptrend and down red triangles below bars when the price is on a downtrend.
3.- Arrows with text to indicate the start of an uptrend or downtrend.
The user can enable and disable the indicators and signals as well as set colors and shapes to their liking.
This script also lets the user create alerts for uptrends and downtrends. To create a new alert using this script follow this instructions:
1.- Once you added this script to your chart, go to the alerts panel (right on web or bottom tool bar on the mobile app) and add a new alert (alarm clock icon with a plus sign).
2.- A modal window will open. On the “Condition” dropdown menu select “DEC”.
3.- On the next dropdown menu (right below the “Condition” one) you can select.
4.- Lastly you can set all the normal alert options and create the alert.
#JJ_Shares Trend Follower
-----------------
Hey there!
There are many reasons why this strategy has worked quite well over the past few years.
A very simple strategy in itself. The basis of this indicator is the trend following approach. "The trend is your friend." This strategy is based on individual separate indicators. A total of three EMA's (10.50 & 200) & the ATR are combined. The largest EMA shows the basic trend direction and thus also the preferred trade direction. The two smaller EMAs are used for the timing of the entrances at the intersection. The stop levels are placed with the help of the ATR and the large EMA. Profit areas are determined using a risk calculation.
Exact entry points can be identified using the indicator. In addition, a take profit is visualized based on a 3:1 CRV . The stop loss results from a long-term EMA .
Example for NASDAQ:GOOGL ! But can be used for all other trend following stocks!
The indicator can be used on all timeframes. However, the performance is significantly better in higher timeframes. In addition, the display can be adjusted using the options.
That's all. Due to the technical chart background, the strategy can be used without further chart analysis.
Attention: Before opening a position, always first check whether there is any strong news. In these cases it is better to be on the safe side.
Attention: With this strategy a SL is provided as standard. However, the risk must always be carefully calculated.
Past results do not guarantee future profits!
Use the link below to get access to this indicator or PM us to get access.
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
-----------------
Willkommen!
Es gibt viele Gründe, warum sich diese Strategie in den letzten Jahren ganz gut bewährt hat.
Eine sehr einfache Strategie für sich. Grundlage dieses Indikators ist der Trendfolgeansatz. "The trend is your friend." Diese Strategie basiert auf einzelnen seperaten Indikatoren. Insgesamt werden drei EMA's (10,50 & 200) & die ATR kombiniert. Der größte EMA zeigt die grundsätzliche Trendrichtung und somit auch die bevorzugte Traderichtung. Die beiden kleineren EMA werden bei Kreuzung für das Timing der Einstiege verwendet. Mit Hilfe der ATR und des großen EMA werden die Stop Level platziert. Gewinnzonen werden über eine Risikoberechnung ermittelt.
Anhand des Indikators können genaue Einstiege erkannt werden. Zusätzlich wird aufgrund eines 3:1 CRV ein Take Profit visualisiert. Der Stop Loss ergibt sich über einen langfristigen EMA .
Beispiel für NASDAQ:GOOGL ! Kann aber für alle weiteren Trendfolge Aktien verwendet werden!
Der Indikator kann auf allen Timeframes angewendet werden. Allerdings ist der Performance in höheren Timeframes deutlich besser. Zusätzlich kann die Anzeige über die Optionen angepasst werden.
Das ist alles. Aufgrund des charttechnischen Hintergrunds kann die Strategie ohne weitere Chartanalyse verwendet werden.
Achtung: Vor dem Öffnen einer Position immer zuerst prüfen ob starke News anstehen. In diesen Fällen lieber auf Nummer sicher gehen.
Achtung: Bei dieser Strategie ist standardmäßig ein SL vorgesehen. Das Risiko muss aber immer gut kalkuliert werden.
Vergangene Ergebnisse garantieren keine zukünftigen Gewinne!
Verwenden Sie den folgenden Link, um Zugriff auf diesen Indikator zu erhalten oder schreibe uns eine PM um Zugriff zu erhalten.
Volatility Stop Strategy [frostybot]This is a modified version of the Standard Volatility Script on TradingView, tweaked for the BTCUSD chart on the 1H timeframe.
I've designed this strategy to be used with Frostybot with ease.
However, this can be disabled in the settings. Then you will receive alerts without Frostybot commands.
First, open the settings section of the indicator. Then fill in the following fields:
You can play around with the TP values and see what works best for your personal risk assessment
Account Stub: enter the name of your stub on Frostybot (only needed if you enable the "Use Frostybot Alert Triggers" checkbox)
Position Size and Size Type: Here you can choose the amount on which you want to enter the trade, for example: 100$, 2x,... (only needed if you enable the "Use Frostybot Alert Triggers" checkbox)
Symbol: Enter the BTC symbol that is valid for the Frostybot Stub's Exchange. For FTX: BTC-PERP, for Binance Futures: BTC /USDT,... (only needed if you enable the "Use Frostybot Alert Triggers" checkbox)
Press OK
Then, setup an alert on the strategy:
Configure the correct Frostybot Webhook URL (don't forget to add /frostybot after the IP address) (only needed if you enable the "Use Frostybot Alert Triggers" checkbox)
Give the alert a name of choice
Put this as the message: {{strategy.order.alert_message}}
Press OK
Enjoy and happy trading!
Williams Alligator + RSI + T3CCIWilliams Alligator strategy is based on indicator developed by a legendary trader Bill Williams, an early pioneer of market psychology.
The strategy is based on a trend-following Alligator indicator, which follows the premise that financial markets and individual securities trend just 15% to 30% of the time while grinding through sideways ranges the other 70% to 85% of the time. Williams believed that individuals and institutions tend to collect most of their profits during strongly trending periods.
Although Alligator is a very strong tool it has a lot of weak signals and has lag span on entries and exits. We added RSI oscillator and T3CCI to clear market noises and weak signals. Moreover the approach we intoduced to the indicator allows to enter positions and close them earlier than orginal indicator which ensures stronger signals
The strategy supports traditional and cryptocurrency spot, futures, options and marginal trading exchanges. It works accurately with BTC, USD, USDT, ETH and BNB quote currencies. Best to use with 1D timeframe charts
The strategy can be and should be configured for each particular asset. You can change filters and risk management settings to receive the most advanced accurate alerts
Advantages of this script:
Good for long and Short positions
Produces strong long-term entries and closures of positions
Stable to short-term market fluctutions
Easy configuration with a user friendly interface
Backtests show high accuracy around 85.71%
High Net Profit percentage around 21.26%
High profit factor around 82.403
How to use?
1. Apply strategy to the trading pair your are interested in at 1D timeframe chart
2. Configure the strategy: change filters values and risk management settings until Strategy tester shows good results according to mathematical expectation
3. Set up a TradingView alert to trigger when strategy conditions are met
4. Strategy will send alerts when to enter and when to exit positions
Feel free to copy and use this script for your ideas and trading!
ATR + %R Scalping StrategyThe Average True Range is a single line indicator that measures volatility. The indicator was originally developed by J. Welles Wilder to measure the volatility of commodities within the futures market.
ATR does not measure price trends or price direction hence %R and Parabolic SAR indicators were added.
The strategy enhances standard Average True Range and %R composition with trend confirmation and filters which clear out market noises and manipulations from triggers.
The strategy supports traditional and cryptocurrency spot, futures, options and marginal trading exchanges. It works accurately with BTC, USD, USDT, ETH and BNB quote currencies. Best to use with 5 and 15 minutes timeframe charts and Limit orders.
The strategy can be and should be configured for each particular asset. You can change filters and risk management settings to receive the most advanced accurate alerts
Advantages of this script:
Strategy has high profit factor around 30.32
Backtests show high accuracy around 91.18%
High Net Profit percentage
Low Drawdowns
Weak signals are filtered
Dynamic Take profit and Stop loss
Fast deals around 50 minutes per trade
Can be applied to any market and quote currency
Easy to configure user interface
How to use?
1. Apply strategy to the trading pair your are interested in at 5m or 15m timeframe chart
2. Configure the strategy: change filters values and risk management settings until Strategy tester shows good results according to mathematical expectation
3. Set up a TradingView alert to trigger when strategy conditions are met
4. Strategy will send alerts when to enter and when to exit positions
Triple EMA StrategyThis is my first ever script so any suggestions, recommendations or improvement ideas welcome!
This strategy is an implementation of a standard three exponential moving averages strategy (defaults: EMA1=5, EMA2=20 and EMA3=50 candles). Trades are executed if EMA1 crosses above/below EMA2 and they are both above/below EMA3. In addition, the close of the current candle must be above/below the previous one by at least the number of ticks you specify in the "buffer" parameter (default 150 ticks). This additional check eliminates many bad trades.
There is also a trailing stoploss which comes into play once the price has gone above/below its initial value which it then follows the price with to ensure the trade closes at the highest possible price.
I find this strategy works best on a 15 minute chart but feel free to play around and fine tune the various parameters. If you find a good setup that returns decent profits, I'd be keen to hear it!
Moving Regression Band Breakout strategyFollowing the introduction of the Moving Regression Prediction Bands indicator (see link below), I'd like to propose how to utilize it in a simple band breakout strategy :
Go long after the candle closes above the upper band . The lower band (alternatively, the lower band minus the 14-period ATR or the central line ) will serve as a support line .
Exit as soon as the candle closes below the support line .
To manage the risk of false breakouts, a fixed stop loss is set to the value of the support line at the time of opening a position. When the support line moves above the position opening price, shift the stop loss to breakeven.
The same logic but in reverse applies to short positions.
As an option, it is possible to allow long entries only when the slope of the Moving Regression curve is positive (and short entries when the slope is negative).
Model parameters:
Length and Polynomial Order define the lag and smoothness of the model.
Multiplier specifies the width of the channel.
As the default model parameter values, I set those that I found to provide optimal risk / reward ratio on the daily timeframe (for both trending and range-bound market). However, the settings are very flexible and can be well-adjusted to particular market conditions. Feel free to play around and leave feedback in the comments!
Here's the original Moving Regression Prediction Bands script:
Example of Simple RSI Buy/Sell at a level and hold for 10 daysScript implements strategy:
1 Buy at RSI (10) < 30
2 Sell at RSI (10) > 40 or after 10 days
The strategy is not profitable for long term trading.
Galileo GalileiGalileo Galilei
Is the simplest of them all and easy to understand:
It has an Exponential Moving Average that you can modify to suit your pair on the chart with it's timeframe, looking at the strategy tester to compare results;
The prices for the EMA are taken from the OPEN of every candle (depending on your timeframe);
If the current candle's price closes above the Average and the new candle opens above the average, it will trigger a buying signal because of the bullish setup;
If the current candle's price closes below the Average and the new candle opens below the average, it will trigger a selling signal because of the bearish setup;
No strategy works on all charts and on all timeframes so you have to feel free to modify the parameters to suit your trading setup;
It is possible that the strategy won't give you any good results at all on some trading pairs and timeframes so be careful because it can lose money;
This strategy is called Galileo Galilei, it's free for you all to use and it was developed to be as simple as it can be and to work in bullish or bearish scenarios, but not in flat movements.
You can message me to ask questions, I respond to every message.
Green pips!
Equal-Length EMA/SMA Crossover Momentum StrategyOverview:
This momentum and trend-following strategy captures the majority of any trending move, and works well on high timeframes.
It uses an equal-period EMA and SMA crossover to detect trend acceleration/deceleration, since an EMA places a greater weight and significance on the most recent data.
This version is optimized for longs, and designed to cut your losses quickly and let your winners run.
To reduce noise and optimize entries, we combined this with an overall trend bias for further confluence.
How it works:
Signals are determined by the crossover of an EMA and SMA of the same length, e.g. EMA-50 and SMA-50.
The overall trend bias is determined using a slower SMA golden/death cross, e.g. SMA-50 and SMA-100.
The signal is stronger when it occurs in confluence with the overall trend bias, e.g. when EMA-50 crosses over SMA-50, while above the SMA-100. This is analogous to only opening long positions in a bull market.
Signal description:
Trend Buy: EMA crosses above SMA, and overall trend bias is bullish. Buying is in confluence with the overall trend bias.
Risky Buy: EMA crosses above SMA, and overall trend bias is bearish. Buying is early, more risky, and not in confluence with the overall trend bias.
Late Buy: SMA crosses above BIAS_SLOW. This gives further confirmation of bullish trend, but signal comes later.
Sell: EMA crosses under SMA.
Strategy entry and exit conditions:
This version enters a Long when "TREND BUY" is signalled.
This version has Sell/Shorts disabled because UP ONLY.
Long entry: Strategy enters Long when EMA is above SMA, while overall trend bias is bullish.
Long exit: Close long when EMA crosses under SMA.
Buy and Hold entry finder StrategyHello everyone!
I proudly present the backtest Strategy Script for my "Buy and Hold entry finder" Script.
It basically shows you the outcome, if you would use my indicator in the past.
The buy signals are limited to 1 order per month.
Order Size: Allows you to choose, how much money you want to invest per month. (Please consider, it will only invest an x amount per Order, but it will not stack the amount you did not invest in an previous month ) (Example in my indicator)
Pyramiding: Just regulates, how often you can open an position.
Commission: Here you can set how much it will cost to open an position at your broker.
I coded a feature that allows you to set a Start Date and an End Date for your backtest. In the end of the backtest the script closes all positions.
If you got any question, feel free to ask in the comments or send me a message.
Sincerely, RS Titan.
MRM [VK] V4.0 strategyMRM VK strategy
This strategy uses MA, RSI , MACD combined.
MACD and RSI can be used multi time frame to filter trend.
It is a very simple strategy which goes long/short when MACD , RSI and MA Trend Changes in higher Time Frame.
Ultimate Strategy TemplateHello Traders
As most of you know, I'm a member of the PineCoders community and I sometimes take freelance pine coding jobs for TradingView users.
Off the top of my head, users often want to:
- convert an indicator into a strategy, so as to get the backtesting statistics from TradingView
- add alerts to their indicator/strategy
- develop a generic strategy template which can be plugged into (almost) any indicator
My gift for the community today is my Ultimate Strategy Template
Step 1: Create your connector
Adapt your indicator with only 2 lines of code and then connect it to this strategy template.
For doing so:
1) Find in your indicator where are the conditions printing the long/buy and short/sell signals.
2) Create an additional plot as below
I'm giving an example with a Two moving averages cross.
Please replicate the same methodology for your indicator wether it's a MACD, ZigZag, Pivots, higher-highs, lower-lows or whatever indicator with clear buy and sell conditions
//@version=4
study(title='Moving Average Cross', shorttitle='Moving Average Cross', overlay=true, precision=6, max_labels_count=500, max_lines_count=500)
type_ma1 = input(title="MA1 type", defval="SMA", options= )
length_ma1 = input(10, title = " MA1 length", type=input.integer)
type_ma2 = input(title="MA2 type", defval="SMA", options= )
length_ma2 = input(100, title = " MA2 length", type=input.integer)
// MA
f_ma(smoothing, src, length) =>
iff(smoothing == "RMA", rma(src, length),
iff(smoothing == "SMA", sma(src, length),
iff(smoothing == "EMA", ema(src, length), src)))
MA1 = f_ma(type_ma1, close, length_ma1)
MA2 = f_ma(type_ma2, close, length_ma2)
// buy and sell conditions
buy = crossover(MA1, MA2)
sell = crossunder(MA1, MA2)
plot(MA1, color=color_ma1, title="Plot MA1", linewidth=3)
plot(MA2, color=color_ma2, title="Plot MA2", linewidth=3)
plotshape(buy, title='LONG SIGNAL', style=shape.circle, location=location.belowbar, color=color_ma1, size=size.normal)
plotshape(sell, title='SHORT SIGNAL', style=shape.circle, location=location.abovebar, color=color_ma2, size=size.normal)
/////////////////////////// SIGNAL FOR STRATEGY /////////////////////////
Signal = buy ? 1 : sell ? -1 : 0
plot(Signal, title="🔌Connector🔌", transp=100)
Basically, I identified my buy, sell conditions in the code and added this at the bottom of my indicator code
Signal = buy ? 1 : sell ? -1 : 0
plot(Signal, title="🔌Connector🔌", transp=100)
Important Notes
🔥 The Strategy Template expects the value to be exactly 1 for the bullish signal , and -1 for the bearish signal
Now you can connect your indicator to the Strategy Template using the method below or that one
Step 2: Connect the connector
1) Add your updated indicator to a TradingView chart
2) Add the Strategy Template as well to the SAME chart
3) Open the Strategy Template settings and in the Data Source field select your 🔌Connector🔌 (which comes from your indicator)
From then, you should start seeing the signals and plenty of other stuff on your chart
🔥 Note that whenever you'll update your indicator values, the strategy statistics and visual on your chart will update in real-time
Settings
- Color Candles : Color the candles based on the trade state (bullish, bearish, neutral)
- Close positions at market at the end of each session : useful for everything but cryptocurrencies
- Session time ranges : Take the signals from a starting time to an ending time
- Close Direction : Choose to close only the longs, shorts, or both
- Date Filter : Take the signals from a starting date to an ending date
- Set the maximum losing streak length with an input
- Set the maximum winning streak length with an input
- Set the maximum consecutive days with a loss
- Set the maximum drawdown (in % of strategy equity)
- Set the maximum intraday loss in percentage
- Limit the number of trades per day
- Limit the number of trades per week
- Stop-loss: None or Percentage or Trailing Stop Percentage or ATR
- Take-Profit: None or Percentage or ATR
- Risk-Reward based on ATR multiple for the Stop-Loss and Take-Profit
This script is open-source so feel free to use it, and optimize it as you want
Alerts
Maybe you didn't know it but alerts are available on strategy scripts.
I added them in this template - that's cool because:
- if you don't know how to code, now you can connect your indicator and get alerts
- you have now a cool template showing you how to create alerts for strategy scripts
Source: www.tradingview.com
I hope you'll like it, use it, optimize it and most importantly....make some optimizations to your indicators thanks to this Strategy template
Special Thanks
Special thanks to @JosKodify as I borrowed a few risk management snippets from his website: kodify.net
Additional features
I thought of plenty of extra filters that I'll add later on this week on this strategy template
Best
Dave
MACD 50x Leveraged Strategy Real Equity Simulation Hello, I wrote this script to merge the two scripts I shared before.
The aim here is to see the real value of the state of the capital as a result of leveraged transactions and to combine both long and short directions.
Scripts :
MACD Long 50x Leverage Strategy :
MACD Short 50x Leverage Strategy :
The parameters have not changed so they are the same as the previous two scripts:
Adding margin: Forbidden or not specified. (Add Margin : No)
Position Size : %1 (0.01) (For each trade)
Stop-Loss : %2 (For each trade)
Long : Crossover(delta,0) (Standard MACD)
Long Exit : Long Stop Level or Short Entry
(In the case of Long Stop, all trades are closed and no positions are opened in short direction.)
Short : Crossunder(delta,0) (Standard MACD)
Short Exit : Short Stop or Long Entry
(In the case of Short Stop, all trades are closed and no positions are opened in the long direction.)
NOTE :
This is a simulation made using standard parameters, showing the state of the balance in very simple rules with leveraged transactions only.
The nice thing here is the direct observation of the results by making modifications on the strategy parameters.
Regards.
MACD Strategy (SL/TP Levels and Risk Management)Strategy based on MACD and EMA.
- Risk/Reward Ratio can be adjusted
- SL level can be slightly adjusted (Takes the last low/high as SL)
- Visual representation of SL and TP levels
- Risk management => 1 % max loss on a trade
Super Momentum StrategyThis is a strategy utilizing multiple of Evergets RMI (thanks to him for permission to publish) and a Chance Momentum.
It buys when 4 of the RMIs are below their thresholds and sells when they are above. There is a 5th one I added last night that works in Reverse - buy when its above and sell when below, which should work better for pyramiding strats by using it at the right rate to set the overall trend.
Very basic sample below, I could have set it up better as my example but just want to publish.
[DS]Entry_Exit_TRADE.V01-StrategyThe proposal of this script is to show the possible trading points of BUY and SELL based on the 15-minute chart of the Nasdaq Future Index. The start point of the strategy was schedule for 2021/01/01 and until the time of this publication (2021/01/31), for 1 index contract the results presented area a Gross Profit of 2.97% with a Net Profit of 1.35%.
█ FEATURES
The indicator shows on the graph the position of the MACD and TSI indicators that are the places of strength among Buyers and Sellers.
It's possible to observe a sharp fall or rise in the price of these positions.
On the current candle, a label is displayed containing the value of the William %R Mod indicator, which will display the OverBought position (dark red) and OverSold position (dark green). The other colors like light red and green are the regions where the price makes the decision of which direction to go.
There are also other indicators:
a) The positions of the BUY (light green) and SELL areas (light red);
b) The label with the position of BUY (dark green) and SELL (dark red) with the line that connects these points;
c) DEMA 72 (orange);
d) EmaOchl4 in the color green for BULL and red for BEAR market;
e) Pivots high and low
f) Maximum (purple light) and minimum areas (blue light)
█ FUNCTIONS AND SETTINGS
The indicator uses the following functions:
(1) DEMA - Double Exponential Moving Average (08,17,34, 72)
(2) ema () - Exponential Moving Averge (72, ohlc4)
(3) plot()
(4) barcolor()
(5) cross()
(6) pivots ()
(7) William R% Md (OverBought = -7, OverSold=-93)
(8) Maximum and Minimum Value
(9) fill()
(10) macd () - Moving Average Convergence Divergence (Fast Lengt=12, Slow Length=26, Source=close, Signal Smoothing=9)
(11) tsi() - Trading Strenght Indicator==> Índice de Força Real ( IFR ) (Long Length=72, Short Length=17, Signal Length=17)
(12) Buy and Sell TRADE Points
█ PERFORMANCE AND ERRORS
The positions of BUY and SELL points are defined through the crossing of the Dema 34 candles with the Ema Ohcl4. As it is an indicator, it can present different positions from de market direction. Thus there is a need to observe the direction of the market in order to verify whether the indicate decision is really acceptable. The decision to BUY or SELL an asset must be well studied to avoid financial losses. The indicator will only help you in this decision, is your responsibility the decision of entering or leaving an asset.
█ THANKS TO
PineCoders for all they do, all the tools and help they provide, and their involvement in making a better community. All the PineCoders, Pine Pros, and Pine Wizards, people who share their work and knowledge for the sake of it and helping others, I'm very happy and grate full indeed.
█ NOTE
If you have any suggestions for improving the script or need help using it, please send a message in the comments
Self-Optimising MACD (Experimental)Hi guys, just thought I'd share a small part of an idea i've been working on.
One of the biggest problems with algo trading is optimisation and finding a way to constantly adapt to the market conditions as time unfolds.
First of all... You should NEVER EVER trade just using a MACD, including this study, and I only produced this script in a small amount of time, so make sure you backtest it properly before using it. When backtesting, it is my advice that your sample size should be at least 5000 trades, but I recommend 10000 in order to get sufficient statistical significance.
Also, I am not a financial advisor, and any trading based decisions are your sole responsibility.
Anyways...
This script is simple... it simply uses 4 different MACD's and tracks their profit/loss and automatically uses the one with the most historical profit at any given time to execute a trade. The type of MACD will obviously change as market states fluctuate.
Included are : Hull MACD, Ema MACD, Sma MACD and VWMA Macd.
You can adjust all four of their settings to your desire.
The trade execution is simple and definitely flawed... it simply tracks the MACD when it has a crossover for long, and then the opposite for short.
The green line represents the performance of the top MACD for Longs at any given time. This line refreshes once a year, and where it is in relation to price, reflects how profitable it has been I.e - the higher it is the better.
The Red line represents the performance on the Short side, and again, it reflects profit/loss, but this time the LOWER the line is in relation to price the better.
There is no exit strategy in place! This is why I do NOT recommend trading off this script alone, but to use it as a tool to help optimise your choice of MACD.
However, your exit strategy could change your optimal choice of MACD, so keep that in mind.
The lookback period represents how far the script will track the performance at any given time. This will change your results. The longer the period, the more it will show long term success and vice versa.
This optimisation process could be done with different indicators, moving averages, or even multiple strategies to find the most statistically viable option at any given time... if you wish to have this process coded into your strategies or indicators, message me.
Enjoy.
trendOne [Strategy]BITSTAMP:BTCUSD
trendOne
(strategy-tester)
It is not recommended to use this script for generating alerts. Use "trendOne Alerts" instead.
This script combines all our previous trend-based scripts (Bows, Autopilot, Trend Indicator, Price Deviation, etc) in only one script .
To calculate the trend we use:
Volume Weight
Average True Range
Bows calculations
Trends smoothed with alma() function.
For more accuracy on the signals and to filter unwanted signals we layered slower time-frames in the background and added breaking support & resistance rules.
Inputs
Sensitivity
Integer input. Sets the sensitivity for signals generated up and down. Higher values will generate less signals on chart, and vice-versa.
Enjoy!
Disclaimer:
Back-tests do not guarantee performance on the future. Even if a trading setup is profitable in historical data, it could be unprofitable in the future.
To get access to this and other scripts check links below.