Density & Step Grid Strategies BacktesterThis contains several signals for backtesting strategies only in binance futures assets.
HOW IT WORKS
Grid trading is a trading strategy where an investor creates a so-called "price grid". The basic idea of the strategy is to repeatedly buy at the pre-specified price and then wait for the price to rise above that level and then sell the position (and vice versa with shorting or hedging). We introduce 2 grids trading algorithms "Step" and "Density" .
FEATURES
Grid size: This algorithm has a max of 20 orders.
Take profit: The trader can increase or decrease the distance between the grids from the User Interface panel, is the the distance from average price.
Management: The algorithm distributes the capital for all orders depending on the amount fator, for example 1.1% of amount factor adds 10% over the previus order.
Stop Loss: The algorithm place the stopn using distance from the last lower / upper grid depending on the position side.
USES
Indispensable research and backtesting tool for those using bots for their investments. The algorithm produces a backtesting of the strategy for past history. It is used by professional traders to understand if this strategy has been profitable on a market and what parameters to use for bots using this strategy, only binance futures assets supported.
If you would like to develop your own algorithm with customized conditions based on a grid strategy, please contact us.
If you need help in using this tool, please contact us without hesitation.
Search in scripts for "profit"
Dynamic length MA Strategy [Dynamic Signal Lab]Dear TV'ers,
Hereby the strategy for the dynamic moving average crossover, with some flexible taking profit options.
All moving averages have the option to dynamically change lengths and different source options. They include:
* Hull MA
* volume-weighted Hull MA
* Simple MA
* Money Flow Index
* Chande Momentum Oscilator
* Arnaud Legoux MA
* Weighted MA
* Linear regression
What makes this strategy special is the fact that you can dynamically shorten the length of moving average length depending on how much you are in profit. The more you are in profit, the shorter the length of the MA will become.
The current default properties should be modified to make this strategy cost-effective, but typically 30minutes and higher timeframes seem to work well for larger (top10 cap) crypto projects. Dont use this script for small-caps as it will get you rekt.
Additionally, you'll also be able to continuously take profit, making sure you lock in all those sweet profits.
Use this script for doing backtesting and the indicator compagnon to fire your alerts.
MilleMachineHello traders,
I hereby present to you the second stage of my journey to finding a reliable, profitable trading strategy.
The "Millemachine" is based on the "Millebot", my previous published strategy. This means the backbone of the strategy is still the same: a trend following system. Instead of using a fixed TP and SL, a trailing stoploss is now used. To limit the losses when the trend weakens, the trailing stoploss automatically gets smaller, as it is based on the ATR.
A new utility is you can now easily switch between indicators on which the decision making is based. This allows the user to discover which indicators work best for entry, long/short switching and stoploss configuration.
The strategy has been proven to be very profitable in trending markets, but can suffer losses during ranging market. To make the system more robust, the strategy cannot solely rely on a trending system. Other systems must be added.
I believe that a good trading bot must consist of more than 4 different strategies, based on different systems. This is what I am currently working on.
My goal for publishing this strategy is to help other traders build their own. In my journey I found it difficult to find a good strategy that employs a decent risk management, which is truly essential for having good, consistent results. Also, a realistic commission needs to be defined to have a realistic performance prediction. This weighs on the profitability and therefore is often set at 0 by authors of other strategies, which I find misleading.
If you have found this strategy informative or useful, please leave a comment.
Greetings Michael
TICK strategy for SPY optionsImportant notes:
1. This strategy is designed for same day SPY option scalping. All profit shown in back testing report is based on Profit/Loss (P/L) estimates from trading options with approximately 6 months of data. By default, it is set to 10 option contracts. By default the initial capital is set to $5000. Pyramiding is set to 3.
2. This strategy works better with non-extended market data.
3. This strategy is mainly developed for SPY trading on 5 min chart, it probably will not be very profitable with other tickers or time frame without tweaking all the parameters first.
4. This strategy will work with QQQ as well, but please adjust the profit multiplier to match the P/L of QQQ options.
How it works:
When trading the indices, many rely on the TICK for market directions. This strategy is a trend following strategy that uses a combination of conditions using the following indicators:
- TICK
- RSI
- VIX volatility index
- EMA
For entries, the conditions are:
1. TICK moving average crossover with a delayed signal line
2. Bullish or bearish RSI signal, RSI > 50 for bullish, < 50 for bearish
3. VIX must be above a certain threshold to take advantage of high market volatility
4. Price must be on top of EMA line for long, and below for short
For exits, there are 3 scenarios:
1. Stop loss set by a percentage of the daily ATR value
2. Trend changes on the TICK and the RSI
3. Bearish or bullish divergence on price with TICK
This strategy automatically signal to close all trades at 3:50 pm EST at the end of the day.
Extras:
- There is an option to show P/L for reinvesting profits
Enjoy~!!! Let's all make $$$
Cyatophilum Accumulation StrategyAn indicator to backtest and automate accumulation/pyramiding custom strategies.
The goal of the strategy is to buy several times when the price is low and sell all when the position is in profit.
Configure your strategy using the entry options and entry filters, then set your Take Profit and StopLoss.
═════════════════════════════════════════════════════════════════════════
█ HOW IT WORKS
The strategy has pyramiding enabled, which means it can open several deals in a row.
It will keep buying until the Take Profit target is reached.
The indicator plots the Take Profit and Break Even line which are recalculated at each new deal.
The target corresponds to the average entry price plus a configurable percentage.
We can see the average entry price line drop lower at each Long Entry.
█ HOW TO USE
Choose a pair that you want to hold/invest in.
Pick a chart time frame that you like, according to how often you want the strategy to place orders. A benefit of this strategy is that it can work on low time frames as well as high time frames. Just keep in mind that the smaller the time frame, the bigger the impact of fees and slippage will be on the strategy results.
Configure your entry condition . You can combine several technical indicators to trigger an entry, such as Top & Bottom, Higher Lows and RSI divergences.
Example with double bottoms:
Filter your entry signal . Add filters to strengthen your entry signal.
Configure your profit target
Use the Take Profit feature to set a target in percentage of price. You can also make it trail.
There is a Trailing Stop Loss feature but the goal of the strategy is to never sell in loss, so it is turned off by default.
Check your backtest parameters
Make sure that the initial capital and order size make sense. Since it is a pyramiding strategy, the sum of all deals should not be bigger than the initial capital.
In this example: Initial capital is 10 k, max active deals is 10, so the max order size is 1 k.
If you use % equity as order size, please note that it will create compounding.
Check the fees, by default they are set to 0.1%.
I also recommend to set a slippage that corresponds to your exchange's spread.
Note: the pyramiding parameter has to be equal to the "Max Active deals" input.
█ FEATURES
• Entry settings
Configure wether to go long or short, or both.
Choose the Max Active deals : the maximum number of deals that you want to open at once.
The Minimum bar delay between deals parameter will help putting space between deals.
• Trend Filter
The trend filter will fitler off long deals when the trend is bearish, and short deals when it is bullish.
Choose a trend line from a list, or any external trend line you can find.
The Trend condition allows to choose wether the trend should switch from slope change or price cross.
• MTF Trend Filter
A secondary trend line, Multi Time Frame.
• Volume Filter
The volume filter will check the bar volume and prevent the entry if it is too low.
• Stop Loss and Take Profit
Configure your stop loss and take profit for long and short trades.
You can also make a trailing stoploss and a trailing take profit.
• Backtest Settings
Choose a backtest period, longs or shorts, wether to use limit orders or not.
An option to close open orders at the current bar if you have multiple open orders and are wondering what it would result to close them now.
Graphics
A Configuration panel with all the indicator settings, useful for sharing/saving a strategy.
A Backtest Results panel with additional information from the strategy tester.
█ ALERTS
The indicator is using the alert() calls: it only uses 1 alert slot to send order messages for each event. This means free TV plans can create 1 complete strategy.
To set your alert messages, open the indicator settings and scroll to the bottom of the "inputs" tab.
Create your alert after you set the messages in the indicator settings, and make sure "Any alert() function call" is set in the alert option.
█ LIMITATIONS
Things to keep in mind when using this strategy.
• No Stop loss
When trading without stop loss, your equity can drop without limit, and it can take a while until price recovers.
This is why when backtesting I recommend to keep an eye on the "Max # Days in trades" statistic which tells the maximum days a trade took to close in profit.
• Spot markets only
Obviously, trading without stop loss means no leverage.
█ BACKTEST RESULTS
The backtest settings used in this snapshot are the following:
Initial Capital: 10 000€
Order size: 1 000 €
Commission: 0.1€ per order
Slippage : 10 ticks
Please read the author instructions below for access and automation.
Heikin Ashi+RSI+EMA Strategy 2.0 v4 [Cryptocurrency] by GodtrixHi,
I know a lot of people are looking for a more sophisticated and customizable strategy tool, I'm facing the same problem too, so I created one for myself and decided to share it for free trials and if you think this tool do what you wanted, you can contact me for the subscription "Premium" version.
I'll keep it simple with point forms, if you have any further inquiries or questions, please feel free to message me. Thank you.
Best profit plan with this strategy is you trade on Future leverage while you hold on to your coin, so that when price goes up, your coin value goes up, and at the same time, you trade with your leverage to earn even more, easily doubling up your total profit.
Benefits:
Fully customizable and you can easily personalized it and FINE TUNE it according to the market or coin you trading on.
The strategy is based on REAL PRACTICAL trading skills, so it works in real-world.
I fixed the "repainting" issue so the backtest it shows you IS ACCURATE when you run for real-time.
We all know one indicator is not going to help you win your trades, so this strategy combines ALL three: EMA for long+short term trend, HA for short term trend, RSI for entry/exit
This strategy is designed for LONG trade (Buy low, Sell high), not for SHORT trade.
This is not day trading, it is more to mid-term trading, where there's only few trades per month
Mainly is coded to work with 3Commas bot auto trading, so you only need to key in your Bot ID & Email Token.
Bot trading NOTE:
You need to replace the Alert Message with this: {{strategy.order.alert_message}}
One Alert will work for both Buy and Sell Order
If you using other Bot service, you can enter Custom Command too, so it works on any bot service.
Lastly,
regarding the setting advice, I would say you try playing with different settings and your objective is to achieve a backtest result that has:
1) Profitable is > 80%
2) Losing trades is nearly 0 or below 25% of your winning trades. Trick is using far stop loss %
3) Net Profit be almost same or more than "Buy & Hold Profit"
If you interested in our subscription version, message me for price.
Best Luck & a million dollar profit to you,
Godtrix BITSTAMP:BTCUSD BINANCE:DOTUSDT
Conservative scalping incomeThis fully automated scalping strategy aims for an 10-12% annual return using LONG positions only (i.e. no SHORTs), with 2 to 1 number of winning trades and 1.5 to 1 avg win amount vs avg loss amount. It should generally make from zero to four trades per day depending on market conditions. It should remain in a position for roughly an hour. It leverages numerous indicators, including multiple moving averages, ADX, and MACD.
Note that this strategy does not try to time tops and bottoms. Rather it waits to clearly identify a trend, and then rides that trend for a short while making a defined profit. Thus it may enter and exit a trade under profitable conditions, but not at the most profitable conditions possible. It gets in when it's sure of the trend, and then generally leaves that trend as soon as a defined profit is made or before a meaningful loss is incurred.
This strategy will work well with any index (e.g. SPY) and most stocks. It works best on a five minute time interval and when the index or stock is either generally increasing over time or bouncing back and forth between a medium to wide range.
AlphaScalp [Backtest, No RealTime]AlphaScalp tries to find volatility moves and profits from the small pullbacks.
Even though the performance of this script in a fair amount of cases will beat HODL it is not the purpose. AlphaScalp aims for a high accuracy and profitfactor to ensure a more or less stable profit taking.
The properties like " MA Length " and the " Short - " or " Long line % " tweaks the risk by increasing or lowering the requirements for a buy (Long or Short). Close/Exit of each order is then handled by TP, SL or volatility stop.
For high volatility assets it is recommended to use the " Sell LONG on Volatility DOWN " and " Sell SHORT on Volatility UP " to ensure a TA approach for StopLoss. Normal SL is also possible to set but is not recommended on high volatility assets since you quickly can be stopped out by wicks.
AlphaScalp works best on high volatility assets with a solid liquidity and volume - but it will also work on stocks and low volatility assets.
AlphaScalp is designed for scalping and is thereby recommended to use between 5M-1H.
This version is free for your to backtest on all assets - but be aware that alerts on RealTime bars are disabled - meaning you can add alerts but they will not trigger in real time. To ensure you have the latest backtesting results, you need to have the script added to your chart, save your chart and the refresh the page.
Enjoy and please let me know if you have any questions
Alpha Candle Breakout Signal on Momentum from Support Resistance
Hello traders,
Let’s start with a brief description of what this strategy/indicator is and what it does and how we trade based on Alpha Candles.
The definition of an Alpha Candle is that it is mathematically calculated, and significantly bigger than the previous candles. This could be a green candle or a red candle, as long as the body is significantly bigger than the previous candles at the end of the calculation. All calculations are done in real time, we do NOT paint the candle sticks after the close of the candle and do not use offset values. This is extremely important. You will see the candle changing it's color as the body of the candle gets bigger with real time data feed. (Recalculate On Every Tick is ON by default). Now besides the mathematical calculations, an Alpha Candle also represents the emotion in the market for that stock in that moment. We can also say that an Alpha Candle is a change in the momentum.
Now that we’ve identified the Alpha candle, the second step is, to have a look at the chart and identify if the Alpha candle is breaking to a new high / low from a consolidation period, or from a good chart pattern (ascending / descending triangle , pennant , sideways consolidation) or a sudden direction change of the stock (bounce). Remember, the script will paint all Alpha candles regardless.
NVAX day trading example
Forex
Crypto
PLUG (Bounce example)
The script will identify the Alpha candles that are breaking to a new high / low from a user input look back period (default is 20 bars back, but this can be changed by the user input). An Alpha candle that breaks the look back period, will have a stop loss line below for Green Alpha or above for Red Alpha Candle and reward targets, like target1 or target2 (both are user input fields, can be adjusted to personal R values, default values are 2R and 3R)
A 2R means two times the reward (profit) of a 1-unit risk. If you are comfortable of loosing $50 per trade which will be considered 1-unit, then 2R means $100 reward (profit) target and a 3R is $150 reward (profit) target. Those R values will be plotted and/or labelled on the chart with dollar amounts if desired. You can change your R values from the user input area, even with decimal points, like 2.5R or 3.75R. If you shoot for at least 2R, you could be wrong 6 times out of 10, and still make 2R profit, as long as the other 4 trades give you a total of 8R. This is a basic trading concept. It will force the new traders to focus on risk/reward rather then a gambling attitude.
The script is meant to work with candle stick chart patterns only, it is NOT meant to work with ranges, line charts or point and figure charts. It will work with time frames like (seconds,1,2,3,5,10 minute or any minutes, daily, weekly). If you are trading IPOs , there might not be enough data for the script to do the calculation, so just be aware.
The script will identify the candles if they are Green Alpha (going up, bullish ) or Red Alpha (going down, bearish ). In order to see them clearly, we’ve greyed out the rest of the candles, and made Green Alpha candles white, and Red Alphas are left as red. You can change the colors from the user input area.
There is also a look back period, between 1-55 and the initial value is 20 for Green Alpha and 10 for Red Alpha. So, if the Alpha Candle breaks this look back period, it will be considered as an opportunity to take the trade. The code will put the stop loss area, possible target1 and target2 areas with a blue diamond and will draw the resistance/support lines for that Alpha candle. Depending on the individual’s risk tolerance, a label on the right side of the screen will show the risk tolerance (user input value) and the number of shares to be traded based on the risk tolerance (# of shares will be for the last Alpha Candle that is formed, it will constantly update itself with the new Alpha Candle)
For those who might be familiar with the three-bar play, we implemented something similar, so the code will find them in real time. Once an Alpha Candle is formed, if the following candle is a very small candle, also called pin bar , it will be painted to orange, so you can see it clearly. This pin bar is significantly smaller than the previous candles and formed right after an Alpha Candle.
Like anything in life, nothing is free. Meaning you have to work for it. So if you are looking to buy/sell blindly based on some indicators and signals, please do not consider this script. However, once you start using it, you will see how patterns repeat, when they repeat and how they repeat. It will identify the action, but you have to check the validity from the charts, so user discretionary is advised. As an example, if the Alpha candle is breaking from a consolidation period at $10. Let’s assume stop loss is at $9 so the 2R target will be $12, but if there is a possible resistance at $11, then the trader has to decide to take the trade for a possible 1R return, or skip the trade.
We try to approach the trading as a set of rules and processing the trades one by one, with a calculated risk and reward. This script will give you the Candle stick formation that is worth consideration and will draw the Stop Loss area (you can tweak this to your liking), will draw the 2-3R Targets, and will calculate the number of shares to be purchased based on the Risk Tolerance user entered in the user input area. The rest is to let the trade take care of it self.
Charts and patterns work better, when there is enough volume in a particular stock. If the stock is trading very low in volume , things will not work as expected. So, we must focus on the abnormal stocks, like gap gainers, volume gainer stocks, or heavily traded stocks (for intraday trading). For swing or long-term traders, one could look for a Green Alpha candle, assess the risk and possible return and trade the plan on a daily chart pattern (long term), or 15,30,60 min charts for swing trades.
If you are looking to short a stock, look for stocks that are weak (gap downs), so look for Red Alpha formations in that stock.
Once the back testing is turned on, code will generate buy/sell signals, otherwise it will work as an indicator. But please keep in mind….. For day trading, the stock has to be abnormally trading, so the chart patterns and the Alpha Candles work correctly. Volume has to be more than usual. It is the best way to have predictable results for day trading. If the volume of the stock is 2-5 times or more than the average of 20 days period (early in the morning), and even more later in the day, it is a good indication that the stock is trading on an abnormal volume with some news (pre-market abnormality is a good sign for possible abnormality for that stock).
For back testing, user can select from the user input area :
• Long or Short Trades or both or use the script as an indicator
• Close any open position if an Alpha candle forms in the opposite direction
• Pyramid the trades up to 4 levels (allow to buy/sell 4 times in the same direction every time another Alpha Candle forms)
• Breakout/breakdown look back period (every time an Alpha Candle forms and breaks this look back period, it will be a trade opportunity)
• Target Reward areas
• Stop Loss area
• Time frame (change the time frame and observe which time frame made good profit. Test the plan for future trades. Test it in as many abnormal stocks for the day they were behaving abnormal as possible). Time frame is not a user input field, just the time frame of the chart, 2,5,10 min, 1 hour etc.
• Selective date testing (between two dates/times). This is very important as most of the good opportunities comes from abnormal price action with volume . If you back test with the maximum amount of data for that abnormal stock on that day, it will produce unrealistic results, because the stock will have a normal course of trend before the news. Remember, we are looking for stocks that are trading abnormal in both price and volume or stocks like AAPL , TSLA which are trading heavily on each day. It is also a good way to learn, how and when to buy/sell, where to put stop losses by observing the chart with the Alpha Candles showing the results.
• All the above values will have an impact on the total profit / loss.
F (Ford Motors)
Now that we’ve covered what the script does, let’s plan the trade and trade the plan.
Side Note:
-------------
We started coding this as an indicator to show the Alpha Candles to find opportunities in the market. Later in the development, we implemented it as a Strategy, to be able to back test the ideas, to tweak some rules for entry/exit and see the effects on our profit/loss percentages in general. We kept the original idea being an Indicator, to show us the Alpha Candles in real time. This requires the option “Indicator Mode” is to be selected from the User Input area, and leaving the “Recalculate On Every Tick” is selected from the Properties tab of the strategy (as of Pine Script v5). Strategy is turning this “On” by default.
Disclaimer: This script is an educational and personal use only tool and should be used accordingly. User can not publish any images created with this code. Do your own due diligence, do not buy / sell stocks based on any indicator, always use stop losses. We do not make any promises as this indicator or any indicator will make you a profitable trader. Trading and technical analysis is difficult, it takes time to build confidence and experience. Study the charts and candlestick formations. Study support/resistance areas and how to identify them. This will help you to tweak the script’s stop loss areas and 2R-3R targets. Do not invest any money you are not comfortable loosing.
This is an invite only strategy. We will give ample time to test it out. After that you will need to subscribe. To get access to this strategy trader can send me an email from the links below.
All the Best
Happy Trading
when bull D timeframeEcco a voi la mia strategia basata su atr con implementazioni personali per definire facilmente la condizione di mercato su btc e eth, come potete vedere punta ad identificare solo le salite più importati ignorando i falsi segnali che avvengono nelle fasi di bear market (o di incertezza). Da utilizzare con timeframe D.
Condivido una versione disponibile e funzionante gratuitamente fino al 31/12/2022 dopo tale data lo script tornerà a pagamento.
Here is my strategy based on atr with personal implementations to easily define the market condition on btc and eth, as you can see it aims to identify only the most important climbs ignoring the false signals that occur in the bear market (or uncertainty) phases. For use with timeframe D. I share a version available and working for free until 31/12/2022 after that date the script will return not for free.
Stay Tuned
Up/Down Strategy - ContrarianThis is a consecutive bar up/down strategy for going long when the short condition is met or going short when the long condition is met. This is known in trading as taking contrarian signals and is helpful when an asset can provide only losses with a given strategy. In theory taking the opposing trade should produce a profit. With this strategy you can specify how many bars down to enter long and how many bars up to enter short. It also has code to check and make sure the condition is still true when launching the official alert, which helps back testing and live results line up, however be sure to enter commission and slippage into the properties to accurately reflect profits. I added back testing date ranges to this so you can easily pull up and see back tested results for a certain date range. I also added a buy and sell messages, close messages and take profit/stop loss message fields in the properties so you can launch alerts that will work with automated trading services. Simply enter your messages into those fields in the properties and then when you create an alert enter {{strategy.order.alert_message}} into the alert body and it will dynamically pull in your buy and sell messages when it fires alerts. I also added time restriction so you can enter trades only during the time frame specified. You can change it to any time frame, such at 0930-1600. Set the time restriction field to empty by default since otherwise the strategy won't take all trades like normal. So to enable time restriction enter a time frame in the format 0000-0000. I also added the ability to check off a box that will close the open trade at the end of the time restriction. So if you set the time frame to 0930-1600 and check off to enable close trade at end of time frame then it will look to exit the trade at the close of the next bar.
Zero-Lag HMA Backtest v1.0 [loxx]This backtest compares profitability differences between a regular Hull Moving Average ( HMA ) and a Zero-Lag HMA .
Things to know:
- Profit is set to 1 ATR
- Stop-loss is set to 1.5 ATR.
- This is by design to test the minimum the profit scenario (1 ATR up) and the worst case loss scenario (1.5 ATR down) for momentum trading. Actual results vary when additional TPs are added
How to use:
- Adjust settings and dates to view different market structures and position scenarios
- See results in the "Strategy Tester" pane
Conclusions and what's next
- Modifying HMA does very little to improve backtest results
- Future iterations will include options to backtest various moving averages with additional modifiers to improve profits and avoide losses
Comment below or send a PM with questions, comments, observations, or concerns.
MacD Short and/or Long with Bi-Directional TP and SL This tool allows you to test any variable value for MacD and Signal for going Long or Short with each market direction having customizable values for stop loss and take profit.
For example, sometimes the MacD and Signal values are better with different lengths between Short and Long. You can use this tool to see them overlaid and determine the best settings for going one direction or the other.
This script was preset for use with XBTUSD on the 4 hour time frame. Another example with this in mind, is take profits and stop losses might not work in the Long market direction but going Short does! Without this tool that would be hard to see since typically stop loss and take profit is applied to both directions. I found with this tool that a 20% take profit seems to be a good sweet spot for going short with this strategy.
You can customize which MacD histogram you see by going to the style section and turning off the Short or Long parameters so you can see only 1 histogram at a time if you wish.
If you have any questions, please PM me.
CryptoNite - Machine Learning Strategy (15Min Timeframe)Greeting Traders! I am back with another ML strategy. :D I kept my word with combining my machine learning algorithms from Python and integrating them into Tradingview. Thanks to Tradingview's new release of Pinescript v5 it is now possible. This strategy respects the Sortino Ratio and was created using 2 years of data for 50 different cryptocurrencies. That is a total of 100 years of data and 44,849 trades to create this strategy. Now let me tell you, my computer and I are exhausted. We both been at it non-stop for about two months everyday. I refine the strategy, and the computer runs 24/7 for a few days to spit out the best results into the terminal. It's been a good run so my computer will finally get some sleep tonight.
So let's talk a little about the features of the strategy. In the settings window, you'll see the Stoploss, Take Profit Parameters, and Date Range. You can change the Date Range, but I recommend to leave the SL/TP parameters how they are because the machine learning algo chose those input. If you wish to change them you are always welcome to do so but backtest results will change. For the Take Profit parameters you'll see on the left side you something labeled time duration(displayed in minutes) and on the right side you'll see take profit values. Let's talk a little bit how they work.
TP_values = {
"0": 0.102,
"133": 0.051,
"431": 0.039,
"963": 0
}
In python, the table looks like this but it is quite easy to understand in Tradingview.
From 0-133 minutes, the strategy is looking to the reach target point 1 at 10.2% profit.
From 133-431 minutes, the strategy is looking to the reach target point 2 at 5.1% profit.
From 431-963 minutes, the strategy is looking to the reach target point 3 at 3.9% profit.
From 963+ minutes, the strategy is looking to break even at 0% profit on target point 4.
Through each target point a sell trigger is active. It will look for the best time to sell even if TP has not been reached.
This helps the trade not stay open too long.
The last thing I need to mention is the textbox displayed on the right side of your chart. This textbox displays the current Take Profit value in dollar amount. So when you're in a trade you'll know what TP target has to be reached when the open trade is active. Throughout time, the target price changes depending how long the trade has been open. If you have any questions feel free to comment down below, and enjoy this strategy!
[astropark] Trend Skywalker V2 [strategy]Dear Followers,
today I'm glad to present you Trend Skywalker V2 , the evolution of Trend Skywalker V1 indicator that you can see here below:
This indicator works on every timeframe and market, it's quite responsive to market movements, so it's especially good on volatile markets.
In this new version you have 3 trend clouds available :
a short-term one (yellow)
a mid-term one (green)
a long-term one (blue)
You can also enable an option to show all trend clouds as one, the result will be similar to a special bollinger bands tool.
Of course you can edit trend clouds analysis period and color, also you can turn on or off the cloud that you prefer.
The indicator can run 4 different kinds of strategy : one for each trend cloud individually or a mixed one.
Also the indicator tracks for you a peak profit from entry: this tracker is a suggestion for you to take profits while price goes up!
All red-green circles you see in the chart is a reminder that a peak profit label was there in the past: what does this tell you?
if price starts losing the short-term trend and you had a lot of TP suggestions, maybe trend ended and you should start consider closing your trade before you give back all your profit.
On backtesting you can you test long and short setups individually or both, as well as performance in a specific time window.
This is a premium indicator , so send me a private message in order to get access to this script.
Ultimate Bollinger Bands by @DaviddTechThis strategy uses the Ultimate Bollinger and Aroon indicator.
The logic behind the code is
* Enter long :
Aroon up is below the 20 or lower line in settings.
Aroon down is above 70 or above line in settings.
When close crossover the lower Bollinger Band we take an entry
SL is %
TP is % of if Aroon up is below the 70 or lower line in settings.
Aroon down is above 20 or above line in settings.
When close crossover the upper Bollinger Band
* Short :
Aroon down is below the 20 or lower line in settings.
Aroon up is above 70 or above line in settings.
When close crossunder the upper Bollinger Band we take an entry
SL is %
TP is % of if Aroon up is below the 20 or lower line in settings.
Aroon down is above 70 or above line in settings.
When close crossover the lower Bollinger Band
Settings I used to get the results below :
====================
** Ultimate Bollinger Bands by @DaviddTech **
====================
Enable Repainting? = False
Enable LONG entries? = True
Enable SHORT entries? = True
lengthBB = 20
Source = close
StdDev = 2
Offset = 0
Aroon Length = 14
Aroon Enter upper band = 85
Aroon Enter lower band = 5
Aroon Exit upper band = 70
Aroon Exit lower band = 20
Restrict Entries to Date Range? = False
From : = 1611100800000
To : = 1613779200000
Show Liquadation line (BETA) = False
Leverage Amount = 25
Maintenance Margin Rate = 0.5
Type of Exit / Entry = Enter New Trade Only if NO running Trades
Type of Take Profit = Custom Stoploss
Type of Stoploss = Custom Stoploss
Stop Loss % = 4
Take Profit % = 6
Highest High lookback = 50
Lowest Low Lookback = 60
Profitfactor Long (Risk to Reward) = 2
Profitfactor Short (Risk to Reward) = 0.5
Stoploss Factor: LONG = 4
SHORT = 4
Profit Factor: LONG = 2
SHORT = 2
ATR Length = 11
Length = 200
Source = hlc3
Multiplier = 3
Level = 764
Take Multi Profit X3 = False
% to take at First TP = 33
% to take at Second TP = 33
% to take at Third TP = 100
Use Strategy Alerts? - Please read the tooltip = False
Show S/R Levels = False
Use MFI + RSI = False
RSI Source = close
RSI Length = 14
RSI Oversold = 30
RSI Overbought = 60
MFI Period = 60
MFI Area multiplier = 150
MFI Area Y Pos = 2.5
Use vWap = False
vWap Source = close
vWap2 Source = close
Vwap Length = 3
EMA Breakout = False
EMA Length = 100
Use MTF EMA cross = False
MTF = 5
EMA Period = 5
MTF = 5
EMA Period = 30
WARNING:
- For purpose educate only - My mission is to debunk fake strategies with code to find THE ONE.
- Plots EMAs and other values on chart.
- This script to change bars colors.
If you have any questions or feedback, please let me know in the comments.
MarketGod for Tradingview(strategy)Fully Open Source Tv Market God Strategy. Good Luck
Strategy Description
MarketGod can be applied to any market, with any time-frame associated to it. The signals relay the alert at the close of the period, and the painted alert is then available to users to see on the chart or even set notifications for via tradingview's alert system. We recommend that users implement marketgod on their preferred time frames for trading, which for us is the 1h, 4h, 6h, 1D and above TFs.
MarketGod Versioning
The versions included with this release are the following
MarketGod v1
MarketGod v2
MarketGod v3
MarketGod v4
MarketGod v5
MarketGod v6
MarketGod v7
MarketGod v8
MarketGodx²
Ichimoku God
Suggested Uses
• MarketGod will inevitably produce false positives. We've taken steps to reduce this but we highly suggest you add this as a component of your strategy, not an end all be all
• That said, please do not feel the need to fire a trade based solely on a marketgod signal, or to every signal it fires.
• MarketGod users should backtest their strategy using OHLC candles for best results
• Heikin Ashi candles were recomended in the past, and we have eliminated the need for them, meaning that traditional candlestick inputs will yield the highest results.
• MarketGod will always give stronger alerts on higher TF's. If the 1-Day has fired a given signal and the 30 min or similar fire the opposite signal, know that the overall trend is still likely downward. Same concept applies to all timeframes on this tool.
Adjusting the Filter Settings
This tool has a noise filter for users to adjust.
The filter is a percentage based calculation, between significant points in time. The filter ranges between .5 and 25, with .5 increments
• For lower TFs ( IE Intraday), keep the filter set between .5-5
• Mid-TFs (4H,6H,12H,1D), the recommended range is between 5.5-10
• Higher TFs (3D and Higher), look for approx 11-20 range
Customizations
Customize the indicator by adjusting the colors in the style pane. Additionally, users can change the plots into labels with the price of close added to them, or a few other label text options, listed in the 'inputs' panel, below the filter adjustments. Users can also opt to turn the strategy orders as well, as this version will have them printed.
Strategy Performance Interpretation
Its important to understand the only metric that should be relevant is not the win %, as many may initially think. Alternatively, the only metric that matters in the end is your take home profit... meaning the profit one fees and taxes are accounted for. In our example here, the % brought back since the beginning of our window of 2018 is around 47% for $10,000 initial capital and 10% traded per position. Many are ignorant to the take home profit aspect as they focus solely on the winning %, which is ultimately incorrect approach to trading as a whole. as long as we maintain +30% (our goal minimum), the outcome being in the green, is our goal.
Optimized Keltner Channels SL/TP Strategy for BTCThis strategy is optimized for Bitcoin with the Keltner Channel Strategy, which is TradingView's built-in strategy. In the original Keltner Channel Strategy, it was difficult to predict the timing of entry because the Buy and Sell signals floated in the middle of the candle in real time. This strategy is convenient because if the bitcoin price hits the top or bottom of the Keltner Channel and closes the closing price, you can enter Buy or Sell at the next candle start price. In addition, this strategy provides Stop Loss and Take Profit functions to maximize profit.
_________________________________
Recommended settings are below.
- length: 9
- multiplier: 1
- source: close
- (v) Use EMA
- Bands Style: Average True Range
- ATR Length: 19
- Stop Loss (%): 20
- Take Profit (%) : 20
_________________________________
- length: 9
- multiplier: 1
- source: close
- (v) Use EMA
- Bands Style: Average True Range
- ATR Length: 18
- Stop Loss (%): 20
- Take Profit (%) : 5
_________________________________
▶ Usefulness and Originality
- Stop Loss and Take Profit functions are available
- Convenient Buy and Sell entry compared to the original Keltner Channel Strategy
- Optimized for BTCUSD market (maximizing profits)
___________________________________________
이 전략은 TradingView의 Built-in 전략인 Keltner Channel Strategy를 비트코인에 맞게 최적화되었습니다. 기존의 Keltner Channel Strategy는 Buy, Sell 신호가 캔들 중간에 실시간으로 떠서 진입 시점을 예측하기 어려운 불편함이 있었지만 이 전략은 비트코인 가격이 Keltner Channel 상단 혹은 하단을 찍고 종가를 마감하면 그 다음 캔들 시작가에서 Buy 혹은 Sell 진입이 가능하여 편리합니다. 또한, 이 전략은 Keltner Channel을 만나서 캔들을 마감한 가격 (bprice, sprice)을 시각적으로 plot을 제공하여 타점 및 차트를 보기에 편리하며 손절가 및 목표가를 지정한 백테스팅이 가능합니다.
TradePro's Trading Idea Cipher Divergence EMA Pb StrategyHere I present you on of Trade Pro's Trading Idea: Cipher B+ Divergence EMA Pullback Strategy.
Optimized the crypto pairBTC/USDT in the 30 minute chart.
There is the possibility to switch between short and long positions.
You can choose between 2 different take profit/stop loss types: The Lowest Low/ Highest High Stop Loss/ Take Profit and the ATR Take Profit/ Stop Loss.
-----------------------------------------------------------------------------------
How does the strategy work?
ENTRY
Long
The price must be above the 200 EMA .
The price needs to make a pullback into the 50 EMA .
Right after that, the Cipher B indicator must give a buy signal, it must be below the zero line and the Money Flow cloud must be green.
Short
Contrary to the premise of long positions.
EXIT
Lowest Low/ Highest High Exit
The Lowest Low (long) / highest high (short) serves as the stop loss. The TP is formed on the basis of a factor.
(Long for example: *Lowest Low* multiplied by *Profitfactor* = TP).
ATR Exit
The value of ATR at the time of buying is multiplied by the value entered in "Profit factor ATR" and "Stop factor ATR". As soon as the price reaches this value, it is closed.
Important
The script must be optimized for each coin or currency pair. However, only the values for the profit factor, the stop loss and Lowest Low / Highest High are relevant.
Also, by changing the Chanel Length and the Chanel Average, you can create strong profit changes.
The results of the strategy are without commissions and leverage.
If you have any questions or feedback, please let me know in the comments.
If you need more information about the strategy and want to know exactly how to apply it, check out my profile. There I have created a tutorial for the function of the script.
CryptoKillerCryptoKiller is a trend following trading system. It provides entry and exit points, a money management system and a trade management system.
The entry points (fuchsia line) are determined by CryptoKiller Oscillator (see other published script to understand how the oscillator works).
The trade management system provides the exit points in profit and in loss. This script works with multiple take profits (green lines), the initial position is liquidated little by little as the trend reaches the profit targets. Trade management also provides trailing stop exits to save the remaining profits.
Stop loss (red line) take into account the recent past of the chart to be determined, while take profits are fixed and have been calculated based on historical volatility.
The money management system is very simple, it plans to enter a position with a fixed percentage with respect to equity.
CryptoKiller, during an operation, also draws supports and resistances on the chart - determined by the oscillator (orange lines) these supports and resistances are used as a filter to understand where there is the greatest probability of trend development (some entry points provided by the oscillator will therefore not be considered by CryptoKiller as entry points, as in disagreement with the traced supports / resistances).
We know that an error appears in the backtest calculation, where the script is said to suffer from a bias, so the backtest calculation may not be accurate. Actually this happens in high times like H4 or daily, but CryptoKiller is not designed for these timeframes. it is a short-term strategy.
For more information read the author's instructions to contact us, we will send a PDF file with a more complete explanation of the strategy accompanied by screenshots.
Access to this script is granted along with access to CryptoKiller Oscillator.
Godtrix's Crypto HA+RSI+EMA+ATH+DCA Strategy 3.0New Updates is here! Upgrade from previous version 2.0 (Please avoid using v2.0 as it's outdated.)
Great stability, Repaint bug fixes, and New features!
==================
| Introduction: |
==================
This is a Long Term Strategy, using compounding profit method, it can generate high returns, but it also risk for losses, this can be overcome if you set Stop Loss to over 25% for bitcoin & 60% for Altcoins.
Best profit plan with this strategy is you trade on Future leverage while you hold on to your coin, so that when price goes up, your coin value goes up, and at the same time, you trade with your leverage to earn even more, easily doubling up your total profit.
Benefits:
Fully customizable and you can easily personalized it and FINE TUNE it according to the market or coin you trading on.
The strategy is based on REAL PRACTICAL trading skills, so it works in real-world.
I fixed the "repainting" issue so the backtest it shows you IS ACCURATE when you run for real-time.
We all know one indicator is not going to help you win your trades, so this strategy combines ALL three: EMA for long+short term trend, HA for short term trend, RSI for entry/exit
This strategy is designed for LONG trade (Buy low, Sell high), not for SHORT trade.
This is not day trading, it is more to mid-term trading, where there's only few trades per month
Mainly is coded to work with 3Commas bot auto trading, so you only need to key in your Bot ID & Email Token.
Bot trading NOTE:
- You need to replace the Alert Message with this: {{strategy.order.alert_message}}
- And you'll need the Bot's webhook Url set with the Alert too.
- One Alert will work for both Buy and Sell Order
- If you using other Bot service, you can enter Custom Command in Input Settings too, it works on any bot service.
Lastly,
regarding the setting advice, I would say you try playing with different settings and your objective is to achieve a backtest result that has:
1) Profitable is > 80%
2) Losing trades is nearly 0 or below 25% of your winning trades. Trick is using far stop loss %
3) Net Profit be almost same or more than "Buy & Hold Profit"
==================
| Latest Updates: |
==================
=| Tidy Up Codings |=
- Group input fields so it'll be easier to understand and find the settings
- Upgrade code for obsolete 'transp' options
=| Repaint Issues |=
- Previous v2.0's RSI has repaint issue, creating false result against real-time data. I've fixed this.
- Also done fine-tuning other parts of the codes to prevent possible repaint issues.
=| Bot System |=
- Improved Custom Bot system, so that you're able to set dynamic order size/quantity with my custom keyword: and
Base Order Example:
{ 'message_type': 'bot', 'bot_id': 1234567, 'email_token': 'abcdefgh-1234-1234-1234', 'base_order': , 'delay_seconds': 0, 'pair': 'USDT_BTC'}
=| EMA Downtrend Exit |=
- Added option for you to decide whether to close position when detected EMA Long term downtrend.
=| EMA 2 (short term) is removed |=
- After several test, I've decided to remove this because it doesn't contribute to improving the results.
=| Heikin Ashi System |=
- Improved the chart display, now you'll see the HA candle 'shadowed' behind, so you'll see both actual price candle and HA candle at same time.
- Added the system that detect the HA candle sizes to decide specifically when it's suitable for Entry and Exit.
>> For "Entry/Exit Range"
- This means after HA is valid for Entry or Exit, how many following bars are allowed to stay valid so it will match other requirements to be completely fulfilled for Entry or Exit.
>> For "Crossing Interval"
- This means after detected HA line crossover, how many HA intervals is allow to Entry or Exit
>> For "Reversed Exit"
- This function let's you decide whether to close position if after HA bull (green candle) changed into HA Bear (red candle)
=| RSI A Entry |=
- Added option to avoid Entry during NTZ (No trade Zone)
- Also added the option to avoid next same condition RSI A entry too soon
=| RSI B Entry |=
- This function is for Entry if RSI is going very low, mostly due to bigger price drops in short time, it's good for buying DIP, however we'll never be able to know when a DIP ends, so do more test on this settings before put into real use.
- Added "avoid" options to help avoid getting Entry at "false" DIP, more like a short & fast pullback which causes RSI to drop very low but actually the price is near ATH or Recent High.
- Added option for Entry with Trailing Price Lower Buy combine with a limit order that grabs low price, so whichever it fulfill first.
=| New: Avoid Entry |=
- Well, it's a pain if you bought at the top, so I've added two options that will avoid buying near ATH and Recent High.
=| Time-limit Removed |=
- Sorry that I've missed look on the script policy which I'm not allowed to put a time-limit for public scripts.
=| System Improvements |=
- HA condition detection is optimized and bug fixed
- RSI values now reads accurately on each bar despite using higher timeframe, especially when moving to next interval
=| New: Dollar Cost Averaging (DCA) Orders |=
- Although DCA strategy is not appealing for Long term strategy, but I've added it for your extra options and flexibilities.
- The settings are quite straight-forward and standard, so I won't be explaining here.
=| New: Backtest Start & End Date |=
- This is very good function when you need more accurate result starting at specific date & time.
- Also if you set the date & time for your real trading starts, it'll much result the same as your actual trading records, which helps you to see clearer and make future decisions.
Any found bugs or flaws, please feel free to PM me, I can't get notifications from comments here below, so I'll not able to reply you the soonest possible, still not sure how to turn on notification for comments, anyone who knows can PM and teach me, lol... Thanks in advance!
Well, this is free version, hope it helps! Feedbacks are all welcome :)
(To Moderators: I've fully use the "f_security()" guideline, but instead of creating a separate function, I apply directly on all security() function. Please don't ban my script before fully check if I've truly fixed repaint. Thank you.)
BITSTAMP:BTCUSD COINBASE:BTCUSD COINBASE:ETHUSD BINANCE:BNBUSDT
ChannelSlicerThis is an EMA-channel strategy designed to be profitable in both the long and short directions. It may underperform buy-and-hold in strong bull markets, but unlike buy-and-hold it is profitable in any market structure. In a sideways market with medium to high volatility, it should perform very well.
In general, the optimal settings will be for the fast channel to be several periods shorter than the slow channel and the fast HMA (hull moving average) to be a few periods shorter than the fast channel.
The two main source of unprofitable trades in this strategy are betting against the trend and during rapid pumps/dumps. It is therefore designed with parameters to detect these conditions and refrain from entering positions during them (trendSensitivity and Rate of Change cutoff.)
This strategy can offer large swings in profitability with relatively small parameter changes, so I recommend you cross-validate any set of parameters across multiple exchanges and across multiple tickers. The goal should be to find a sweet spot where small changes to parameters do not make the strategy unprofitable.
RSI+PA+DCA StrategyDear Tradingview community,
This RSI based trading strategy is created as a training exercise. I am not a professional trader, but a committed hobbyist. This not a finished trading strategy meant for trading, but more a combination of different trading ideas I liked to explore deeper. The aim with this exercise was to gain more knowledge and understanding about price averaging and dollar cost averaging strategies. Aside that I wanted to learn how to program a pyramiding strategy, how to plot different order entry layers and how to open positions on a specific time interval.
In this script I adapted code from a couple of strategy examples by Coinrule . Who wrote simple and powerful examples of RSI based strategies and pyramiding strategies.
Also the HOWTO scripts shared by vitvlkv were very helpful for this exercise. In the script description you can find all the sources to the code.
A PA strategy could be a helpful addition to ease the 'stress-management to buy when price drops and resolution in selling when the price is rising' (Coinrule).
The idea behind the strategy is fairly simple and is based on an RSI strategy of buying low. A position is entered when the RSI and moving average conditions are met. The position is closed when it reaches a specified take profit percentage. As soon as the first the position is openend multiple PA (price average) layers are setup based on a specified percentage of price drop. When the price crosses the layer another position with somewhat the same amount of assets is entered. This causes the average cost price (the red plot line) to decrease. If the price drops more, another similar amount of assets is bought with another price average decrease as result. When the price starts rising again the different positions are separately closed when each reaches its specified take profit. The positions can be re-openend when the price drops again. And so on. When the price rises more and crosses over the average price and reached the specified take profit on top of it, it closes all the positions at once and cancels all orders. From that moment on it waits for another price dip before it opens a new position.
Another option is to activate a DCA function that opens a position based on a fixed specified amount. It enters a position at the start of every week and only when there are already other positions openend and if the current price is below the average price of the position. Like this buying on a time interval can help lowering the average price in case the market is down.
I read in some articles that price averaging is also called dollar cost averaging as the result is somewhat the same. Although DCA is really based on buying on fixed time intervals. These strategies are both considered long term investment strategies that can be profitable in the long run and are not suitable for short term investment schemes. The downturn is that the postion size increases when the general market trend is going down and that you have to patiently wait until the market start rising again.
Another notable aspect is that the logic in this strategy works the way it does because the entries are exited based on the FIFO (first in first out) close entry rule. This means that the first exit is applied to the first entry position that is openend. In other words that when the third entry reaches its take profit level and exits, it actually exits the first entry. If you take a close look in the 'List of Trades' of your Strategy Tester panel, you can see that some 'Long1' entries are closed by an 'Exit 3' and not by an 'Exit 1'. This means that your trade partly loses, but causes a decrease in average price that is later balanced out by lower or repeated entering and closing other positions. You can change this logic to a real sequential way of closing your entries, but this changes the averaging logic considerably. In case you want to test this you need to change, in this line in the strategy call 'close_entries_rule = "FIFO"', the word FIFO to ANY.
In the settings you can specify the percentage of portfolio to use for each trade to spread the risk and for each order a trading fee of 0.075% is calculated.
TSI HMA CCIHi!
This strategy has TSI and CCI indicators with the CCI being based on a HMA instead of the Price.
There is a number of conditions that must combine to create buy or sell signals, but it is basically a couple of MA crossovers.
The strategy opens new orders on each candle if the conditions are met, Either direction, so it is hedging.
It wont open new orders if there is a floating loss, and so is constantly attempting to hold a floating profit (drawup instead of drawdown)
But It has a StopLoss (set by user) for closing of losing orders, and it closes all orders in basket style when account is in profit to users set amount target profit.
Low commission set to simulate swap but Forex pairs generally dont have commission like the crypto exchanges do. So if you use this on cryptos, remember to increase the commission to your brokers amount.
Crypto users will likely find that because this opens so many orders the commission could erase its profits.
So i recommend this for Forex only, and perhaps, only NZDUSD 4H chart. other pairs, change settings for.
The strategy has settings for testing on target time spans, so you could test it on just Jan-Feb 2020 for example, if you want, or from Jan 2020 to present day.
Have Fun! Open Script for copy/paste/edit/publish your own version :)