The Ultimate Backtest - Fontiramisu█ OVERVIEW
The Ultimate Backtest allows you to create an infinite number of trading strategies and backtest them easily and quickly.
You can leverage the trading setup you created with the tradingview's real-time alert system.
The tool is constantly being improved to accommodate more in-house indicators in order to imagine more trading strategies.
█ HOW IT WORKS.
The tool is divided into 3 main parts:
1. The indicators:
These are the indicators that you will be able to set up to create your setups.
Example: rsi, exponential moving average, home made resistance/support indicator etc.
We are working to add more and more in-house indicators to multiply the trading strategies.
2. The entry/exit strategy:
The entry/exit trades management is a central point of the strategy.
Here we propose several ways to take profits and in-house optimizations to enter a position.
3. The setup: the combination of indicators
Here it is up to you to create your own recipe.
You combine the different indicators set up above to make a real strategy.
Example: RSI Divergence + Location on a support.
Let's look at this in more detail.
Below is a description of all sections
█ 1. THE INDICATORS
TREND: MA (moving average) -->
Set up a moving average from multiple methods (sma, ema, smma...) of the type and length you want.
> A long is taken if the price is above the MA.
> A short is taken if the price comes below the MA.
You can set up a smoothing MA from the existing moving average and use it in the same way.
ENVELOPE: SUPER TREND -->
The supertrend is a trend following indicator. It clearly describes the distinction between downtrends and uptrends with a red or green direction. It is calculated according to the ATR and a factor.
> A long is taken when the direction is green and the price touches the supertrend support line.
> A short is taken when the direction is red and the price touches the supertrend resistance line.
ENVELOPE: BOLLINGER BAND -->
Bollinger bands are used to evaluate the volatility and probable evolution of prices, here we exploit the envelope
> A long is taken if the price crosses the lower band.
> A short is taken if the price crosses the upper band.
CLOUD: ICHIMOKU -->
The Ichimoku cloud aims to identify the direction and reversal points of dominant market trends. It displays support and resistance levels.
> A long is taken when the price enters the green ichimoku cloud.
> A short is taken when the price enters the red ichimoku cloud.
MOMENTUM: MACD ZERO LAG / MACD / RSI -->
RSI (Relative Strength Index) reflects the relative strength of upward movements, compared to downward movements.
MACD (Moving Average Convergence Divergence) is a momentum indicator that follows the trend and shows the correlation between two moving averages of the asset price.
MACD ZERO LAG is calculated in the same way except that the exponential moving averages that make up the calculation do not lag.
> A long is taken on a potential bullish divergence.
> A short is taken on a potential bearish divergence.
For now, with these indicators, we only take a trade based on divergences but we will add overbuy/oversell etc.
MOMENTUM: MA SLOPE -->
This house indicator allows you to use the slope of a moving average as a measure of momentum.
Define the length of the moving average whose slope we will take.
We then take a fast ma of the slope then a slow ma (You define the lengths with the parameters)
The tool foresees a subtraction between the slow and fast ma to have another interpretation of the slope.
This indicator is available and can be viewed freely on my tradingview profile.
> A long is taken when there is a potential bullish divergence on the fast/slow MA or the difference.
> A short is taken when there is a potential bear divergence on the fast/slow MA or the difference.
RESISTANCE: R/S FONTIRAMISU -->
An in-house indicator that shows resistances and supports according to the chosen parameters.
Indicator available and can be viewed freely on my tradingview profile.
> A long is taken when the price arrives on a support.
> A short is taken when the price arrives on a resistance.
-----
MOMENTUM DIVERGENCE -->
Section used to set the divergence detection.
The first field allows you to select which momentum you want to calculate the divergence on.
PIVOT DETECTION -->
Used to calculate top and dip on the chart, it is used with divergences/resistances/enter-exit optimizations....
Default parameters are: Deviation: 2.5, Depth: 10.
█ 2. STRATEGY FOR ENTERING/EXITING TRADES.
STRATEGY: TP/SL -->
Enter/Exit Trade Mode" field: The first field allows you to choose between two modes:
1. TP/SL Mode:
This mode allows you to take entries with take profits that you define afterwards with the TP1 and TP2 parameters .
> The stop loss is calculated automatically by taking the last dip if it is a long and the last top if it is a short.
> You can add a "Stop Loss % Offset" which will increase the size of the stop loss by the % value you set.
> If you activate TP2, the profit taking is split between TP1 and TP2, you can select the percentage of profit taking split between TP1 and TP2 via the "Percent Exit Profit TP1" field.
> The "TPX Multiplier" fields allow you to define the desired Risk Reward, if = 1 then RR = 1/1.
> A Trailing stop option is available, if active then the profit take will be split between TP1 and Trailing stop.
For the moment you can choose between the two MA's set up above to serve as trailing stop:
> In long, if the price goes below the MA then you take the profit (or the loss)
> In short, if the price goes above the MA then you take the profit (or the loss)
2. ONLY BUY/SELL:
Here the take profits are not taken into account, we only have an alternation between the long and the shorts.
The trailing stop applies to this mode and can be interesting depending on the use.
STRATEGY: SETUP OPTIMIZER (FP) -->
Here we have 3 home made optimization tools to take more relevant trades.
1. FAVORABLE ENTRY FROM PIVOT.
Here the tool will favor entries with interesting locations depending on dips and tops before.
A red cross with "FP" will appear on the chart each time a trade does not meet this condition.
2.STOP LOSS MAX (SL).
Will only take trades where the stop loss is maximum at X%.
A red cross with "%SL" will appear on the chart each time a trade does not meet this condition.
3. MOVE ALREADY TRADED.
Will not take several trades in the same move.
This can avoid cascading losing trades on some setups.
A red cross with "MT" will appear on the chart each time a trade does not meet this condition.
█ 3. THE SETUP: THE COMBINATION OF INDICATORS
Here, let your creativity speak.
You are free to assemble the indicators in the following way:
The conditions defined inside a group (group1/group2/group3) are combined to each other via an OR operator .
Example, if "cond01 = Momentum DIv" and "cond02 = Res/Sup Location", then trades will be triggered if one of the two conditions is met.
The conditions defined between several groups are multiplied via the AND operator .
Example, if "cond01 = Momentum DIv" and "cond12 = Res/Sup Location", then trades are taken if both conditions are met at the same time.
ALL CONDITIONS:
> NONE
No conditions selected.
> Momentum Div
Triggers when a potential divergence occurs on the selected momentum (in the divergence section).
> Momentum Div UT Sup
Triggers when a potential divergence occurs on the selected momentum (in the divergence section) in the upper timeframe.
The upper timeframe of the momentum is calculated directly in the code by multiplying the set parameters by 4 (fastlenght/slowlenght...).
> Multi MA
It is set in the "Trend: MA" section and is triggered by the conditions mentioned in the "INDICATORS" section.
> Smooting MA
Is set in the "Trend: MA" section and is triggered by the conditions mentioned in the "INDICATORS" section.
> Super Trend Env
Is set in the "ENVELOPE: SUPER TREND" section and is triggered by the conditions mentioned in the "INDICATORS" section.
> BB Env
It is set in the "ENVELOPE: BOLLINGER BAND" section and is triggered by the conditions mentioned in the "INDICATORS" section.
> Ichimoku Cloud
Is set in the "CLOUD: ICHIMOKU" section and is triggered by the conditions mentioned in the "INDICATORS" section.
> Res/Sup Location
Is set in the "RESISTANCE: R/S" section and is triggered by the conditions mentioned in the "INDICATORS" section.
Moving Averages
Arnaud Legoux Moving Average Cross (ALMA)This strategy uses two different Arnaud Legoux Moving Average Lengths, one fast and one slow, to determine crosses for entries. The Arnaud Legoux Moving Average is an improvement to traditional MA's because it reduces lag and smooths the signal line. I have added a volume filter to improve the accuracy of the signals. This script is optimized to be used with crypto, but could be adjusted to use on different instruments. Alert functionality is included. The backtesting results displayed use 10% of the initial account equity, adjust as necessary.
Combo 2/20 EMA & Bull PowerThis is combo strategies for get a cumulative signal.
First strategy
This indicator plots 2/20 exponential moving average. For the Mov
Avg X 2/20 Indicator, the EMA bar will be painted when the Alert criteria is met.
Second strategy
Bull Power Indicator
To get more information please see "Bull And Bear Balance Indicator"
by Vadim Gimelfarb.
WARNING:
- For purpose educate only
- This script to change bars colors.
J2S Backtest: 123-Stormer StrategyThis backtest presents the 123-Stormer strategy created by trader Alexandre Wolwacz "Stormer". The strategy is advocates and shared by the trader through his YouTube channel without restrictions.
Note :
This is not an investment recommendation. The purpose of this study is only to share knowledge with the community on tradingview.
What is the purpose of the strategy?
The strategy is to buy the 123-Stormer pattern at the bottom of an uptrend and sell the 123-Stormer pattern at the top of a downtrend, aiming for a short stop for a long profit target.
To which timeframe of a chart is it applicable to?
Recommended for weekly and daily charts, as the signals are more reliable, being that strategy a good option for swing and position trading.
What about risk management and success rate?
The profit target is established by the author as being twice the risk assumed. Also according to the author, the strategy is mathematically positive, reaching around 65% of success rate in tradings.
How are the trends identified in this strategy?
Two averages are plotted to indicate the trend, a fast EMA average with an 8-week close and a slow EMA average with an 80-week close.
Uptrend happens whenever the fast EMA is above the slow EMA and prices are above the fast EMA. In this case, we should start looking for a LONG entry based on the signal of the 123-Stromer pattern to buying.
On the other hand, downtrend happens when the fast EMA is below the slow EMA and prices are below the fast EMA. In this case, we should start looking for a SHORT entry based on the signal of the 123-Stromer pattern to selling.
How to identify the 123-Stormer pattern for a LONG entry?
This pattern consists of three candles. The first candle has a higher low than the second candle's low, and the third candle has a higher low than the second candle's low. In this pattern, we will buy as soon as a trade occurs above the third candle's high, placing a stop as soon as a trade occurs below the second candle's low, with profit target twice the risk assumed. In another words, the amplitude of the prices of the three candles from the third candle’s high upwards. (you can use fibonacci extension to determine your stops and profit targets).
Importantly, the low of the three candles must be above the fast EMA average and in an uptrend.
How to identify the 123-Stormer pattern for a SHORT entry?
This pattern consists of three candles. The first candle has a lower high than the second candle's high, and the third candle has a lower high than the second candle's high. In this pattern, we will sell as soon as a trade occurs below the third candle's low, placing a stop as soon as a trade occurs above the second candle's high, with profit target twice the risk assumed. In other words, the amplitude of prices of the three candles from the third candle’s low down (you can use fibonacci extension to determine your stops and profit targets).
Importantly, the high of the three candles must be below the fast average and in a downtrend.
Tips and tricks
According to the author, the best signal for both LONG or SHORT entry is when the third candle is a inside bar of second candle.
Backtest features
Backtest parameters are fully customizable. The user chooses to validate only LONG or SHORT entries, or both. It is also possible to determine the specific time period for running the backtests, as well as setting a threshold in candels for entry by the 123-Stormer pattern.
Furthermore, for validation purposes, you can choose to activate the best signal of the pattern recommended by the author of the strategy, as well as change the values of the EMA averages or even deactivate them.
Final message
Feel free to provide me with any improvement suggestions for the backtest script. Bear in mind, feel free to use the ideas in my script in your studies.
EMA SCALPEUR + RSi - SHORTthis indicator is about 4 EMAs, you can choose a cross under 2 EMA's for the entry end 2 others EMAs for the exit.
Plus I add a RSI function to be sure it doesn't take a short if RSI is under 40.
It's still in development
EMA SCALPEUR SHORTI'm trying to find the best EMA's for scalpingm you are able to choose 2 differents EMAs for your enter and 2 differents EMAs for you exit.
It's putting entry and exit on the graph
EMA SCALPEUR LONG V2THIS IS A TRY TO FIND THE BEST EMAS FOR SCALPING
YOU HAVE 4 EMAS, YOU CAN CHOOSE 2 FOR THE ENTER
This a try to find the best EMAs for scalping
you have 4 EMAs, 2 to find the best enter possible and 2 others to find the best way out possible
ComiCo - Joel on Crypto - MACD ScalpingThis is a modified (hopefully improved) version of the "Joel on Crypto - MACD Scalping" indicator. It got turned into a strategy, and added some extra filters, like number of trades after EMA cross, minimal EMA distance (EMA 50's distance from the EMA 200). It is just an experiment to see how good this scalping strategy can get.
Play around with it and let me know if you found good settings, or just have a comment on it.
I could get fairly good results on BTCUSDT 5m with these settings (all others left on default values):
Ticks Avg. Multiplier = 1.4
Max trades after EMA cross = 16
Limit Price Difference = 0
Take Profit = 0.0065
Stop Loss = 0.0085
Min EMA difference = 110
Pyramiding = 3
EHMA Range Index Basket StrategyThis script is a modified version of my EHMA Range Strategy.
EHMA Range Strategy
In addition to the EHMA, this script works with a range around the EHMA (which can be modified), in an attempt to be robust against fake signals. Many times a bar will close below a moving average, only to reverse again the next bar, which eats away at your profits. Especially on shorter timeframes, but also on choppy longer timeframes this can make a strategy unattractive to use.
With the range around the EHMA, the strategy only enters a long/exit-short position if a bar crosses above the upper range. Vice versa, it only enters a short/exit-long position if a bar crosses below the lower range. This avoids positions if bars behave choppy within the EHMA range & only enters a position if the market is confident in it's direction. Having said that, fakeouts are still possible, but a lot less frequent. Having backtested this strategy vs the regular EHMA strategy (and having experimented with various settings), this version seems to be a lot more robust & profitable!
EHMA Range Index Basket Strategy
The EHMA Range Index Basket Strategy aims to make the EHMA Range Strategy even more robust, by taking nearly 40 of the most traded crypto trading pairs and applying the EHMA Range Strategy to them. For each pair it assigns a 0 (Sell signal) or 1 (Buy signal) and adds them up. If the number of Buy signals outweigh the number of Sell signals, the index strategy triggers its Buy signal (and vice versa). The results are even more profitable & robust than with the EHMA Range Strategy on its own. Next to that, it performs a lot better on most crypto pairs, due to it's robustness. Because of that, this strategy is a lot less prone to overfitting and will likely produce better results during live trading conditions!
Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as good as in historical backtesting.
This post and the script don’t provide any financial advice.
Swing Trading SPX CorrelationThis is a long timeframe script designed to benefit from the correlation with the Percentage of stocks Above 200 moving average from SPX
At the same time with this percentage we are creating a weighted moving average to smooth its accuracy.
The rules are simple :
If the moving average is increasing its a long signal/short exit
If the moving average is decreased its a short signal/long exit.
Curently the strategy has been adapted for long only entries.
If you have any questions let me know !
Linear Regression MA - Strategyusing the linear regression and linear regression MA to enter long and short positions.
3ngine Global BoilerplateABOUT THE BOILERPLATE
This strategy is designed to bring consistency to your strategies. It includes a macro EMA filter for filtering out countertrend trades,
an ADX filter to help filter out chop, a session filter to filter out trades outside of desired timeframe, alert messages setup for automation,
laddering in/out of trades (up to 6 rungs), trailing take profit , and beautiful visuals for each entry. There are comments throughout the
strategy that provide further instructions on how to use the boilerplate strategy. This strategy uses `threengine_global_automation_library`
throughout and must be included at the top of the strategy using `import as bot`. This allows you to use dot notation
to access functions in the library - EX: `bot.orderCurrentlyExists(orderID)`.
HOW TO USE THIS STRATEGY
1. Add your inputs
There is a section dedicated for adding your own inputs near the top of the strategy, just above the boilerplate inputs
2. Add your calculations
If your strategy requires calculations, place them in the `Strategy Specific Calculations` section
3. Add your entry criteria
Add your criteria to strategySpecificLongConditions (this gets combined with boilerplate conditions in longConditionsMet)
Add your criteria to strategySpecificShortConditions (this gets combined with boilerplate conditions in shortConditionsMet)
Set your desired entry price (calculated on every bar unless stored as a static variable) to longEntryPrice and shortEntryPrice. ( This will be the FIRST ladder if using laddering capabilities. If you pick 1 for "Ladder In Rungs" this will be the only entry. )
4. Plot anything you want to overlay on the chart in addition to the boilerplate plots and labels. Included in boilerplate:
Average entry price
Stop loss
Trailing stop
Profit target
Ladder rungs
Moon Phases Strategy with CCI EXTRIME TPHELLO TO ALL ASTROLGY TRADING LOVERS
***im not a native english speaker and im not going to google translte it so soory for mastakes ****
this is an amzing script of moon cycle strategy
for long -
price need to be above MA
it will buy in full moon and will sell at new moon
i added an extrime CCI TP that if cci is over bought above 200 line it will close position- it cant be edited out so enjoy it.
for short-
price need to be below MA
it will short when new moon and buy back when fullmoon
i added an extrime CCI tp that if cci is oversold under -200 line it will close position - it cant be edited out so enjoy it.
just edit the new moon Reference date by your UTC TIME!!! ׂ( GOOGLE 'NEW MOON DATE')
לכל אוהבי האסטרולוגיה ומסחר בכוכבים
סקריפט פשוט מעולה!
ללונג- האסטרטגיה קונה כאשר המחיר מעל הממוצע ויש ירח מלא-היא מוכרת כאשר יש ירח חדש או כאשרס.ס.י חוצה את קו ה200
בשורט היא עושה ההפך ומוכרת כאשר יש ירח חדש והמחיר מתחת לממוצע-היא סוגרת את הפוזציה כאשר יש ירח מלא או כאשר ס.ס.י חוצה מטה את רמת המינוס 200
אנא ערכו את התאריך רפרנס לירח לפי אזור הזמן שלכם חפשו בגוגל ''תאריך ירח חדש'.
BACKTEST RETURNS SOOOOOO GOOOOD !
הבאק טסטים חוזרים מושלמים
trade with the stars and rip markets
Bot MasterSqueeze 1.1 (crypt)Countertrend strategy for correction to the average value. The strategy is designed primarily for crypto.
The principle of operation is that with a rapid price change, the strategy tends to take a reverse position to return to the average value, which statistically often happens. It is enough for you to determine the percentage of the offset about the average price and the size of the averaging position as a percentage of the deposit.
With the settings, you determine how to determine the average opening price. It can be MA at the price of opening, closing, etc., and DCMA. Soon I will add a few more options for determining the average opening price
You can also choose the average price at which the transaction will try to close.
Now there are 3 methods:
- closing when returning to the average price
- closing on the first correction candle
- opening on an abnormally large candle in the direction of correction and closing on the first one is opposite
Search for the settings by the selection method for each pair separately. It is better to trade using signals via a bot.
The strategy shows itself best on volatile coins paired with the dollar for 1 hour or more.
Soon I will add new options for opening and closing deals, as well as determining the average price.
ATTENTION: the strategy involves averaging, so be careful with levers and overestimating the percentage of the transaction from the deposit. It is best to allocate no more than 25 percent to the risk of the transaction.
Short Swing Bearish MACD Cross (By Coinrule)This strategy is oriented towards shorting during downside moves, whilst ensuring the asset is trading in a higher timeframe downtrend, and exiting after further downside.
This script can work well on coins you are planning to hodl for long-term and works especially well whilst using an automated bot that can execute your trades for you. It allows you to hedge your investment by allocating a % of your coins to trade with, whilst not risking your entire holding. This mitigates unrealised losses from hodling as it provides additional cash from the profits made. You can then choose to hodl this cash, or use it to reinvest when the market reaches attractive buying levels. Alternatively, you can use this when trading contracts on futures markets where there is no need to already own the underlying asset prior to shorting it.
ENTRY
This script utilises the MACD indicator accompanied by the Exponential Moving Average (EMA) 450 to enter trades. The MACD is a trend following momentum indicator and provides identification of short-term trend direction. In this variation it utilises the 11-period as the fast and 26-period as the slow length EMAs, with signal smoothing set at 9.
The EMA 450 is used as additional confirmation to prevent the script from shorting when price is above this long-term moving average. Once price is above the EMA 450 the script will not open any shorts - preventing the rule from attempting to short uptrends. Due to this, this strategy is ideal for setting and forgetting.
The script will enter trades based on two conditions:
1) When the MACD signals a bearish cross. This occurs when the EMA 11 crosses below the EMA 26 within the MACD signalling the start of a potential downtrend.
2) Price has closed below the EMA 450. Price closing below this long-term EMA signals that the asset is in a sustained downtrend. Price breaking above this could indicate a bullish strength in which shorting would not be profitable.
EXIT
This script utilises a set take-profit and stop-loss from the entry of the trade. The take profit is set at 8% and the stop loss of 4%, providing a risk reward ratio of 2. This indicates the script will be profitable if it has a win ratio greater than 33%.
Take-Profit Exit: -8% price decrease from entry price.
OR
Stop-Loss Exit: +4% price increase from entry price.
Based on backtesting results across a selection of assets, the 45-minute and 1-hour timeframes are the best for this strategy.
The strategy assumes each order is using 30% of the available coins to make the results more realistic and to simulate you only ran this strategy on 30% of your holdings. A trading fee of 0.1% is also taken into account and is aligned to the base fee applied on Binance.
The backtesting data was recorded from December 1st 2021, just as the market was beginning its downtrend. We therefore recommend analysing the market conditions prior to utilising this strategy as it operates best on weak coins during downtrends and bearish conditions, however the EMA 450 condition should mitigate entries during bullish market conditions.
Chirag Strategy SMA with StopLossThe Moving Average Crossover trading strategy is possibly the most popular trading strategy in the world of trading. This strategy is a good example of so-called traditional strategies. Traditional strategies are always long or short. That means they are never out of the market. The concept of having a strategy that is always long or short may be scary, particularly in today’s market where you don’t know what is going to happen as far as risk on any one market. But a lot of traders believe that the concept is still valid, especially for those of traders who do their own research or their own discretionary trading.
This version uses crossover of simple moving averages of length 10 and 13. This strategy is best suitable for NIFTY and BANKNIFTY under 15min candlestick for intraday and 1hour candlestick for long-term.
Crypto_Troll_Turtle_StrategyTurtle Strategy for high marketcap cryptocurrencies
I'm glad to launch my strategy which is based on
moving averages / bollinger bands / RSI and volume
It's basically made for scalping with an interesting return over the last two years and a perspectively low drawdown
if you're interested in the strategy and you want to use it for futures trading you can contact me for a money & risk management rules that you can use and prevent you from a huge loss !! it's for free don't worry xD you can find my contact in the author's instructions' label
The optimal timeframe to use is 1H
I'll be trying to launch telegram signals for this strategy as soon as possible for the following pairs: BTCUSDT ETHUSDT BNBUSDT timeframe: 1H
I'm open to all reviews ! thanks !
5-8-13 EMAs Strategy (Andrew's Trading Channel)============
ENGLISH
============
- Description:
This strategy was designed by "Andrew's Trading Channel" (credits to him for the base strategy).
A lot of improvements have been added to the strategy, more conditions, trailing stop, custom stop loss and take profit, everything explained below.
- CONDITIONS FOR ENTERING A LONG:
EMA 5 crossovers EMA 8.
- EXIT LONG:
EMA 8 crossovers EMA 8 and closing price goes below EMA 13.
- CONDITIONS FOR ENTERING SHORT:
EMA 8 crossovers EMA 5.
- EXIT SHORT:
EMA 5 crossovers EMA 8 and closing price goes above EMA 13.
- Visual:
All EMAs are visible (5, 8 and 13 periods) with different and customizable colors/width.
Position start price, take profit, stop loss and trailing stop (if present) are shown automatically.
Background color shows green when LONG conditions are met (and of course, position is opened on the next candle), same for SHORT but red.
- Usage and recommendations:
As this is a coded strategy, you don't even have to check for indicators, just open and close trades as the strategy shows.
There're various customizable settings like optional take profit/stop loss, trailing stop (both based on ATR or any of the EMAs), open only LONGs/SHORTs or both, date range...
Take profit and stop loss ATR default values have been tested for scalping on 5 min charts, however feel free to check strategy results and increase the winning rate/profit for your favorite asset.
- Customization:
As usual I like to make as many aspects of my indicators/strategies customizable, indicators, colors etc., feel free to ask if you feel that something that should be configurable is missing or if you have any ideas to optimize the strategy.
============
ESPAÑOL
============
- Descripción:
Esta estrategia fue diseñada por "Andrew's Trading Channel" (créditos a él por la estrategia base).
Se han añadido muchas mejoras a la estrategia, más condiciones, trailing stop, stop loss y take profit personalizados, todo explicado a continuación.
- CONDICIONES PARA ENTRAR EN LONG:
Cruce de EMA 5 con EMA 8 ascendente.
- SALIR DE LONG:
Cruce de EMA 8 con EMA 5 ascendente y el precio de cierre se sitúa por debajo de la EMA 13.
- CONDICIONES PARA ENTRAR EN SHORT:
Cruce de EMA 8 con EMA 5 ascendente.
- SALIR DE SHORT:
Cruce de EMA 5 con EMA 8 ascendente y el precio de cierre se sitúa por encima de la EMA 13.
- Visual:
Todas las EMAs son visibles (5, 8 y 13 períodos) con colores/anchos y personalizables.
El precio de inicio de la posición, el take profit, el stop loss y el trailing stop (si están presentes) se muestran automáticamente.
El color de fondo es verde cuando se cumplen las condiciones de LONG (y por supuesto, la posición se abre en la siguiente vela), lo mismo para SHORT pero en rojo.
- Uso y recomendaciones:
Como esta es una estrategia programada, ni siquiera tienes que comprobar los indicadores, sólo abrir y cerrar las operaciones como te muestra la estrategia.
Hay varios ajustes personalizables como el take profit/stop loss opcional, el trailing stop (ambos basados en el ATR o en cualquiera de las EMAs), abrir sólo LONGs/SHORTs o ambos, rango de fechas...
Los valores por defecto del take profit y el stop loss ATR han sido probados para scalping en gráficos de 5 minutos, sin embargo, siéntase libre de comprobar los resultados de la estrategia y aumentar la tasa de ganancia / beneficio para su activo favorito.
- Personalización:
Como siempre me gusta hacer personalizables todos los aspectos de mis indicadores/estrategias, indicadores, colores, etc., siéntase libre de preguntar si cree que falta algo que debería ser configurable o si tiene alguna idea para optimizar la estrategia.
BEST Strategy Template w/ Custom SL/TP Size - EducationalHello traders
I'm getting this question at least once per week: "how to define a custom exit quantity for my stop loss and a different one for my take profit"
Instead of answering every day the same question in my DMs, I've decided to publish an educational strategy template script using this
Features
- Select to use or not the SL and/or TP
- Define how many pips/USD the SL/TP should be set at from the entry
- Define what quantity percentage you want to close at SL and/or at TP (lines 301 to 320 in the code)
- Classical custom trailing stop where the SL is moved to breakeven once the TP is hit
- Get real-time backtesting stats based on the options you've selected
Update
You might not know it yet but from last week (or maybe the week before), the qty/qty_percent from the strategy.exit function refers now to the initial position size (and not the remaining position size like before)
For example:
strategy.exit("EX1", qty_percent = 50, stop = constant)
strategy.exit("EX2", qty_percent = 20, stop = constant)
What happened before
After "EX1" reaches SL levels, "EX2" exits 20% from the % of the remaining position size.
If the initial position size = 100 contracts
EX1 exits 50 contracts
EX2 exits 20% of 50 contracts = 10 contracts
What's happening now
After "EX1" reaches SL levels, "EX2" exits 20% from the % of the original position size.
If the initial position size = 100 contracts
EX1 exits 50 contracts
EX2 exits 20 (20% of 100 contracts) contracts
I think this is an improvement and I really enjoy this new behavior.
See you in a few days with another post :)
ALL THE BEST
Dave
RSITrendStrategyI don't know if there is any strategy based on RSI cross over. The strategy is designed based on RSI crossover, considering RSI(5) and RSI(11), with RSI(6) to identify highs & lows.
I used this strategy to trade in Nifty 50 & Nifty bank indices. Whenever there is long mentioned on chart, I go for buying call option with premium near to 300, and placing stoploss of 50 on candle closing basis, vice versa.
Target is open until short is mentioned on the chart. Sometimes, i used standard pivot points as well to mark my targets and also to trail my trades.
Customizable OCC Non Repainting Scalper Bot v7.0bThis strategy is intended to be used on an automated trading platform and should be run on a one minute chart for fastest confirmations and signal relay to crypto automation platform. The strategy has been modded to only go long at this time to focus on profitability for one direction. The open long and close long text fields allow you to use your own webhook message for this purpose.
I have spent quite a bit of time and I figured I would put it out to the community to share the work and also get some feedback.
Ok, so let me say that I have done absolutely everything I can to make the strategy not repaint while still maintaining it's profitability. It has been a challenge so I am publishing this to the community to help test this.
What I have observed: the strategy will not repaint in real time. That is, if you have the chart open and keep it open, the signals are the same as the ones that are sent out by the strategy. In certain cases, when I reload the chart- the signals might be off from what was sent. In some ways, that is repainting, but it is repainting based on losing the real time data and recalculating from a different set of bars- since I am running it on a one minute chart then the start becomes different when you refresh.
To address repainting while keeping the strategy calculating as quickly as possibly I have altered the logic in the following ways:
I have made an assumption which might not work for everyone- at the first tick of the next bar, you can almost safefly assume in crypto that if you are looking at the previous bar for information, the open of the current bar was the close of the previous bar. This for the most part holds true in crypto with good liquidity. If you are trading a pair that jumps around due to low volume- this might not be the strategy to use. I might publish a different version with a different logic.
I have altered the security repaint to use isbarconfirmed, so at the very end of the bar (as soon as the bar is confirmed), we recalculate to the higher time frames. So as soon as the data is available, it is at that point that we can then safely calculate higher time frames. This is unique and experimental, but seems to do well at creating good signals for entry.
I have employed my own intervals by utilizing the resolution as an integer (used by the previous authors)- but in this case, I use the interval to take a snapshot of the higher time frame. With open close cross, the different moving averages can cause the repainting as they change to show the exact point of the cross. The interval feature I created minimizes this by utilizing the previous bar info until the interval is closed and then we recalculate the variants. You can use the interval offset feature to denote which minute is the one that starts and ends the interval. So for instance, Trading View uses minue 1 and minute 31 for 30 minute intervals. If you offset your 30 minute interval would start on minute 16 and do its calculations based on the last 30 minutes,
As with most of my scripts, I have started using filters and a "show data" feature that will give you the ability to see the values of indicators that you cannot plot in the overlay. This allows you to figure out how to filter losing trades or market conditions.
I have also added a trailing stop and created a fixed stop loss as seems to perform better than the original occ strategy. The original one seemed to repaint enough that it would close too quickly and not give the posiition enough time to become profitable. In certain cases where there was a large move, it would perform well, but for the most part the trades would not close profitably even though the backtest said that it did - probably due to the delay in execution and pinescript not having a confirmation on what the actual position price was.
This is still in beta mode, so please forward test first and use at your own risk.
If you spot repaint issues, please send me a message and try to explain the situation.
Road To DubaiROAD TO DUBAI
Useful for daily trading over all type of asset, from Stock to Crypto, Forex and Commodities. It works best with 5min to 1hr graphs, if you are a intraday trader.
This is not a simple mashup of indicators, because you can add them as your own.
This script is more like a tool to understand price action based on indicators position . Thanks to cross call based on MACD , RSI with EMA applied and few index realtime mapping, this tool will let you reduce time effort for graph analysis .
As extra feature it will let you to try different strategies , all fully customizable.
I've tried my best to keep it readble, and easy to use. The best way to learn to use it, is to disable all features from configuration and try one by one.
CONFIGURATION TIPS : Click "Settings Gear" in the Upper Right Corner and disable "Indicator Arguments"
HOW TO PROPER SETUP
Road to Dubai 3 is semiautomatic on finding best Long and Short areas, and plot on the chart.
From configuration menu you can set a Backtrace period and sensibility for RSI EMA10, RSI EMA80 and MACD on your Timeframe, 5min, 30min, 60min.
Usually when configured, those parameters works fine on almost every asset.
You only need to start understanding signals.
STANDARD FEATURES
VWAP : Green/Red line. It will reset everyday at 00.00.
EMA80 : White Line
BLUELINES : Positive and negative overextend value from VWap . This is based on a range of bar and it will extend on the opposite side the lower or higher candle. Useful for understading where price can arrive, expecially if a spike will appear.
Those indicators are quite useful for understading trends, price positions and maximum price range.
RSI EMA10 OVERBOUGHT / OVERSOLD
Yellow arrow marks where RSI arrived at his Top or Bottom. If on different timeframes (5min, 30min and 60min) something similar happen area is filled with Red or Green.
This is base on EMA10 applied to RSI (I usually refer at it as Yellow Line on my indicator HighFreq Trader)
To find good values please try High Freq Trader 1.3
RSI EMA80 CALL
Red Cross or Green Square advice for a really potential inversion of trend. When a Silver bar appear, this means the same call was triggered on different Timeframe in the sametime.
This is based on EMA80 applied to RSI (I usually refer at it as Blue Line on my indicator HighFreq Trader).
To find good values please try High Freq Trader 1.3
MACD CALL
Based on MACD with standard settings. When triggered, a lime Triangle appears. Differents size based on timeframe (5min smaller, 60min bigger). If the same call is triggered on the same place a Lime Bar appear on the opposite side of trend (this is a graphical contents, bacause with all enabled, standard use, can be difficult to read signals).
In Menu Settings you will be able to set your best parameter for your asset.
MACD FIBONACCI EXTRA FEATURE
If you want you can enable a Fibonacci draw based on MACD . This works at his best (on my opinion) with 30min MACD
EXAMPLE
NATURAL GAS
In this chart 30min you can see all calls triggered for a Short. Yellow RSI Arrow, Red Cross, Macd Triangle and Colored Red, Lime and Silver Bars are all calling for Short.
In this way you can see in notime if this can be a perfect moment for take position
VIX VXN DXY CALLS
If VIX , VXN is triggered a small Green Dot will appear. If both are in the same time a bigger Dot appear. Very useful to find trend inversion.
If DXY is triggered a Red Dot will appear (only on Daily Chart ). Very Useful to understand trend inversion on whole market.
VOLUMES REMINDERS
Find if there was an High Volume traded (HV) or Low Volume Traded (LV) in the near past. Useful to understand if some tricky situation could happen (like a sudden sell, an accumulation or distribution)