[Alerts] - Moving Average Cross and/or Bbands botThis is the alert script for :
We've included the basic alert syntax for Autoview automation. You can learn more about the syntax here: autoview.with.pink and you can watch this video here: www.youtube.com
These settings are set, by default, to the lowest contracts allowed by Bitmex (at the time of this posting) to avoid a spam account.
You can learn more about Autoview here:
autoview.with.pink
Get your invite and join us in slack here:
slack.with.pink
Automation
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
How to automate this strategy for free... Version 2Hello fellow traders and automation lovers.
It has been about 2 years since we originally created Autoview to connect your exchanges/brokers with your TradingView alerts. We've since added multiple exchanges, parameters and have built a large community filled with awesome, passionate traders.
One of the first strategies we built was sadly not a viable one for trading due to it using built-in variables that resulted in the backtest results being inaccurate in comparison to placing live trades. Luckily, we did not encounter repainting until a few strategies in, however, there was a point where we published a few of them as well. We will be going through all of our scripts again to not only eliminate any repainting and update to version 3, but to also include all the code snippets that we've learned to use over the years that allow for accurate backtesting and live trading.
The first script we are redoing is our How to automate this strategy for free using a chrome extension. .
Easter egg: This includes a new snippet of code that makes controlling how many orders you pyramid within a study fast and easy.
We look forward to bringing all of our scripts and delving deep into Pine again :)
Happy Trading
Autoview
[Autoview] Every Candle Alert ScriptThis script is designed specifically for firing an alert every candle. It can also be used to just fire an alert on a green candle, or a red candle to slow it down a bit.
This is a script we use to close all of our orders or positions on any of the integrated exchanges.
You can use a fire once alert with greater than on condition and the alert will typically fire within seconds. You can also use this to place orders for you without having to navigate away from TradingView to your exchange/brokerage site.
If you would like a better understanding of how to create an alert for automation, please visit the article this strategy is being published for.
use.autoview.with.pink
MACD, backtest 2015+ only, cut in half and doubledThis is only a slight modification to the existing "MACD Strategy" strategy plugin!
found the default MACD strategy to be lacking, although impressive for its simplicity. I added "year>2014" to the IF buy/sell conditions so it will only backtest from 2015 and beyond ** .
I also had a problem with the standard MACD trading late, per se. To that end I modified the inputs for fast/slow/signal to double. Example: my defaults are 10, 21, 10 so I put 20, 42, 20 in. This has the effect of making a 30min interval the same as 1 hour at 10,21,10. So if you want to backtest at 4hr, you would set your time interval to 2hr on the main chart. This is a handy way to make shorter time periods more useful even regardless of strategy/testing, since you can view 15min with alot less noise but a better response.
Used on BTCCNY OKcoin, with the chart set at 45 min (so really 90min in the strategy) this gave me a percent profitable of 42% and a profit factor of 1.998 on 189 trades.
Personally, I like to set the length/signals to 30,63,30. Meaning you need to triple the time, it allows for much better use of shorter time periods and the backtests are remarkably profitable. (i.e. 15min chart view = 45min on script, 30min= 1.5hr on script)
** If you want more specific time periods you need to try plugging in different bar values: replace "year" with "n" and "2014" with "5500". The bars are based on unix time I believe so you will need to play around with the number for n, with n being the numbers of bars.
P2-V2 - AlertsThis is the alert script for the P2-V2 Strategy. For some reason pasting it into the P2-V2 description results in some of the lines becoming corrupt. So figured the best way would be to publish it.
original strategy
How to automate this strategy for free using a chrome extension.Hey everyone,
Recently we developed a chrome extension for automating TradingView strategies using the alerts they provide. Initially we were charging a monthly fee for the extension, but we have now decided to make it FREE for everyone. So to display the power of automating strategies via TradingView, we figured we would also provide a profitable strategy along with the custom alert script and commands for the alerts so you can easily cut and paste to begin trading for profit while you sleep.
Step 1:
You are going to need to download the Chrome Extension called AutoView. You can get the extension for free by following this link: bit.ly ( I had to shorten the link as it contains Google and TV automatically converts it to a symbol)
Step 2: Go to your chrome extension page, and under the new extension you'll see a "settings" button. In the setting you will have to connect and give permission to the exchange 1broker allowing the extension to place your orders automatically when triggered by an alert.
Step 3: Setup the strategy and custom script for the alerts in TradingView. The attached script is the strategy, you can play with the settings yourself to try and get better numbers/performance if you please.
This following script is for the custom alerts:
//@version=2
study("4All-Alert", shorttitle="Alerts")
src = close
len = input(4, minval=1, title="Length")
up = rma(max(change(src), 0), len)
down = rma(-min(change(src), 0), len)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
rsin = input(5)
sn = 100 - rsin
ln = 0 + rsin
short = crossover(rsi, sn) ? 1 : 0
long = crossunder(rsi, ln) ? 1 : 0
plot(long, "Long", color=green)
plot(short, "Short", color=red)
Now that you have the extension installed, the custom strategy and alert scripts in place, you simply need to create the alerts.
To get the alerts to communicate with the extension properly, there is a specific syntax that you will need to put in the message of the alert. You can find more details about the syntax here : gist.github.com
For this specific strategy, I use the Alerts script, long/short greater than 0.9 on close.
In the message for a long place this as your message:
Long
c=order b=short
c=position b=short l=200 t=market
b=long q=0.01 l=200 t=market tp=13 sl=25
and for the short...
Short
c=order b=long
c=position b=long l=200 t=market
b=short q=0.01 l=200 t=market tp=13 sl=25
If you'll notice in my above messages, compared to the strategy my tp and sl (take profit and stop loss) vary by a few pips. This is to cover the market opens and spread on 1broker. You can change the tp and sl in the strategy to the above and see that the overall profit will not vary much at all.
I hope this all makes sense and it is enough to not only make some people money, but to show the power of coming up with your own strategy and automating it using TradingView alerts and the free Chrome Extension AutoView.
ps. I highly recommend upgrading your TradingView account so you have access to back testing and multiple alerts.
There is really no reason you won't cover the cost and then some on a monthly basis using the tools provided.
Best of luck and happy trading.
Note: The extension currently allows for automation on 2 exchanges; 1broker and Okcoin. If you do not have accounts there, we'd appreciate you signing up using our referral links.
www.okcoin.com
1broker.com