MG - Range trader - 1.0This one is a bit of an experiment..
The theory is, if you have an asset that you firmly believe will rise in the future for fundamental reasons and are happy to hold until that happens i.e. a be a position trader, you can take advantage of market volatility at the same time in a relatively safe way, so theoretically, you profit when the price goes up or down
E.g. You have $1000, an asset in which you want to become a position trader and you are happy to either make more money or more of the asset as you believe that will make you more money in the future, you could wait until a decent retracement, maybe around a good support level, then buy $500 of the asset and simply sell if it goes up by X, buy if it goes down by X. If you keep doing this, you will end up with either with more of the asset or more money. You have a sure gain either way (if you are happy to have either money or asset)
There are some considerations:
The higher the trade size, the faster profit compounds and the faster you exhaust your available buys and sells
- E.g. If asset is $100, you have $500 and you plan to buy / sell every $10 change, if the asset drops straight to $40, your last buy will be at $50, at which point, the asset is still dropping. But it you only plan to buy / sell $5 every $10 price, you will be able to buy right down to 0.
In times of strong trend, it may be better to avoid this approach altogether as there may not be so much oscillation or at least to use a small if not minimum order size.
Application:
The buy and sell triggers can be connected using autoview to convert this indicator into a range trading bot
Recherche dans les scripts pour "bot"
Advanced Chaikin Money Flow (CMF)TL;DR: change the aggregation to EMA to achieve similar results to Twiggs Money Flow. Play with the rest of parameters to get the desired results.
This script allows customization of CMF. It also includes all the improvements made by Twiggs Money flow.
Regular CMF does not take price gaps into account as you can see in the chart below. True range fixes this issue, as done in Twiggs Money flow (TMF).
More info here: www.incrediblecharts.com
Customization Options:
- You can change the effect of volume by setting volume exponent. 0 to 10 reduces the effect and 10+ increases it. In exchanges with too much wash trading, you may want to reduce volume effect.
- You can factor in price in CMF. It gives you a slightly different results. See my Volume x price (VxP) indicator for why it might be useful.
- The range can be changed to percentage (similar to RSI)
PS: I do not recommend using CMF in today's Crypto markets. Chaikin uses the same multiplier in CMF and Accumulation/Distribution Line (ADL). ADL is a totally broken indicator for BTC. If you look at the period after ATH (chart below), you will notice that ADL keeps increasing implying accumulation. While it is clear that there was distribution going on. The reason might be the artificially inflated prices in Crypto that is achieved by the help of bots and having "certain" exchanges as a price reference. So, my reasoning is that if ADL is a broken indicator, so should be CMF. CMF diverges from BTC price frequently. This is a double edged sword IMO. Still CMF is a much better indicator than ADL because it works relative to prior periods which covers some of its flaws.
Note for super nerds: Twiggs Money Flow includes true range and Welles Wilder's Moving Average (WWMA). I have seen some other scripts using their own calculations for WWMA which is not efficient. WWMA is equal to built-in RMA/SMMA which is equal to EMA with length 2x-1.
CoryT's Noro's Ichimoku AlertsA few months ago I took Noro's Ichimoku Cloud and used the AV bot template to throw stops on it. I took some code from JustUncleL
to make it not so hideous. Trailing Stops are turned off, stop losses are turned off (you really don't need them with this), and this is currently a Long/Short strategy, the Longs Only and Shorts Only options are broken right now, I'm tired and you guys can either fix it yourselves or deal with it like this for now.
Hint: If you wanna use this as a long-only strategy just have AV close your buy orders whenever a short is triggered.
Hull - Moving Average spreadAn idea i had using the trend indicator Hull Moving Average for bot trading. I am using a lot of EMA Spread indicators lately and i just wanted to make a Hull like Spread for comparision.
In General if combined with CandleStick Patterns / Momentum like StochRSI etc. You will receive pretty decent signals for Panic DIPS that have a high change of rebound.
ToDo ... Enhance the Script with Offset so that it reacts to market moves.
Breakout Range LS alert 893 popup trigger ver For Japanese major donchain breakout bot's logic.
it's trigger are price range and highest/lowest price.
this script put on symbol/text in chart when price reach on trigger:)
recommend to use on 1h chart.
include alertcondition for TV alert.
PT Feeder - HighLowPricePercentageYet another script to help people set the Addon PT Feeder for a trading bot Profit Trailer. Same rule applies if you do not own this the following explanation will not help you.
- Add the script to your favourites
- Edit Minutes for short term and long term for both indicators
- Set candle size you are using default is 5 Minutes
HighLowPricePercentage (Source PT Feeder Wiki)
"This is a property to try and check the variance of the price from the norm and is over the MinutesToMeasureTrend time window. The math is:
firstVariance = (high.ActualPrice - low.ActualPrice) / 2
medianVariance = high.ActualPrice - firstVariance
highLowPercentage = (latestActualPrice - medianVariance) / latestActualPrice * 100".
LongerTermHighLowPricePercentage (Source PT Feeder Wiki)
"This is a property to try and check the variance of the price from the norm and is over the LongerTermMinutesToMeasureTrend time window. The math is the same as the HighLowPricePercentage".
Sources:
PT Feeder Wiki - github.com
LTC: LYHj4WDN7BPu5294cSpqK3SgWSWdDX56Qt
BTC: 1NPVzeDSsenaCS9QdPro877hkMk93nRLcD
Tabajara 3.0 (by André Machado) + 200SMA + BBTrata-se do popular seguidor de tendência desenvolvido pelo mestre André Machado, adicionando-se a ele as Bandas de Bollinger para aproveitar a contração/squeeze, juntamente com a média simples de 200 períodos aritmética para seguir a tendência mais longa.
OBS: Para colorir os candles é necessário que seja alterada a coloração padrão do gráfico de verde/vermelho para preto/branco, clicando no gráfico com o botão direito do mouse e indo em "propriedades".
Progressive Profit Taking with Trailing StopThis is version 2 of
Special features:
Added partial profit taking as price rises. Profit taking is triggered by price crossing an EMA.
After profit taking, price has to rise by a user-specified percent before taking profits again.
Also includes condition for fully closing position after meeting specified profit target.
To incorporate into your algo, turn the plotshape functions into alertcondition.
Customizable trailing Stop For Manual EntriesHere's how to create a trailing stop with a manual buy order, on an exchange that does not support native trailing stops. Code can easily be copy+pasted into your normal algos.
To set the entry price for your manual trade, specify the bar time when the trade was made. Note that the time you specify needs to correspond to an opening time on your chart--if it's a 3 hour chart, 6 pm or 9 pm will work, but 8 PM will not. It's not as bad as it sounds though, read on :)
Per usual I keep multiple options open.
Special features in this script:
Change time frame for trailing
Specify trailing parameter (high, close, hlc3, etc.)
Change time frame for stop loss trigger (use a shorter time frame for earlier exits!)
Specify trigger parameter (close, low, hlc3, etc.)
Remember that annoying issue where you might not be able to precisely specify entry price, because you want to use 3 hour closing prices for your trailing stop but you bought in at 7:41 pm? Add this indicator to a 1 minute chart and set your start time to 19:41, then set the trailing time frame to 3 hours!
Next stop is v2, where we take profits along the way before stop loss gets triggered.
Alert Batches v2This version triggers every batch within each candle. The previous version only triggered one batch per candle.
This will not trigger batches in perfect order, but I left the "sequential" option because it still triggers the batches in order more often than not.
Alert BatchesThis script lets you separate alerts into batches, and trigger each batch in either sequential order or (pseudo)random order. You can also specify the number of batches being used.
This is helpful when you have alerts to be triggered on every candle, but the number of alerts causes API errors if they are all executed at once.
Gunbot MACDgenOk this is just some strat based on MACD, checking for a few conditions until giving buy/sell signals to Gunbot via alerts.
It is generalized but if you want to go play with the values. I will continue to develop this further and am happy to receive feedback.
Notations are coming.
Usage notes:
-ONLY use this with TV_GAIN: 0.6 because on downtrends it is supposed to double up to pull down the average bought price!
-Use "buying condition" and "selling condition" for alerts, trigger on close and I suggest you use 3 min intervals but try what looks good to you
-Use this on pairs that are curvy and have atleast 0.6% gain between buy/sell triggers. This is also general advise when you want to take microprofits.
-Don't be confused with sell arrows, it will only trigger the bot sell on gain when you've set TV_GAIN
[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
Price Regression AgreggatorPrice Estimator with aggregated linear regresion
---------------------------------------------------------------------------
How it works:
It uses 6 linear regression from time past to get an estimated point in future time, and using transparency, those areas that are move "visited" by those 6 different regressions and maybe more probable to be visited by the price (in fact if you zoom out you will see that price normally is around the lighter zones) have more aggregated painted colors, the transparency is lower and well, the lighter area should be more probable to be visited by the price should we put any faith on linear regression estimations and even more when many of them coincide in several points where the color is more aggregated.
If the "I" (the previous regressions increment) is too low, then we will have huge spikes as the only info gathered from the oldest linear regresssion will be within the very same trend we are now, resulting in "predictions" of huge spikes in the trend direction. (all regressions estimating on a line pointing to infinite)
If the "I" is high enough (not very or TV won't be able to display it) then you will get somewhat a "vectorial" resultant force of many linear regressions giving a more "real prediction" as it comes from tendencies from higher timeframes. E.g. 12 hours could be going down, 4h could be going sideways, 30m could be going up.
contact tradingview -> hecate . The idea and implementation is mine.
Note: transparency + 10 * tranparencygradient cannot be > 100 or nothing will be displayed
Note2: if the Future increment (how many lines are displayed to the right of the actual price ) are excessive, it will start to do weird things.
Note3: two times the standard deviation statistically correponds to a probability of 95%. We are calculating Top and Bot with that amount above and below. So anything inside those limits is more probable and if we are out of those limits it should fall back soon. Increase the number of times the std deviation as desired. There are calculators in the web to translate number of times std dev to their correspondent probability.
Note4: As we use backwards in time linear regressions for our "predictions" we lose responsiveness. Those old linear regressions are weighted with less value than more recent ones.
Note5: In the code i have included many color combinations (some horrible :-) )
Note6: This was an experiment while i was quite bored although ended enjoying playing with it.
Have fun! :-)
I leave it here because i am getting dizzy.
DYNAMIC S&R 1.01DYNAMIC S&R 2.0 is available:
--
This simple script will add in your chart "dynamic support/resistance" and the possible entry point, can be used in any chart and any timeframe.
This indicator is not designed to be used as a bot, but only to help your trades :)
If you consider this useful, please consider donate: 1NR9tyn8tAn6nuQzosaZ2SkfT38PLxN5mf
Charts:
OSOIL:
XAUUSD:
AUDUSD:
Feel free to use this indicator, don't forget to feedback!
UPDATE:
Now it is possible to add/remove the average range of support and resistance, and add/remove average range as a line. And if you link the average range as a line (thanks @SpyWhat) you can use a multiplier to add or remove % as you like.
Dynamic S&RDYNAMIC S&R 2.0 is available:
--
This simple script will add in your chart "dynamic support/resistance" and the possible entry point.
Here is OSOIL Chart:
This indicator is not designed to be used as a bot, but only to help your trades :) If you consider this useful, please consider donate: 1NR9tyn8tAn6nuQzosaZ2SkfT38PLxN5mf