LuxAlgo - Backtester (S&O)The S&O Backtester is an innovative strategy script that encompasses features + optimization methods from our Signals & Overlays™ toolkit and combines them into one easy-to-use script for backtesting the most detailed trading strategies possible.
Our Signals & Overlays™ toolkit is notorious for its signal optimization methods such as the 'Optimal Sensitivity' displayed in its dashboard which provides optimization backtesting of the Sensitivity parameter for the Confirmation & Contrarian Signals.
This strategy script allows even more detailed & precise backtests than anything available previously in the Signals & Overlays™ toolkit; including External Source inputs allowing users to use any indicator including our other paid toolkits for take profit & stop loss customization to develop strategies, along with 10+ pre-built filters directly Signals & Overlays™' features.
🔶 Features
Full Sensitivity optimization within the dashboard to find the Best Win rates or Best Profits.
Counter Trade Mode to reverse signals in undesirable market conditions (may introduce higher drawdowns)
Built-in filters for Confirmation Signals w/ Indicator Overlays from Signals & Overlays™.
Built-in Confirmation exit points are available within the settings & on by default.
External Source Input to filter signals or set custom Take Profits & Stop Losses.
Optimization Matrix dashboard option showing all possible permutations of Sensitivity.
Option to Maximize for Winrate or Best Profit.
🔶 Settings
Sensitivity signal optimizations for the Confirmation Signals algorithm
Buy & Sell conditions filters with Indicator Overlays & External Source
Take Profit exit signals option
External Source for Take Profit & Stop Loss
Sensitivity ranges
Backtest window default at 2,000 bars
External source
Dashboard locations
🔶 Usage
Backtests are not necessarily indicative of future results, although a trader may want to use a strategy script to have a deeper understanding of how their strategy responds to varying market conditions, or to use as a tool for identifying possible flaws in a strategy that could potentially be indicative of good or bad performance in the future.
A strategy script can also be useful in terms of it's ability to generate more complete & configurable alerts, giving users the option to integrate with external processes.
In the chart below we are using default settings and built-in optimization parameters to generate the highest win rate.
Results like the above will vary & finding a strategy with a high win rate does not necessarily mean it will persist into the future, however, some indications of a well-optimized strategy are:
A high number of closed trades (100+) with a consistently green equity curve
An equity curve that outperforms buy & hold
A low % max drawdown compared to the Net Profit %.
Profit factor around 1.5 or above
In the chart below we are using the Trend Catcher feature from Signals & Overlays™ as a filter for standard Confirmation Signals + exits on a higher timeframe.
By filtering bullish signals only when the Trend Catcher is bullish, as well as bearish signals for when the Trend Catcher is bearish, we have a highly profitable strategy created directly from our flagship features.
While the Signals & Overlays features being used as built-in filters can generate interesting backtests, the provided External Sources can allow for even more creativity when creating strategies. This feature allows you to use many indicators from TradingView as filters or to trigger take-profit/stop-loss events, even if they aren't from LuxAlgo.
The chart below shows the HyperWave Oscillator from our Oscillator Matrix™ being used for take-profit exit conditions, exiting a long position on a profit when crossing 80, and exiting a short position when crossing 20.
🔶 Counter Trade Mode
Our thesis has always firmly remained to use Confirmation Signals within Signals & Overlays™ as a supportive tool to find trends & use as extra confirmation within strategies.
We included the counter-trade mode as a logical way to use the Confirmation signals as direct entries for longs & shorts within more contrarian trading strategies. Many traders can relate to using a trend-following indicator and having the market not respect its conditions for entries.
This mode directly benefits a trader who is aware that market conditions are generally not-so-perfect trends all the time. Acknowledging this, allows the user to use this to their advantage by introducing countertrend following conditions as direct entries, which tend to perform very well in ranging markets.
The big downfall of using counter-trade mode is the potential for very large max-drawdowns during trending market conditions. We suggest for making a strategy to consider introducing stop-loss conditions that can efficiently minimize max-drawdowns during the process of backtesting your creations.
Sensitivity Optimization
Within the Signals & Overlays™ toolkit, we allow users to adjust the Confirmation Signals with a Sensitivity parameter.
We believe the Sensitivity paramter is the most realistic way to generate the most actionable Confirmation Signals that can navigate various market conditions, and the Confirmation Signals algorithm was designed specifically with this in mind.
This script takes this parameter and backtests it internally to generate the most profitable value to display on the dashboard located in the top right of the chart, as well as an optimization table if users enable it to visualize it's backtesting.
In the image below, we can see the optimization table showing permutations of settings within the user-selected Sensitivity range.
The suggested best setting is given at the current time for the backtesting window that's customizable within the indicator. Optimized settings for technical indicators are not indicative of future results and the best settings are highly likely / guaranteed to change over time.
Optimizing signal settings has become a popular activity amongst technical analysts, however, the real-time beneficial applications of optimizing settings are limited & best described as complicated (even with forward testing).
🔶 Strategy Properties (Important)
We strongly recommend all users to ensure they adjust the Properties within the script settings to be in line with their accounts & trading platforms of choice to ensure results from strategies built are realistic.
🔶 How to access
You can see the Author's Instructions below to learn how to get access on our website.
Indicatori e strategie
Grid Trading V.3Grid DCA Trading System (Spot) This strategy does not use indicators.
The Buy Point is the price that has come down from the previous Entry or CloseLong 1.3%(as configured) and the Point of Sale is the desired %.
This strategy will have a lot of stuck in the mountain so it is very capital intensive or should be used during the sideway market.
In this system can call Alert : {{strategy.order.alert_message}}
buy message
{"side":"buy","amount":"@0.052","joint_limit":"sell","price_limit":"270.6","symbol":"BNBUSDT","price":"0", "strategy":"Grid Trading V.3", "passphrase": "xxxxxxx"}
- joint_limit for set to sell at the time of purchase (trad Spot)
- price_limit for the sale price already calculated by the system.
sell message
{"side":"sell","amount":"@0.052","joint_limit":"sell","price_limit":"270.6","symbol":"BNBUSDT","price":"0", "strategy":"Grid Trading V.3", "passphrase": "xxxxxxx"}
This message is for bots that are already designed.
----------------------------------------------------------------------------------------------------------------------
ระบบเทรด Grid DCA (Spot) กลยุทธ์นี้ไม่ได้ใช้ indicators
จุดซื้อคือราคาที่ลงมาจาก Entry หรือ CloseLong ก่อนหน้า 1.3% (ตามที่กำหนดค่า) และจุดขายคือ % ที่ต้องการ
กลยุทธ์นี้จะมีไม้ดอยจำนวนมาก จึงใช้ทุนมาก หรือ ควรใช้ช่วงตลาด sideway
ในระบบนี้สามารถเรียกใช้ Alert : {{strategy.order.alert_message}}
message ซื้อ
{"side":"buy","amount":"@0.052","joint_limit":"sell","price_limit":"269.438","symbol":"BNBUSDT","price":"268.9","strategy":"Grid Trading V.3", "passphrase": "xxxxxxx"}
- joint_limit สำหรับ ตั้งขายตอนซื้อ (trad Spot)
- price_limit สำหรับ ราคาขายที่ระบบคำนวนให้แล้ว
message ขาย
{"side":"sell","amount":"@0.052","joint_limit":"sell","symbol":"BNBUSDT","price":"268.6","strategy":"Grid Trading V.3", "passphrase": "xxxxxxx"}
message นี้ผมใช้กับบอทที่มีการออกแบบใว้แล้ว
enjoy.
CM_SlingShotSystem+_CassicEMA+Willams21EMA13 htc1977 editionThis strategy is a combination of 2 indicators based on EMA(actually x3 EMAs and Williams ind.
We usin this to see where EMA fast is above EMA slow(for long), entry position when price hit fast EMA and exit if trend changes or price overbought, or by stoploss 1%.
The opposite for a short position.
For better result You can change every EMA's, stoploss, Willam's ind and other visualisation in settings.
If You find good combination - please, let me know(if You want).
I will check it with ML, and attach it here.
Original indicators will write in comments
Crypto Tipster v2---------------------
Crypto Tipster v2
Hello again! We're back with a drastically improved Crypto Tipster v2 Indicator using over a dozen all new algorithms based around Technical Analysis, Price Action, Momentum Swings and Reversal Detection.
We've taken our time with version 2 of Crypto Tipster, putting all our best practices to work and ensuring it performs superbly across numerous crypto markets and timeframes - we have focused our efforts towards the larger timeframes, 12H, 1D, 2D for example as we believe these to be the most consistent and predictable, and therefore the most profitable.
Trading on longer timeframes also reduces the overal cost of trading fee's as you'll be placing fewer trades over any given time period, whilst catching bigger swings and therefore earning a higher percentage per winning trade. Due to these bigger price swings you can de-leverage your trades too, making them inherintly safer and more controlled.
The final benefit to placing trades on longer timeframes is that you will not be tied down to your PC or laptop for hours on end waiting for a perfect entry or exit point, which increases the odds of placing bad/panic trades or even placing trades due to boredom! If you trade with Crypto Tipster v2 on a 1D timeframe, you will only ever have work to do once per day, at bar close; this is when trades are placed or exited, or stop losses/take profits are updated to new levels - easy!
Crypto Tipster v2 can help consistently catch tops and bottoms of trending markets whilst avoiding placing trades through choppy or ranging areas, this helps to not only maximise profits (what we're all after!) but also to minimise losses (equally important). We've tirelessly tested Crypto Tipster using literally thousands of variables across dozens of built-in algorithms over hundreds of trading pairs - lots of data to process!
The outcome is rather stunning and well worth checking out - we're rather proud of what we've achieved here, and we're pretty sure you're going to love it too!
---------------------
What's Included
- Chart Settings
The first section you'll come across, Chart Settings.
Here you'll find a few options regarding how your chosen market chart will look within TradingView and how Crypto Tipster will interact with this chart.
One of the most important Tick boxes is first on the list - "Show Backtest Results". This will change Crypto Tipster from displaying simple but easy-to-follow "Buy/Sell" labels into Strategy mode in which you can set up more complicated Stop Loss / Take profit settings as well as setting up Alerts for auto trading and other more complex functions (see How It Works for more info!
We've also included a "Trend Strength Bar Color" tick box which changes the color of the chart bars based on how strong Crypto Tipster is perceiving the current trend and in which direction.
- Trend Settings
"Trading Frequency" represents how often Crypto Tipster will be looking for a new trend / change in trend direction, and therefore how often it will be placing trades. By default this is set to "Normal" but can be changed to "Rapid" using the drop down menu.
"Entry Trend Strength" also determines how frequently trades are placed by selecting the strength of trend required before a trade is placed. The scale ranges from "1-5", with 1 being a low trend strength required, 5 being a very strong trend strength required.
Within the Trend Settings section you'll also find an "Avg Trend Strength over Bars" option. This allows you to average (mean) the current trend strength over a pre-determined amount (1-5) of previous chart bars - thus providing a potentially more consistent signal.
- Trade Settings
Trade Settings help Crypto Tipster determine what type of trades you're looking to place.
The overall "Trade Direction" will decide to either target only Long trades, only Short trades, or Both (default).
"Consecutive Trades in Same Direction" allows for pyramiding - whereby you can specify to allow for multiple trades of the same direction. Set to "1" as default allows for no extra pyramiding, max setting of "10".
- Trade Protection
Currently consisting of two functions, our Trade Protection section can help to achieve both the removal of false signals (whipsaws), and the extension of good trades without confusion during minor retracements.
"Chop Removal" can help to remove some whipsaw trades during ranging market conditions, therefore improving overal profitability by only targeting stronger trends. You have an option to choose from either "Weak" or "Strong" Chop Removal.
"Protection Filter" uses current trading criteria as defined by you, and uses it to check against a higher time frame than you're currently viewing. This can help to eliminate some bad trades at the expense of a potential lag on good trades.
- Stop Loss / Take Profit
Stop Losses should be a crucial aspect of everyone's trading system. They help prevent any trade from going too far in the wrong direction and limit losses.
Our "Stop Loss (%)" is quick and easy to set up, simply set the percentage offset from the entry price of trades and a fixed Stop Loss will be in place on all trades.
"Take Profit (%)" works in the same way as the Stop Loss mentioned above - simply set the percentage you'd like to exit a profitable trade at.
The "Trailing Stop (%)" is a little more complicated in that it will follow the trend of the trade a certain percentage away from the current market price - this is great for keeping yourself in a trade for as long as the trade is moving in the right direction.
- Extra Tools & Indicators
This is the section of Crypto Tipster that enables you to add some chart visuals to assist you with your preferred trading style.
"Potential Pivot Points" are not the same as actual pivot points - Potential pivot points will paint on the chart at bar close, giving you an immediate alert to potential tops/bottoms of market trends. You can choose to display only the strongest potential points, or include some of the weaker signals too.
"Actual Pivot Points" are inherintly more accurate than Potential pivot points, but do not paint on the chart until after a pre-determined amount of time has passed. These are great for placing stop losses/take profits or watching the market for breakouts or reversals.
"Support/Resistance Levels" plots up to 6 support and resistance horizontal lines based on recent price tops/bottoms. Use these to determine areas where price could rebound or break-through.
"Bollinger Band Breakout" - Bollinger bands are a tried and tested technical analysis tool, similar to pivot points and support/resistance lines, thee are another great tool to determine where price may retrace, consolidate or breakout.
- Ichimoku Cloud
Somewhat confusing and intimidating when you first come across this technical analysis indicator, the "Ichimoku Cloud" is one of our favorites. Assisting with the detection of Dynamic Support and Resistance levels, Momentum and Trend Direction all in one super indicator.
Although certain aspects of the Ichimoku Cloud are already present within Crypto Tipster v2 algorithms in order to offer you the best possible signals, we've also included a user-definable section of it's own so you can manually set up and use the cloud for your own trading needs, all cloud signals (and there are many) are available to set up as Alerts for your own needs or an Auto-Trading Bot.
- Custom Alerts for Any Signal
We've endeavoured to ensure that all signals, not just the Buy/Sell signals, are ready and available to create Alerts with; giving you the most opportunity to create a fully custom trading engine that suits your exact trading requirements.
This means you can set Alerts for any and all signals you can see on the chart when using Crypto Tipster v2, this includes Buy/Sell Signals, Trend Strength Signals, Choppy Market Signals, Stop Loss/Take Profit Signals, Pivot Points, S/R levels crossed above & below, Bollinger Band Breakout and several Ichimoku Cloud Signals.. the list goes on!
---------------------
We've tried to make Crypto Tipster as comprehensive and easy to understand as possible, we are however always in search of progression; we do really love to hear your feedback :)
For more information and a free 8-day trial please visit the link in our signature
Happy Trading Guys
Normalized CCI Divergence StrategyStrategy Overview:
This script takes the Commodity Channel Index and normalizes the equation to be read easier by the user. Bullish, Bearish, Hidden Bullish, and Hidden Bearish divergences are identified and displayed in the underlay. Hidden Bullish and Hidden Bearish are turned off by default, but can be turned on in the user settings. The strategy itself signals long or short based on the appearance of these divergences in addition to previous CCI values being above or below a threshold. *Shorter timeframes such as 5M are recommended.* 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.
iMoku (Ichimoku Complete Tool) - The Quant Science iMoku™ is a professional all-in-one solution for the famous Ichimoku Kinko Hyo indicator.
The algorithm includes:
1. Backtesting spot
2. Visual tool
3. Auto-trading functions
With iMoku you can test four different strategies.
Strategy 1: Cross Tenkan Sen - Kijun Sen
A long position is opened with 100% of the invested capital ($1000) when "Tenkan Sen" crossover "Kijun Sen".
Closing the long position on the opposite condition.
There are 3 different strength signals for this strategy: weak, normal, strong.
Weak : the signal is weak when the condition is true and the price is above the 'Kumo'
Normal : the signal is normal when the condition is true and the price is within the 'Kumo'
Strong : the signal is strong when the condition is true and the price is below the 'Kumo'
Strategy 2: Cross Price - Kijun Sen
A long position is opened with 100% of the invested capital ($1000) when the price crossover the 'Kijun Sen'.
Closing the long position on the opposite condition.
There are 3 different strength signals for this strategy: weak, normal, strong.
Weak : the signal is weak when the condition is true and the price is above the 'Kumo'
Normal : the signal is normal when the condition is true and the price is inside the 'Kumo'
Strong : the signal is strong when the condition is true and the price is below the 'Kumo'
Strategy 3: Kumo Breakout
A long position is opened with 100% of the invested capital ($1000) when the price breakup the 'Kumo'.
Closing the long position with a percentage stop loss and take profit on the invested capital.
Strategy 4: Kumo Twist
A long position is opened with 100% of the invested capital ($1000) when the 'Kumo' goes from negative to positive (called "Twist").
Closing the long position on the opposite condition.
There are 2 different strength signals for this strategy: weak, and strong.
Weak : the signal is weak when the condition is true and the price is above the 'Kumo'
Strong : the signal is strong when the condition is true and the price is below the 'Kumo'
This script is compliant with algorithmic trading.
You can use this script with trading terminals such as 3Commas or CryptoHopper. Connecting this script is very easy.
1. Enter the user interface
2. Select and activate a strategy
3. Copy your bot's links into the dedicated fields
4. Create and activate alert
Disclaimer: algorithmic trading involves risk, the user should consider aspects such as slippage, liquidity and costs when evaluating an asset. The Quant Science is not responsible for any kind of damage resulting from use of this script. By using this script you take all the responsibilities and risks.
Donchian Trendline - Support Resistance Slope [UhoKang]// This is a strategy that draws a trend line in the form of a slope whenever the high point and low point are updated.
// The upper slope serves as a resistance line, and the lower slope serves as a support line.
// Buy when the of the candle crosses the slope
Three Bars Play Strategy [JoseMetal]============
ENGLISH
============
- Description:
This strategy is based on two simple candlestick patterns (you can pick between 2 variants) with an extra option to require trigger candles to be opposite to the closing one (explained below).
There are several customizable settings such as take profit, stop loss and break even (all based on ATR).
You can customize starting and ending date for the testings.
Other options such as allow switch position if strategy SHORTs when you are LONG and vice versa.
There's an additional optional EMA filter.
- LONG / SHORT ENTRY:
Original pattern: for LONG, current candle must close ABOVE the HIGH of previous candle and the candle 3 positions back, opposite conditions for SHORT.
Variant pattern: for LONG, the current candle must close ABOVE the HIGH of the previous candle and the candle before that one too, opposite conditions for SHORT.
Optional: require the trigger candles to be opposite, ex: for LONG you need the previous candles to be RED (bearish).
Optional: EMA filter, price must be ABOVE for LONGs, below for SHORTs.
- EXIT CONDITION:
Stop Loss or Take Profit, based on ATR.
- Visual:
The script prints the Take Profit as a GREEN line, Stop Loss as a RED line and entry price with a WHITE line.
If enabled, the Break Even required price is BLUE, and the new Stop Loss level (for break even or protecting profit) is AQUA.
- Recommendations:
This strategy is great on DAILY on most assets, including crypto, forex and gold.
12H seems to work in most cases, lower timeframes are worse.
- Customization:
You can customize indicator settings (ATR, EMA...).
Stop Loss and Take Profit ATR multipliers are also customizable.
The break even is optional, required level and break even levels (also based on ATR) are custom too.
Almost everything is customizable, for colors and plotting styles check the "Style" tab.
Enjoy!
============
ESPAÑOL
============
- Descripción:
Ésta estrategia se basa en dos patrones simples de velas (puedes elegir entre 2 variantes) con una opción extra para requerir que las velas de activación sean opuestas a la de cierre (se explica más adelante).
Hay varios ajustes personalizables como el take profit, el stop loss y el break even (todos basados en el ATR).
Puedes personalizar la fecha de inicio y finalización de las pruebas.
Otras opciones como permitir el cambio de posición si la estrategia cambie a SHORT cuando está LONG y viceversa.
Hay un filtro de EMA opcional adicional.
- ENTRADA LARGA / CORTA:
Patrón original: para LONG, la vela actual debe cerrar POR ENCIMA del ALTO de la vela anterior y de la vela 3 posiciones atrás, condiciones opuestas para SHORT.
Patrón variante: para LONG, la vela actual debe cerrar POR ENCIMA del ALTO de la vela anterior y la vela anterior a esa también, condiciones opuestas para SHORT.
Opcional: requiere que las velas de activación sean opuestas, por ejemplo: para LONG requiere que las velas anteriores sean ROJAS (bajistas).
Opcional: fltro EMA, el precio debe estar POR ENCIMA para los LONGs, por debajo para los SHORTs.
- CONDICIÓN DE SALIDA:
Stop Loss o Take Profit, basado en el ATR.
- Visual:
El script dibuja el Take Profit como una línea VERDE, el Stop Loss como una línea ROJA y el precio de entrada con una línea BLANCA.
Si está habilitado, el precio de break even requerido es AZUL, y el nuevo nivel de Stop Loss (para el break even o asegurar ganancias) es CELESTE.
- Recomendaciones:
Ésta estrategia es estupenda en DIARIO en la mayoría de los activos, incluyendo criptos, fórex y oro.
En 12H parece funcionar en la mayoría de los casos, las temporalidades inferiores son peores.
- Personalización:
Puedes personalizar la configuración de los indicadores (ATR, EMA...).
Los multiplicadores de Stop Loss y Take Profit ATR también son personalizables.
El break even es opcional, el nivel requerido y los niveles de break even (también basados en ATR) son personalizables también.
Casi todo es personalizable, para los colores y estilos de trazado compruebe la pestaña "Estilo".
¡Que lo disfrutes!
The Systems Lab: PRX StrategyLike the PRX Indicator (which is also available) this PRX Strategy includes all the elements necessary to run the PRX Trading System or to incorporate any of its elements into your own analysis. But since this is a strategy it also includes all of the system entry and exit orders which allows them to be displayed on the charts and backtested in different configurations to see how specific configurations of the system could have performed in the past.
The primary concept is the identification of trends by way of a customized PSAR (Parabolic Stop and Reverse) calculation that uses linear regression to reduce market noise and highlight trends for longer using a method pioneered by Dr Ken Long. This means that price can penetrate the PSAR dots without causing a trend reversal to occur (flipping the dots over to the opposing side) which would normally occur with the traditional PSAR idea.
The intent is to help identify and stick with trends longer, adapt to changes in volatility by using linear regression as a noise filter and potentially capture large outlier moves. A linear regression curve is plotted as well in order to help identify when a change in trend will occur by it crossing the PSAR dots.
In order to make the trend as clear as possible the bars can be colored as either up-trend or down-trend with user selectable colors.
A moving average filter is also included as a longer term market condition filter in order to avoid periods when the market is against this average which is an inherent part of the system.
The strategy is currently long only (though we’re working on the short side) and includes standard entries along with a trailing stop using the customized PSAR. It also includes multiple options to re-enter with an existing trend if the trailing stop is hit but the trend remains in place.
Multiple parameters are available for customisation including the Linear Regression length, the Moving Average Filter lookback, enabling of the re-entry and continuation entry signals as well as a date range filter for more specific and repeatable backtesting over different markets and timeframes.
Risk Management is at the core of our system design principles and as such we set and limit the loss for every trade (which is also configurable as a parameter that defaults to $100/trade) and also trail the stop to both reduce risk and capture profit. The position size is calculated automatically and is volatility adjusted based on the initial stop.
Finally, there is a custom dashboard which shows all the relevant details for the current trade at a glance on the chart such as entry, initial stop (size and price), current trailing stop level and P/L in units of R-multiples (’R’ being the initial risk on the trade).
[Floride] 4LBS Strategy - COPPERHEAD**Hello. Because of my poor English skill, there may be many grammatically incorrect sentences in the description below. Thank you in advance for your understanding. **
Copperhead
This is a strategy created by combining three 4LBS channels, with the goal of catching the most volatile points, the points that are profitable as soon as you enter the position. The goal is to target the minimum number of entries and the vital point without missing it.
Characteristics
Each channel is L1 in 4LBS channels using a period of Fibonacci multiples.
You enter the position only when all three layers break through.
The initial losscut ratio setpoint is 3%.
If you don't get losscut and get on the trend safely, you liquidate your position when L4 breaks down.
advantages
- This strategy is profitable for almost every time frame. However, the longer the candle period you using in the chart, the more you have to increase the losscut ratio.
And if the candle period is shortened, you have to reduce the losscut ratio.
- One of the factors behind the strategy's bottom line is that it only enters at critical points and does not have a large number of entries.
- It was intended to make clear visual effects as simple as possible to understand the current trend.
- Korean Description -
전략 : 카퍼헤드
이것은 4LBS채널 3개를 결합하여 만든 전략으로, 가장 변동성이 극단적이 되는 지점들, 진입하자마자 수익이 나는 지점들을 캐치하는 것을 목표로 만든 전략입니다.
최소의 진입횟수, 그리고 급소를 놓치지 않고 공략하는 것이 목적입니다.
** 특징 **
- 각각의 채널은 피보나치 배수비의 기간을 사용한 4LBS의 L1입니다.
- 모든 3개의 레이어가 돌파될때에만 포지션을 진입합니다.
- 최초의 로스컷 설정점은 3%입니다.
- 로스컷당하지 않고 무사히 추세가 나오면, L4가 돌파될때 익절합니다.
** 장점 **
- 거의 모든 타임프레임에서 수익이 납니다. 그러나 기간이 길어질수록 손절폭을 늘려주어야 합니다. 그리고 캔들 기간이 짧아지면 손절폭도 따라서 조금씩 줄여주어야 합니다.
- 중요한 급소에서만 진입하고 진입횟수가 많지 않은것이 이 전략의 수익의 요인 중 하나입니다.
- 최대한 간명하게 현재추세를 알아볼 수 있도록, 명확한 시각적 효과를 살리려고 의도하였습니다.
** 수익률 **
The default setting of number of operating contracts is set to 10 contract operation. This may be a dramatic example, but This a deep backtesting result of how much the return would be from January 2019 when trading Bitcoin 10 contract.
기본설정은 10계약 운용으로 설정되어 있습니다. 이것은 좀 극적인 예일 수 있겠으나, 비트코인 10계약을 운용시 지난 2019년 1월부터 얼마나 수익률이 나오는지 딥 백테스팅한 것입니다.
지난 4월부터 로스컷 2.5% 설정하고 5개월동안의 운용할 시에 수익은 58561 달러, 1계약 운용시에는 5800여 달러입니다.
Entry Examples(during last 5 month)
지난 5달간의 진입 예시들
Pure Mark Minervini 10%TP 5%CLBacktesting Mark Miniverni Template
By Donnie Lee
Overall, a good basic guideline from Mark Miniverni to choose which stock to buy. His selection are said to be stocks in stage 2 uptrend phase which could see price surge soon.
This script enable backtesting of Mark template (Investor's Business Ranking Excluded) on equity like stocks
Further fine tuning with additional filters are needed to find good entry with desired cut loss level and position sizing.
There is no holy grail strategy. Choose one with an edge that you are comfortable with and stick to it.
Losing is part and parcel of trading. Hesitation to cut loss can lead to big loss. And if you can avoid losing big, you might stand a chance to profit in the end.
Mark Miniverni Template
1. The current stock price is above both the 150-day (30-week) and the 200-day (40-week) moving average price lines.
2. The 150-day moving average is above the 200-day moving average.
3. The 200-day moving average line is trending up for at least 1 month (preferably 4–5 months minimum in most cases).
4. The 50-day (10-week) moving average is above both the 150-day and 200-day moving averages.
5. The current stock price is trading above the 50-day moving average.
6. The current stock price is at least 25% above its 52-week low (30% as per his book 'Trade Like a Stock Market Wizard').
7. The current stock price is within at least 25% of its 52-week high (the closer to a new high the better).
The Flower - Multiple Strategy Options in OneStrategy Overview
This strategy code currently includes four separate strategies to be used to either aid in discretionary trading or to be used algorithmically through the third-party system Profitview (profitview.app). Support for Pineconnector for use with MetaTrader 4 is in the works. The strategies have been designed with cryptocurrency trading in mind, however, the fundamentals apply to other assets.
The four strategies currently included are labeled “TSI Cross” (the default setting), “Oscillator Bands”, “Scalping”, and “McG/MA Cross”. Detailed information for each independent strategy can be found below, including sample settings configurations for each. A dropdown menu to select the strategy can be found under the “Strategy Options” set of settings under the Input tab of the strategy settings menu.
Additionally, the option to receive only long or short signals can be found alongside the Strategy Choice menu.
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.
The only visuals associated with the strategy are two McGinley Dynamic lines, red (slow length) and green (fast length). These are relevant to the McGinley Cross strategy, but can be used alongside the other strategies if desired.
When viewing the backtesting data in the TradingView Strategy Tester, ensure that “use bar magnifier” is activated. This option can be found in the Properties tab of the strategy settings menu.
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. A sample of our Profitview syntax can be found below.
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.
Strategy Choices
As mentioned above, this strategy code contains four separate strategy options. A detailed breakdown of each follows below:
Total Strength Index (TSI) Cross
This strategy option is the default choice. The main signal involved in this strategy is a crossover or crossunder of the TSI value line and TSI signal line, however, there are a few other signals involved in the creation of a long or short entry. In addition to the TSI, the strategy includes an Average Directional Index (ADX) threshold value, Jurik Volatility Bands (JVB), a Stoch RSI threshold, and an oscillator of choice in conjunction with a threshold of 0. This oscillator choice can be selected under the “Signal Options” menu in the Input tab of the strategy settings. The default oscillator is the Detrended Price Oscillator (DPO), though the option for Chande Momentum (CMO) or Rate of Change (RoC) are both viable for this strategy.
Individual settings for these can be found in the Input tab under “Oscillator Settings” (TSI, Stoch RSI, DPO, CMO, ROC), “Band/Channel Settings” (Jurik Volatility Bands Length/Smoothing), and “Directional Settings” (ADX Smoothing Long, DI Length Short, ADX Threshold).
Sample settings for SOLUSDT using the 20M timeframe:
- Oscillator Settings -- DPO Length (21), DPO *not* centered, RSI (Stoch) Length (4), Stochastic Length (4), TSI Long Length (25), TSI Short Length (13), TSI Signal Length (13), K (3), D (3)
- Band/Channel Settings -- Jurik Volatility Bands Length (25), Jurik Volatility Bands Smoothing (5)
- Directional Settings – JVB Price Threshold (0), ADX Smoothing Long (5), DI Length Short (5), ADX Threshold (23)
- Take Profit/Stop Loss – 0.85% TP, 0.005% TTP, 1.3% SL
Oscillator Bands
This strategy involves the usage of bands or channels that use oscillators as a source input. The main signal for this strategy derives from a cross of the band or channel and a hline of 0. Additionally, this includes a “Directional Filter” and a “MA Filter”. The selections for all of these can be found in the “Signal Options” section of the Input tab.
First option is for Oscillator Choice and includes DPO, CMO, ROC, RSI, TSI, and the Jurik price line. The individual settings for these can be found in the “Oscillator Settings” section. Different channels can be selected for the upper or lower bands, though it is not necessary for them to differ. These current options include Bollinger Bands and Jurik Volatility Bands, the individual settings for each found in the “Band/Channel Settings” section. Next is the MA Filter, of which you can select SMA, EMA, SMMA, WMA, VWMA, KAMA, JMA, or McGinley Dynamic. All options for these settings can be found in the “MA Filter Settings” section. Lastly, the Directional Filters can be selected for either direction like the upper/lower band selection. These filters include the ADX, Bull-Bear Power (BBP), Parabolic SAR (PSAR), or Jurik.
Sample settings for WAVESUSDT using the 20M timeframe:
- Oscillator Choice – DPO (Length – 30, uncentered)
- Upper and Lower Band – JVB Upper/Lower (Jurik Volatility Bands Length – 25; Smoothing – 10)
- MA Filter – VWMA – (MA Length – 40; Source – Open)
- Directional Filter – ADX (ADX Smoothing Long – 14; DI Length Short – 5; ADX Threshold – 22)
- Take Profit/Stop Loss – 0.85% TP, 0.005% TTP, 1.3% SL
Scalping
This strategy heavily relies on the usage of Parabolic SAR, accompanied by a “Directional Filter” (as discussed in the previous section) other than PSAR. This strategy can provide a higher frequency of trades as opposed to the other strategies available, however, it comes with slightly higher risk inherently. A riskier take profit/stop loss spread is recommended here, though risk should always be managed. The settings required for this strategy are all found under the “Directional Settings” section of the strategy inputs.
Sample settings for NEARUSDT using the 20M timeframe:
- Directional Filter set to ADX
- Directional Settings – ADX Smoothing Long (5), DI Length Short (5), ADX Threshold (22), PSAR Start Value (0.02), PSAR Increment (0.005), PSAR Max Value (0.15), PSAR Source (Close)
- Take Profit/Stop Loss – 0.75% TP, 0.005% TTP, 1.5% SL
McGinley Cross
This strategy revolves around the crossing of two McGinley Dynamic lines of varying lengths alongside an ADX filter as well as a DPO filter. McGinley is used as opposed to a standard moving average cross strategy as it adjusts for shifts in market speed and can better gauge market trends. The McGinley length settings can be found with the “MA Filter” settings, labeled as Fast Length and Slow Length. The fast length number should be smaller than the slow length.
Sample settings for SOLUSDT using the 20M timeframe:
- Oscillator Settings – DPO Length (30), uncentered
- MA Filter Settings – McGinley Fast Length (4), McGinley Slow Length (21)
- Take Profit/Stop Loss – 0.85% TP, 0.005% TTP, 1.4% SL
Comprehensive Settings List
Date and Time: From date and to date, adjustable for backtesting purposes.
Signal Options:
Oscillator Choices: Chande Momentum Oscillator (CMO), Detrended Price Oscillator (DPO), Rate of Change (ROC), Relative Strength Index (RSI), True Strength Index (TSI), Jurik Volatility Bands Priceline (JVB) – *** for use with TSI Cross or Oscillator Bands strategies only ***
Upper and Lower Band/Channel Choices: Bollinger Bands (BB) or Jurik Volatility Bands (JVB) -- *** for use with Oscillator Bands strategy only ***
MA/McG Filter: SMA, EMA, RMA, WMA, VWMA, Kaufmann MA, Jurik MA, McGinley Dynamic -- *** for use with Oscillator Bands strategy only ***
Directional Filter Long/Short: Average Directional Index (ADX), Bull/Bear Power (BBP), Parabolic SAR (PSAR), Jurik -- *** for use with Oscillator Bands strategy only ***
Profitview Settings: *** For use with ProfitView extension only, otherwise ignore ***
Oscillator Settings: *** For use with TSI Cross, Oscillator Bands, and McGinley Cross strategies ***
CMO Length, CMO Source – for Chande Momentum Oscillator
DPO Length, DPO Centered – for Detrended Price Oscillator
RoC Length, RoC Source – for Rate of Change
RSI Length, RSI MA Length – for Relative Strength Index
RSI (Stoch) Length, Stochastic Length, Stoch RSI Source, K, D – for Stochastic RSI
TSI Long Length, TSI Short Length, TSI Signal Length – for True Strength Index
Band/Channel Settings: *** For use with Oscillator Bands strategy ***
Jurik Volatility Bands Length, Jurik Volatility Bands Smoothing – for Jurik Volatility Bands
Bollinger Band Length, Bollinger Band Multiplier – for Bollinger Bands
Directional Settings: *** For use with Scalping and Oscillator Bands strategies ***
JVB Price Threshold – for Jurik Volatility as a directional setting
ADX Smoothing Long, DI Length Short, ADX Threshold – for Average Directional Index
PSAR Start Value, PSAR Increment, PSAR Max Value, PSAR Source – for Parabolic SAR
MA Filter Settings: *** For use with Oscillator Bands and McGinley Cross strategies ***
McGinley Fast/Slow Length – for McGinley Dynamic
MA Length, MA Source, MA Offset – for any other moving average
TP and TTP / Stop Loss: *** For use with ALL strategies ***
Long/Short Take Profit % -- for standard take profit settings
Enable Trailing, Trailing Take Profit % -- for trailing settings
Stop Loss % -- for standard stop loss settings; trailing can be enabled or disabled for stop loss
Disclaimers:
Some open-source code has been included -- Jurik Volatility Bands (by "ProValueTrader") and Trailing Take Profit/Stop Loss code (by jason5480). Additional code was used from the TradingView built-ins.
These strategies do 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.
Invites to the strategy will only be disseminated to those with express consent and knowledge of the invite prior to the action itself.
Double SuperTrend Strategy [JoseMetal]============
ENGLISH
============
- Description:
This is a simple strategy using 2 SuperTrends, a larger one for entries and smaller for Stop Loss, Take Profit is calculated via risk reward custom setting.
The strategy has several customizable options, which allows you to refine the strategy for your asset and timeframe.
You can customize settings for both SuperTrends, as well as the risk to reward ratio, starting date, ending date and more.
- LONG / SHORT ENTRY:
Both SuperTrends agree on the trend direction, both green = bullish = LONG, both red = bearish = SHORT.
- EXIT CONDITION:
Stop Loss or Take profit, however, there's an option (activated by default) to change position if entry conditions reverse.
- Visual:
Both SuperTrends are plotted.
The script prints the Take Profit as a green line, Stop Loss as a red line and entry price with a white line.
- Recommendations:
Depending on the asset, the strategy works from 1H to daily, feel free to test it on your favorite asset.
The strategy settings are good for crypto by default.
- Customization:
As you can see, almost everything is customizable, for colors and plotting styles check the "Style" tab.
Enjoy!
============
ESPAÑOL
============
- Descripción:
Esta es una estrategia sencilla que utiliza 2 SuperTrends, uno mayor para las entradas y otro menor para el Stop Loss, el Take Profit se calcula a través de la configuración personalizada de riesgo-beneficio.
La estrategia tiene varias opciones personalizables, lo que le permite refinar la estrategia para tu activo y marco de tiempo.
Puedes personalizar los ajustes para ambos SuperTrends, así como la relación riesgo-beneficio, la fecha de inicio, la fecha de finalización y más.
- ENTRADA EN LARGO/CORTO:
Ambos SuperTrends coinciden en la dirección de la tendencia, ambos verdes = alcista = LONG, ambos rojos = bajista = SHORT.
- CONDICIÓN DE SALIDA:
Stop Loss o Take profit, sin embargo, hay una opción (activada por defecto) para cambiar de posición si las condiciones de entrada se invierten.
- Visual:
Ambos SuperTrends son dibujados.
El script dibuja el Take Profit como una línea verde, el Stop Loss como una línea roja y el precio de entrada con una línea blanca.
- Recomendaciones:
Dependiendo del activo, la estrategia funciona de 1H a diario, siéntete libre de probarlo en tu activo favorito.
La configuración de la estrategia es buena para criptos por defecto.
- Personalización:
Como puedes ver, casi todo es personalizable, para colores y estilos de trazado revisa la pestaña "Estilo".
¡Que lo disfrutes!
FFT Strategy Bi-Directional Stop/Profit/Trailing + VMA + AroonThis strategy uses the Fast Fourier Transform inspired from the source code of @tbiktag for the Fast Fourier Transform & @lazybear for the VMA filter.
If you are not familiar with the Fast Fourier transform it is a variation of the Discrete Fourier Transform. Veritasium on youtube has a great video on it with a follow up recommendation from 3brown1blue. In short it will extract all the frequencies from a set of data. @tbiktag laid the groundwork for creating the indicator which will allow you to isolate only those signals which are the most relevant and remove the noise. I recommend having @tbiktag's FFT Transform indicator side by side with this to understand what my variation is doing by setting similar settings .
Using this idea, you can then optimize a strategy to the frequencies that are best. The main entry signal is when the FFT Signal crosses above or below the 0 line .
Included with this strategy is the ability to optionally bi-directionally set:
Stop Loss
Trailing Stop Loss
Take Profit
Trailing Take Profit
Entries are optionally further filtered by use of the VMA using the algorithm from LazyBear which allows you to adjust a variable moving average with 3 market trend detections. Green represents upwards momentum; Blue sideways trading and Red downwards momentum. The idea being to filter out buy or sell entries unless the market is moving in that direction, and this makes a big difference as you can see for yourself when you turn it off or on. Turning it off will change the color of the FFT signal to orange instead of the green, blue, red colors .
I have added 2 custom stop loss types as well for experimentation:
1. VMA Filter stop loss to exit the trade if the VMA detects a market trend direction change matching the rules you have set. I have set this to off by default, but it is there so you can see what affect it may have on other tickers. It can increase the profit factor but usually at a cost of net profit.
2. The Aroon Filter stop loss with different lengths for the short or long direction. For the Aroon strategy (which is a trend change detector) it is considered bullish if the upper line (green in my code) is above 70 and the lower line (red in my code) is below 30 and the opposite for the bearish case. With this in mind, I have set it to filter by default only the extreme ends (99 and 1) to increase profit factor and net profit but I encourage you to try different settings and see how it affects things. Turning this off yields much higher net profit but at the cost of the profit factor and drawdown . To disable this just uncheck the 'Use Aroon Filter Long' (or short) and it will also hide the aroon graphics and crosses on the plot.
I will be adding more features in an attempt to lower the drawdown on this strategy but I hope you enjoy what I have so far!
Backtests Are BrokenThis script demonstrates a fatal flaw with Trading View backtests involving trailing stops. Trading View assumes the most optimistic case for trailing stops, always giving you the best case high/low of a bar instead of the worst or average case. Within a bar, the price could reverse against your position after the open and trigger your trailing stop for a loss before the price goes in your favor, but Trading View backtests do not consider this and instead always give you the best case returns. This allows a trivial strategy to appear as though it would perform miracles.
This strategy enters on a random bar and sets a trailing stop triggered one tick better than the current price with 0 trailing distance. Trading View then generously gives this strategy the difference between the open price and best possible wick as a profit. The only way this strategy can lose money in simulation is if the price goes straight down after entry and never retraces. It works on all symbols on all timeframes due to this systematic problem with the Trading View backtester.
Volatility SystemDespite its crude name, the volatility system strategy, described by Richard Bookstaber in 1984, follows the simple premise that once there is a big volatile movement, the market tends to follow it. Thus, it uses the ATR to measure the volatility, and issues orders when the current change of the closing price exceeds the threshold, calculated by the ATR times a configurable constant.
It yields good results for some very specific charts, as you can see. However, I doubt it would work in the current market conditions, since it has no stop loss and no take profit , and the current noise levels obliterate this strategy, especially in small time frames. Maybe their integration to the strategy would yield better results, so feel free to add your own modifications.
Double Inside Bar & Trend Strategy - KaspricciDouble Inside Bar & Trend Strategy - Kaspricci
This strategy combines the Double Inside Bar candlestick pattern with a trend filter. Once the second inside bar closes and price is above trend moving average, a buy stop order is placed at high of the candle. If price is below trend moving average, a sell stop order is placed at the low of the candle.
This strategy is for educational purposes only! It is not meant to be a financial advice.
Settings
Trend source, type of moving average and length for calculating trend
Stop Loss Type - default: ATR. You can switch between stop loss calculation based on Average True Range value or fixed value.
ATR Length / Factor / TP Ratio - default: 14 / 2.0 / 2.0. Used to calculate the Stop Loss as ATR * Factor and Take Profit as Stop Loss * TP Ratio.
FIX Stop Loss / Take Profit - default: 10 pips / 20 pips. In case you select Stop Loss Type = FIX, these value swill be used.
Risk in % - default: 1%, option to adjust the quantity of a trade based on a defined risk percentage. If enabled, it will overwrite the quantity parameter of the strategy settings.
On top you can filter trades by start and end date as well as time of the day.
Click Draw TrendLine [UhoKang] v2
This is an indicator that directly draws a trend line by clicking on the candle.
Click to Create Trend lines !!
Create a trend line by connecting A, B, and C with three vertices.
1. Draw Bear Trend line
Click pivot high : First pivothigh of the downtrend line
Click pivot low : pivotlow of the downtrend line
Click pivot high : Second pivothigh of the downtrend line
2. Draw Bull Trend line
Click pivot low : First pivotlow of the uptrend line
Click pivot high : pivothigh of the uptrend line
Click pivot low : Second pivotlow of the uptrend line
Modefiy Trendlines
1. Edit Bear Trend line
Drag Red , ,
2. Edit Bull Trend line
Drag Green , ,
EMA RSI Strategy
Simple strategy
=============
If the last two closes are in ascending order, the rsi is below 50 and ascending, and the current candle is above 200 ema, then LONG. If the last two closes are in descending order, the rsi is above 50 and descending, and the current candle is below 200 ema, then SHORT.
LONG Exit strategy:
ATR: Last 14 day
Lowest: The lowest value of the last 14 candles
Limit points = (Trade Price - Lowest + ATR) * 100000
trail_points : Limit/2
trail_offset = Limit/2
SHORT Exit strategy:
ATR: Last 14 day
Highest: The higher value of the last 14 candles
Limit points = (Trade Price - Highest + ATR) * 100000
trail_points : Limit/2
trail_offset = Limit/2
Backtest results for the AUDUSD pair gave positive results over the last three months.
I am testing this strategy using a python bot in a real environment this week and will update the results at the end of the week.
Disclaimer
This is not financial advice. You should seek independent advice to check how the strategy information relates to your unique circumstances.
We are not liable for any loss caused, whether due to negligence or otherwise arising from the use of, or reliance on, the information provided directly or indirectly by this strategy.
Linear EDCA v1.2Strategy Description:
Linear EDCA (Linear Enhanced Dollar Cost Averaging) is an enhanced version of the DCA fixed investment strategy. It has the following features:
1. Take the 1100-day SMA as a reference indicator, enter the buy range below the moving average, and enter the sell range above the moving average
2. The order to buy and sell is carried out at different "speed", which are set with two linear functions, and you can change the slope of the linear function to achieve different trading position control purposes
3. This fixed investment is a low-frequency strategy and only works on a daily level cycle
----------------
Strategy backtest performance:
BTCUSD (September 2014~September 2022): Net profit margin 26378%, maximum floating loss 47.12% (2015-01-14)
ETHUSD (August 2018~September 2022): Net profit margin 1669%, maximum floating loss 49.63% (2018-12-14)
----------------
How the strategy works:
Buying Conditions:
The closing price of the day is below the 1100 SMA, and the ratio of buying positions is determined by the deviation of the closing price from the moving average and the buySlope parameter
Selling Conditions:
The closing price of the day is above the 1100 SMA, and the ratio of the selling position is determined by the deviation of the closing price and the moving average and the sellSlope parameter
special case:
When the sellOffset parameter>0, it will maintain a small buy within a certain range above the 1100 SMA to avoid prematurely starting to sell
The maximum ratio of a single buy position does not exceed defInvestRatio * maxBuyRate
The maximum ratio of a single sell position does not exceed defInvestRatio * maxSellRate
----------------
Version Information:
Current version v1.2 (the first officially released version)
v1.2 version setting parameter description:
defInvestRatio: The default fixed investment ratio, the strategy will calculate the position ratio of a single fixed investment based on this ratio and a linear function. The default 0.025 represents 2.5% of the position
buySlope: the slope of the linear function of the order to buy, used to control the position ratio of a single buy
sellSlope: the slope of the linear function of the order to sell, used to control the position ratio of a single sell
sellOffset: The offset of the order to sell. If it is greater than 0, it will keep a small buy within a certain range to avoid starting to sell too early
maxSellRate: Controls the maximum sell multiple. The maximum ratio of a single sell position does not exceed defInvestRatio * maxSellRate
maxBuyRate: Controls the maximum buy multiple. The maximum ratio of a single buy position does not exceed defInvestRatio * maxBuyRate
maPeriod: the length of the moving average, 1100-day MA is used by default
smoothing: moving average smoothing algorithm, SMA is used by default
useDateFilter: Whether to specify a date range when backtesting
settleOnEnd: If useDateFilter==true, whether to close the position after the end date
startDate: If useDateFilter==true, specify the backtest start date
endDate: If useDateFilter==true, specify the end date of the backtest
investDayofweek: Invest on the day of the week, the default is to close on Monday
intervalDays: The minimum number of days between each invest. Since it is calculated on a weekly basis, this number must be 7 or a multiple of 7
The v1.2 version data window indicator description (only important indicators are listed):
MA: 1100-day SMA
RoR%: floating profit and loss of the current position
maxLoss%: The maximum floating loss of the position. Note that this floating loss represents the floating loss of the position, and does not represent the floating loss of the overall account. For example, the current position is 1%, the floating loss is 50%, the overall account floating loss is 0.5%, but the position floating loss is 50%
maxGain%: The maximum floating profit of the position. Note that this floating profit represents the floating profit of the position, and does not represent the floating profit of the overall account.
positionPercent%: position percentage
positionAvgPrice: position average holding cost
--------------------------------
策略说明:
Linear EDCA(Linear Enhanced Dollar Cost Averaging)是一个DCA定投策略的增强版本,它具有如下特性:
1. 以1100日SMA均线作为参考指标,在均线以下进入定买区间,在均线以上进入定卖区间
2. 定买和定卖以不同的“速率”进行,它们用两条线性函数设定,并且你可以通过改变线性函数的斜率,以达到不同的买卖仓位控制的目的
3. 本定投作为低频策略,只在日级别周期工作
----------------
策略回测表现:
BTCUSD(2014年09月~2022年09月):净利润率26378%,最大浮亏47.12%(2015-01-14)
ETHUSD(2018年08~2022年09月):净利润率1669%,最大浮亏49.63%(2018-12-14)
----------------
策略工作原理:
买入条件:
当日收盘价在 1100 SMA 之下,由收盘价和均线的偏离度,以及buySlope参数决定买入仓位比例
卖出条件:
当日收盘价在 1100 SMA之上,由收盘价和均线的偏离度,以及sellSlope参数决定卖出仓位比例
特例:
当sellOffset参数>0,则在 1100 SMA以上一定范围内还会保持小幅买入,避免过早开始卖出
单次买入仓位比例最大不超过 defInvestRatio * maxBuyRate
单次卖出仓位比例最大不超过 defInvestRatio * maxSellRate
----------------
版本信息:
当前版本v1.2(第一个正式发布的版本)
v1.2版本设置参数说明:
defInvestRatio: 默认定投比例,策略会根据此比例和线性函数计算得出单次定投的仓位比例。默认0.025代表2.5%仓位
buySlope: 定买的线性函数斜率,用来控制单次买入的仓位倍率
sellSlope: 定卖的线性函数斜率,用来控制单次卖出的仓位倍率
sellOffset: 定卖的偏移度,如果大于0,则在一定范围内还会保持小幅买入,避免过早开始卖出
maxSellRate: 控制最大卖出倍率。单次卖出仓位比例最大不超过 defInvestRatio * maxSellRate
maxBuyRate: 控制最大买入倍率。单次买入仓位比例最大不超过 defInvestRatio * maxBuyRate
maPeriod: 均线长度,默认使用1100日MA
smoothing: 均线平滑算法,默认使用SMA
useDateFilter: 回测时是否要指定日期范围
settleOnEnd: 如果useDateFilter==true,在结束日之后是否平仓所持有的仓位平仓
startDate: 如果useDateFilter==true,指定回测开始日期
endDate: 如果useDateFilter==true,指定回测结束日期
investDayofweek: 每次在周几定投,默认在每周一收盘
intervalDays: 每次定投之间的最小间隔天数,由于是按周计算,所以此数字必须是7或7的倍数
v1.2版本数据窗口指标说明(只列出重要指标):
MA:1100日SMA
RoR%: 当前仓位的浮动盈亏
maxLoss%: 仓位曾经的最大浮动亏损,注意此浮亏代表持仓仓位的浮亏情况,并不代表整体账户浮亏情况。例如当前仓位是1%,浮亏50%,整体账户浮亏是0.5%,但仓位浮亏是50%
maxGain%: 仓位曾经的最大浮动盈利,注意此浮盈代表持仓仓位的浮盈情况,并不代表整体账户浮盈情况。
positionPercent%: 仓位持仓占比
positionAvgPrice: 仓位平均持仓成本
The Only EURUSD Trading Strategy You Need - KaspricciThe Only EURUSD Trading Strategy You Need
I got the idea to this strategy from a youtube video uploaded by Trade Beta. It is designed to capture the early market move of major forex pair EURUSD at beginning of New York Stock Exchange (13:30 GMT). Trade Beta tested his strategy on the 5 minute chart. I have set all parameters to same values as shown in the video.
The strategy creates two pending orders at the recent swing high and low. Once the first pending order entered, the remaining one is cancelled. Latest at the end of market session all pending orders are cancelled and all open trade are closed as well.
In rare case that price at session opening is above swing high, only a pending sell stop order is created at swing high price. And in case price is below swing low, a pending buy stop order is created.
Settings
Trading Time - default: New York Stock Exchange opening hours. Pending orders are created at the close of the first candle within the session.
Swing High Source / Bars - default: High / 5 bars. Used to find the latest swing high within a range of 5 bars left and right. Price is used for buy stop order.
Swing Low Source / Bars - default: Low / 5 bars. Used to find the latest swing low within a range of 5 bars left and right. Price is used for sell stop order.
Stop Loss Type - default: ATR. You can switch between stop loss calculation based on Average True Range value or fixed value.
ATR Length / Factor / TP Ratio - default: 14 / 2.0 / 2.0. Used to calculate the Stop Loss as ATR * Factor and Take Profit as Stop Loss * TP Ratio.
FIX Stop Loss / Take Profit - default: 10 pips / 20 pips. In case you select Stop Loss Type = FIX, these value swill be used.
This strategy is for educational purposes only! It is not meant to be a financial advice.