Trailing Stop SnippetThis is an example snippet that should allow for adding a trailing stop and trailing stop activation to almost any script.
You can use it by setting a trailing stop alone. This will provide you standard trailing stop functionality allowing you to lock in profits and increase your stop-loss as the price moves in your direction.
You can also set the trailing stop activation to trigger the original trailing stop at a certain level. "Once price rises 5%, set a trailing stop at break even". This would be set as 5 and 5 in the settings.
Autoview
3LS | 3 Line Strike Strategy [Kintsugi Trading]What is the 3LS | 3 Line Strike Strategy?
Incorporating the 3 Line Strike candlestick pattern into our strategy was inspired by Arty at The Moving Average and the amazing traders at TheTrdFloor .
The Three Line Strike is a trend continuation candlestick pattern consisting of four candles. Depending on their heights and collocation, a bullish or a bearish trend continuation can be predicted.
In a symphony of trend analysis, price action, and volume we can find and place high-probability trades with the 3LS Strategy.
How to use it!
----- First, start by choosing a Stop-Loss Strategy, Stop PIP Size, and Risk/Reward Ratio -----
- Stop-Loss Strategy
Fixed PIP Size – This uses the top/bottom of the indicator candle and places a TP based on the chosen Risk:Reward ratio.
ATR Trail (No set Target Profit, only uses ATR Stop)
ATR Trail-Stop (Has set Target Profit, however, stop is based on ATR inputs)
**If you choose an ATR Stop-Loss Strategy - input the desired ATR period and Multiple you would like the stop to be calculated at**
**ATR Stop-Loss Strategies have a unique alert setup for Auto-Trading. See Auto-Trading Section**
- Risk/Reward Ratio = If you have a .5 risk/reward, it means you are risking $100 to make $50.
- Additional Stop PIP Size = Number of PIPs over the default stop location of the top or bottom of the indicator candle.
----- Next, we set the Session Filter -----
Set the Timezone and Trade Session you desire. If no specific session is desired, simply set the Trade Session to 00:00 - 00:00.
----- Next, we set the Moving Average Cloud Fill -----
Enter the Fast and Slow Moving Average Length used to calculate trend direction:
MA Period Fast
MA Period Slow
These inputs will determine whether the strategy looks for Long or Short positions.
----- Next, we set the VSA – Volume Spread Analysis Settings -----
Check the box to show the indicator at the bottom of the chart if desired.
This is just a different visual output of the VSA | Volume Spread Analysis indicator available for free under the community indicators tab. You can add that indicator to your chart and see the same output in candle format.
In combination with the Moving Average Cloud, the Volume Spread Analysis will help us determine when to take a trade and in what direction.
The strategy is essentially looking for small reversals going against the overall trend and placing a trade once that reversal ends and the price moves back in the direction of the overall trend.
The 3LS Strategy utilizes confirmation between trend, volume, and price action to place high probability trades.
The VSA is completely customizable by:
Moving Average Length
MA-1 Multiplier
MA-2 Multiplier
MA-3 Multiplier
Check out the VSA | Volume Spread Analysis indicator in the community scripts section under the indicators tab to use this awesome resource on other strategies.
----- Next, we have the option to view the automated KT Bull/Bear Signals -----
Check the boxes to show the buy-sell signal on the chart if desired.
----- Next, we set the risk we want to use if Auto Trading the strategy -----
I always suggest using no more than 1-3% of your total account balance per trade. Remember, if you have multiple strategies triggering per day with each using 1%, the total percent at risk will be much larger.
For Example – if you have 10 strategies each risking 1% your total risk is 10% of your account, not 1%! Be mindful to only use 1-3% of your total account balance across all strategies, not just each individual one.
----- Finally, we backtest our ideas -----
After using the 'Strategy Tester' tab on TradingView to thoroughly backtest your predictions you are ready to take it to the next level - Automated Trading!
This was my whole reason for creating the script. If you work a full-time job, live in a time zone that is hard to trade, or just don't have the patience, this will be a game-changer for you as it was for me.
Auto-Trading
When it comes to auto-trading this strategy I have included two options in the script that utilize the alert messages generated by TradingView.
*Note: Please trade on a demo account until you feel comfortable enough to use real money, and then please stick to 1%-2% of your total account value in risk per trade.*
AutoView
PineConnector
**ATR Auto-Trading Alert Setup**
How to create alerts on 3 Line Strike Strategy
For Trailing Stops:
1) Adjust autoview/pineconnector settings
2) Click "add alert"
3) Select "Condition" = Strategy Name
4) Select "Order Fills Only" from the drop-down
3) Remove template message text from "message" box and place the exact text. '{{strategy.order.alert_message}}'
4) Click "create"
For Fixed Pip Stop:
1) Adjust autoview/pineconnector settings
2) Click "add alert"
3) Select "Condition" = Strategy Name
4) Select "alert() function calls only"
5) I like to title my Alert Name the same thing I named it as an Indicator Template to keep track
Good luck with your trading!
BEST Strategy Template AutoviewHello Traders
I've build a strategy template building for you the AUTOVIEW commands
I made this template based on this documentation: use.autoview.with.pink
You can select whether you want to use an SL or not, a TP or not, using the borrow/repay feature (only for Binance), ... and it will build dynamically the Autoview commands and will send them when entry/exit alerts trigger.
The template accept SL/TP in percentage or pips/USD distance from the entry price
MAGICAL !!!! (not really, just some dumb coding)
Users will have to specify from the settings:
- the Autoview account name
- the symbol name: I couldn't capture it from the chart because sometimes the symbol name on the broker side is different than the one from the TradingView side
- the position size
- the broker name (Tradovate, Binance, Bitmex, FTX, ...)
- if you want to send the alerts to your DEMO or LIVE account
- a debug mode to check if your alerts are well formatted
- and a few other interesting options...
If you want to use it, you'll have to update the dummy entries logic lines 97-98 and replacing those two lines by your own stuff
I'll make the ProfitView and 3Commas and Alertatron versions shortly.
Basically the same script but with the commands built for those 3 automation third-parties.
Best regards
Dave
BEST ABCD Pattern StrategyHello traders
This is the strategy version of this script
I - Concept
I present to you, ladies and gentlemen, the first screener for harmonic patterns.
Starting with an ACBD pattern screener this time!!
I used the calculations from Ricardo Santo's script
In short, he's using fractals (regular or Bill Williams ) for the pattern calculations. A masterpiece !!!
II - Definitions
The ABCD pattern ( AB=CD ) is one of the classic chart patterns which is repeated over and over again.
The ABCD pattern shows perfect harmony between price and time.
The Williams Fractal is an indicator, developed by Bill Williams, that aims to detect reversal points (highs and lows) and marks them with arrows.
Up fractals and down fractals have specific shapes. The Williams Fractal indicator helps users determine in which direction price will develop
💎Strategy filters💎
I included some cool backtest filters:
- flexible take profit in USD value (plotted in blue)
- flexible stop loss in USD value (plotted in red)
The take profit and stop loss should work with Forex/FX pairs as well
All the BEST
Dave
BEST Engulfing + Breakout StrategyHello traders
This is a simple algorithm for a Tradingview strategy tracking a convergence of 2 unrelated indicators.
Convergence is the solution to my trading problems.
It's a puzzle with infinite possibilities and only a few working combinations.
Here's one that I like
- Engulfing pattern
- Price vs Moving average for detecting a breakout
Definition
Take out the notebooks :) and some coffee (good for focus). I'm bullish in coffee
The engulfing pattern is a two-candle reversal pattern.
The second candle completely ‘engulfs’ the real body of the first one, without regard to the length of the tail shadows.
The bullish Engulfing pattern appears in a downtrend and is a combination of one red candle followed by a larger green candle
The bearish Engulfing pattern appears in a downtrend and is a combination of one green candle followed by a larger red candle
Example: imgur.com
We're bored sir... what's the point of all this?
In summary, an engulfing is a pattern to track reversals. (the whole TradingView audience stands up now giving a standing ovation)
Adding the Price vs Moving average filters allows to track reversals with momentums (half of the audience collapsed because this is too awesome)
Ok sir... you picked up my interest
I included some cool backtest filters:
- date range filtering
- flexible take profit in USD value (plotted in blue)
- flexible stop loss in USD value (plotted in red)
All the best
Dave
Best Supertrend CCI StrategyHello traders
Someone requested the strategy version of the Supertrend CCI indicator
It's a Supertrend not based on candle close but based on a CCI ( Commodity Channel Index )
How does it work?
Bull event: CCI crossing over the 0 line
Bear event: CCI crossing below the 0 line
When the event is triggered, the script will plot the Supertrend as follow
UP Trend = High + ATR * Factor
DOWN Trend = Low - ATR * Factor
This is an alternative of the classical Supertrend based on candle close being above/beyond the previous Supertrend level.
Hope you'll enjoy it and it will improve your trading making you a better trader
Dave
BEST Trend Direction Helper (Strategy Edition)Hello traders
A follower asked me to convert my Trend Direction Helper into a strategy
So blessed this indicator reached the 1400+ likes milestone - I can't believe how many people are trading with it
I based the setup as follow:
- Entries on those green/red labels
- exit whenever a Simple Moving Averages cross in the opposite direction happen
- possibility to filter only Longs/Shorts or both
Also...
The strategy includes the Zig Zag/Pivots high/low and other options from the indicator version. I only added a quick strategy component with a hard exit concept based on SMA cross
All the best fam and... HAPPY NEW YEAR !!!!!!!!!!!
Dave
RSI-VWAPBacktest script based on the previous RSI-VWAP indicator:
It's the popular RSI indicator with VWAP as a source instead of close:
- RSI_VWAP = rsi(vwap(close), RSI_VWAP_length)
What is the Volume Weighted Average Price ( VWAP )?
VWAP is calculated by adding up the dollars traded for every transaction (price multiplied by the number of shares traded) and then dividing by the total shares traded.
Trades are laddered to improve the average entry price and each entry is increased, improving the entry but increasing the risk of being liquidated.
It can be easily converted to study (alerts)
Settings for BINANCE:BTCUSDT at 30m
SuPeR-RePaNoCHa #2TP#This is the last of the 'RePaNoCHa' script for Automatic Trading ;-) ... This time with two take profits ...
It Use 6 indicators + volume:
-JURIK MOVING AVERAGE
-RANGE FILTER
-ADX
-PARABOLIC SAR
-RSI + VOLUME WEIGHTED
-MACD
-VOLUME
To close the position you can choose between 2 Take Profit and the amount to use on each one.
You can transform it yourself into 'study' mode to get alerts.
Take Profits can be generated from the same entry, (syntax example on the script) so the fees will be lower (0.04 + 0.02 / 2 = 0.03).
Settings for BINANCE FUTURES BTC:USDT
Enjoy...
CS Basic Scripts - Stochastic Special (Strategy)This Stochastic Special Strategy features inputs for:
- Custom Backtesting Date Range
- Long and Short Strategy Discinctions
- Utilize SMI, RSI, Martingale, and Body-Filter Strategy
- Adjust the SMI Percent Lengths and Limit
- Automate with the Autoview Trading Bot
Strategy script may be tested by favoriting and adding to any chart.
Study script is available for automated trading at www.cryptoscores.org
[Autoview][BackTest] Blank R0.13BThis is a fork of JustUncleL's
Dual MA Ribbons R0.13
It is now a blank template for making new strategies / alerts for autoview
The changes are as follows:
Removed actual algo
Establish functions for long Signal, long Close Signal and short Signal, short Close Signal to minimize the places code must be edited to update / replace algos
Make allow Long and allow short and invert trade directions independent options
Added support for alternate candle types
Added autoset backtest period feature, and optional coloring
Moved strategy calls in to functions so they can all be commented out or activated / disabled in a single block at the top of the script
[Autoview][BackTest]Dual MA Ribbons R0.12 by JustUncleLThis is an implementation of a strategy based on two MA Ribbons, a Fast Ribbon and a Slow Ribbon. This strategy can be used on Normal candlestick charts or Renko charts (if you are familiar with them).
The strategy revolves around a pair of scripts: One to generate alerts signals for Autoview and one for Backtesting, to tune your settings.
The risk management options are performed within the script to set SL(StopLoss), TP(TargetProfit), TSL(Trailing Stop Loss) and TTP (Trailing Target Profit). The only requirement for Autoview is to Buy and Sell as directed by this script, no complicated syntax is required.
The Dual Ribbons are designed to capture the inferred behavior of traders and investors by using two groups of averages:
> Traders MA Ribbon: Lower MA and Upper MA (Aqua=Uptrend, Blue=downtrend, Gray=Neutral), with center line Avg MA (Orange dotted line).
> Investors MAs Ribbon: Lower MA and Upper MA (Green=Uptrend, Red=downtrend, Gray=Neutral), with center line Avg MA (Fuchsia dotted line).
> Anchor time frame (0=current). This is the time frame that the MAs are calculated for. This way 60m MA Ribbons can be viewed on a 15 min chart to establish tighter Stop Loss conditions.
Trade Management options:
Option to specify Backtest start and end time.
Trailing Stop, with Activate Level (as % of price) and Trailing Stop (as % of price)
Target Profit Level, (as % of price)
Stop Loss Level, (as % of price)
BUY green triangles and SELL dark red triangles
Trade Order closed colour coded Label:
>> Dark Red = Stop Loss Hit
>> Green = Target Profit Hit
>> Purple = Trailing Stop Hit
>> Orange = Opposite (Sell) Order Close
Trade Management Indication:
Trailing Stop Activate Price = Blue dotted line
Trailing Stop Price = Fuschia solid stepping line
Target Profit Price = Lime '+' line
Stop Loss Price = Red '+' line
Dealing With Renko Charts:
If you choose to use Renko charts, make sure you have enabled the "IS This a RENKO Chart" option, (I have not so far found a way to Detect the type of chart that is running).
If you want non-repainting Renko charts you MUST use TRADITIONAL Renko Bricks. This type of brick is fixed and will not change size.
Also use Renko bricks with WICKS DISABLED. Wicks are not part of Renko, the whole idea of using Renko bricks is not to see the wick noise.
Set you chart Time Frame to the lowest possible one that will build enough bricks to give a reasonable history, start at 1min TimeFrame. Renko bricks are not dependent on time, they represent a movement in price. But the chart candlestick data is used to create the bricks, so lower TF gives more accurate Brick creation.
You want to size your bricks to 2/1000 of the pair price, so for ETHBTC the price is say 0.0805 then your Renko Brick size should be about 2*0.0805/1000 = 0.0002 (round up).
You may find there is some slippage in value, but this can be accounted for in the Backtest by setting your commission a bit higher, for Binance for example I use 0.2%
Special thanks goes to @CryptoRox for providing the initial Risk management Framework in his "How to automate this strategy for free using a chrome extension" example.
Gunbot - Bbands - UnlockedThis is a repost, the first version was locked and I am unable to unlock it. So I'm simply publishing it anew.
Original Post
Original Description
This is more of a test run than anything. Gunbot approximation courtesy of Vosechu and the original can be found here.
MP Rollercoaster Strat
This TMA strategy is called rollercoaster for the rounded ways it follows the moving average. Tried pinpointing entry/exit points as well as I could. Included alertconditions as well as syntax at the bottom for use with Autoview in a margin or spot trading environment. There is also the Study side for syntax and alertconditions use :) (autoview users and more!)
As usual, free to use, change it to suit your needs, please don't resell for profit.
For carpel tunnel surgery!
btc addy- 1Dsg49Zt2FQ9BnUHrmXQwvhL5dd3teqa7g
ltc addy- LYUpgsHSHnKeYdNaj9bu9prK4QsnJXEQtP
pinkcoin addy- 2PoeXyAk3rF9FmMC8azme2mGzMYsEiZ5eS
Moving Average Cross and/or Bbands botHello TradingView and world!
This is one of our latest concepts for an actual bot builder. This script comes with a bunch of features that we're hoping will alleviate a lot of the stress and confusion around using and building strategies here on TV. Especially if the end-goal is to automate the strategies using Autoview.
This is a combination of 2 strategies, and gives you full control of each component within the script.
The 2 strategies are:
2 Moving Averages == if close is greater than moving average and moving average 1 is greater than moving average 2
Bolling Bands == if close is less than lower or greater than upper
Features / Settings included :
- Ability to change settings from a commodity market (default) to an altcoin or forex market.
- Backtest time period selector component
- Heiken Ashi Candles on/off
- Moving Average Strategy on/off
- Bollinger Bands Strategy on/off
- Both Moving Average settings can be adjusted
- Bollinger Bands length and multiplier can be adjusted.
- Pyramiding Greater Than, Equal To, or Less Than
- Trailing Stop with the ability to set a price in which the Trailing Stop activate
- Take Profit on/off and editable
- Stop Loss on/off and editable
- Margin Call on/off dependent on Leverage which is editable
- If pyramiding is used, the strategy will calculate and display your average on the chart
- Profit and Loss visuals added to the chart
You can watch a video here on how all the settings can be used and work together.
www.youtube.com
You can learn more about Autoview here:
autoview.with.pink
Get your invite and join us in slack here:
slack.with.pink