OnePunch Algo Hard BUY/SELL and Date Range - Version 1~~~ How to Detect Sell Signals ~~~
The First Red Outlined Yellow Bar after a purple "close entry order long" signal : then that is a SELL
~~ What is Purple Signal~~~
Purple "Close Entry Order Long" is a warning for a trend reversal. Normally this is given when the upward trend is reversed.
~~~ How to Detect Buy Signals ~~~
Like in the screenshot, the 1st blue "long" signal after 1 or couple of white bars; then it is a BUY.
Note: This is only available for invited members only. This is a new strategy with Dates ranges.
In den Scripts nach "bar" suchen
Strategy VS Buy & HoldSUMMARY:
A strategy wrapper that makes a detailed and visual comparison between a given strategy and the buy & hold returns of the traded security.
DESCRIPTION:
TradingView has a "Buy & Hold Return" metric in the strategy tester that is often enough to assess how our strategy compares to a simple buy hold. However, one may want more information on how and when your strategy beats or is beaten by a simple buy & hold strategy. This script aims to show such detail by providing a more comprehensive metrics and charting the profit/loss of the given strategy against buy & hold.
As seen in the script, it plots/draws 4 elements:
1) Strategy P/L: strategy net profit + strategy open profit
2) Buy & Hold P/L: unrealized return
3) Difference: Strategy P/L - Buy & Hold P/L
4) Strategy vs Buy Hold Stats
> Percent of bars strategy P/L is above Buy & Hold
> Percent of bars strategy P/L is below Buy & Hold
> All Time Average Difference
ADJUSTABLE PARAMETERS:
All labels/panels can be disabled by unchecking these two options:
>bnh_info_panel = input(true, title='Enable Info Panel')
>bnh_indicator_panel = input(true, title='Enable Indicator Panel')
Comparison Date Range can be changed to better isolate specific areas:
>From Year, From Month, From Day
default: 1970 01 01
>To Year, To Month, To Day
default: 2050 12 31
Default settings basically covers all historical data.
HOW TO USE:
The default script contains a simple 50-200 SMA cross strategy, just delete and replace it. Those are everything between these lines:
/////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////STRATEGY SCRIPT START//////////////////////////////////
(STRATEGY SCRIPT GOES HERE)
//////////////////////////////STRATEGY SCRIPT END////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
Removing all plots and drawings from your strategy is advisable.
If you are going to use the Comparison Date Range, apply "bnh_timeCond" to your strategy to align the dates. A sample on how it’s applied can be seen on the Placeholder MA cross strategy.
Note: bnh_timeCond returns a boolean series
HENKO (Renko + HeikinAshi) -- No RepaintThis particular work is completely mine.
I have not used anyone else's code (not even a fragment).
Parts of the code are used from Open Source library linking to www.investopedia.com and TradingView's example section at www.tradingview.com
The above sources have been used to get Custom Heikin Ashi Candles.
Calculations on Renko bars is completely on me as I have used Daily close and open values to build my own Renko Candles.
Custom Bricksize for Float values has been made available in this public version.
I take no responsibility for the performance of this indicator as I have completely turned off the Repainting in this version of my script.
I am publishing the script for Public use.
I'll be releasing updates for this script in future as the performance is somewhat acceptable.
Profit Factor will decrease with bigger backtest data.
NO REPAINTING issues shall be reported at all costs as the tradingview's default Time based renko has been completely discarded, thus making it rely on its own.
Be advised that as the Renko Bars are calculated at 00:00 UTC, you're not supposed to mess with the timing in the script, unless you're working with Stock markets where it is important that you set your day start and end precisely.
You can play with the Brick Size to see what's more beneficial for you.
No Repaint RENKO
NOTE:= PERFORMANCE OF THIS INDICATOR DEPENDS UPON THE BRICKSIZE OF RENKO BARS.
VRSI-MARSI StrategyI wanted to create an indicator which resembles price movement, aside to volume movement.
The "yellow-blue" line is the MA(5) of the RSI (9) of closing price.
The "orange" line is the MA(5) of the RSI (9) of Volume .
(Default plot of RSI and VRSI is not visible but can be made visible ("Settings" > "Style" > set "Opacity" of "RSI & VRSI"))
The Long (Buy) condition is triggered when the MA(5) of the RSI (9, close) goes up.
The Short (Sell) condition is triggered when the MA(5) of the RSI (9, close) goes down.
Comparing the price movement with the "orange" Volume line helps to spot a possible trend change,
for example when price goes up and an ascending Volume line starts to flatten or starts descending,
this could be a sign that the Bullish trend is weakening, predicting a possible trend change.
Or, when for example a downwards price movement is accompanied with a rising Volume line, this can be a sign of large Bearish power.
Because it still is a RSI indicator, the midline (50), and Oversold/Overbought area's (20-30 & 70-80) are important to watch, especially the MARSI!
A second strategy is made (VRSI-MARSI Strategy 2) where the Long/Short condition is triggered when "MA RSI (close) - MA RSI ( Volume )" crosses.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The Long & Short entries, as well as the Entry Close are visible 1 bar after the trigger.
When the blue line changes in a yellow line (and vice versa) it will show a candle earlier (see yellow dashed lines = (1)).
Also, the condition is fulfilled when the candle closes (2), but the order doesn't take place in the same bar, but the next (3).
Because this is a strategy the "actual Order" will not take place at the "Close" of the candle (2), but at the "Open" at the NEXT candle (3).
I also have this strategy as a study (A+B), where the "Buy" & "Sell" shows a candle earlier.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The entries are default 5% of equity, without pyramiding, which already gives large profits.
A large part of the profit is because of the Entry Close of the Long & Short entries.
You can easily turn these off (Settings > Inputs) to see what profit the strategy gives without Entry Close.
Here they are disabled:
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
More information available in the script ;-)
[BERA] KEANU REEVES STRATEGY TESTThis is a strategy test of my indicator.
Indicator based on Average true range.
LIME ARROW = LONG
RED ARROW = SHORT
LIME COLOR BARS IF GREEN ARROW CONDITION VALID.
RED COLOR BARS IF RED ARROW CONDITION VALID.
Binary Strategy by Emiliano Mesa V3The Binary Strategy Indicator is a powerful strategy in which can be set up for all Forex Binary Pairs in any set of time. The strategy profitable percentage will depend in its settings which are fully customizable. Its use is simple and its completly realtime, it depends on three states.
1) Pre-Setup (Blue), a possible ideal MTF Trading setup is being build, a trade might appear be ready.
2) Trade (Purple), a trade has now appeared be ready to take it as soon as the purple bar closes. Always take the trade at the next bar open.
3) Time prediction (Yellow), at what time will the trade close, and what are your odds in winning. 30 minutes? An hour? You know your time before hand, in order to set up your call.
This Binary Strategy has shown huge returns, and works next to "Emiliano Mesa Binary Indicator ALERTS V3", which is also sold with the Binary Strategy.
See the results for yourself... 70% Profitable.
Momentum BFThe momentum strategy is simple, if price action is higher than it was for x bars back, and also higher than it was last candle, we have upwards momentum. This momentum will be positive until a candle closes lower than the previous candle and also lower than x bars back - at which point we have downwards momentum.
The concept behind the Momentum Strategy is that when the momentum crosses from negative to positive, we go long and when it crosses from positive to negative we go short. We stay in that position until momentum crosses back the opposite direction.
INSTRUCTIONS:
Go long at the green background on the chart
Go short at the red background on the chart
The yellow lines are where your stop loss should be for longs
The orange lines are where your stop loss should be for shorts
I have included the options in Settings to change the stop loss type between ATR derived and Fixed percentage based. The default stop loss is a fixed 7%.
You can also select if you want only longs, only shorts or both.
The backtest was done with BTCUSD on Coinbase 1D.
Jomy's Gyroscopic BandsPrice above white line? Long it. Price below white line? Short it. Tuned to XBTUSD on BitMEX. 12h chart. The bands aren't really needed, but you can also choose to long if the price goes above the band, and short if the price goes below the band. If used on other cryptos you should probably tinker with vara (variable a) until you get a respectable result, as that makes a huge difference when dealing with different prices.
How does it work? I send a particle into the chart, which moves towards the price level like a moon around a planet. It swings around the price like a sine wave . I find the average gyration distance for the last x bars, and plot them like Bollinger Bands around the particle's trajectory from a point x bars ago. This system seems to produce fewer whipsaw trades than classical EMAs.
Just like Bollinger bands, you can expect a big move if the bands tighten for a period of time.
Feel free to tinker with this, and if you get some amazing backtests, please share.
Impulse BF 🚀Thanks to rasantos for the idea for this strategy.
The 2 lines are based on the sum number of impulses for x bars back. So total "up impulses" is the sum of the bars where price closed higher, and vice versa for "down impulses". The strategy is simple - a long signal is generated when the total up impulses exceeds the total down impulses. A short signal is generated when total down impulses exceeds total up impulses.
I included a rate of change function to filter out some of the sideways action, denoted by a white background.
I included the option of a stop loss since it may be useful for some settings but the default is 100% which will not be triggered. If we get stopped out and we still have the conditions for our position on candle close, we re-enter.
INSTRUCTIONS
Bright Green = go long
Bright Red = go short
Green = we have conditions for a long
Red = we have conditions for a short
White = no trade
NB: the length parameters are set to 18 by default. The higher this number, the more long term this strategy becomes. So for a macro trader, a setting of 84 would provide a small number of trades per year.
Scalper Bot [Backtester]Scalper Bot is a scalping strategy, looking for market turning points between support and resistance pivots
Scalper Bot is developed for Crypto markets. It has not been tested on forex or any other markets, however it is not limited to Crypto markets.
It can also be used on any trading pair, on any exchange and in any time frame.
Scalper Bot comes complete with 3 alerts:
- LONG: LONG indicates that the market could potentially go up
- SHORT: SHORT indicates that the market could potentially go down
- CLOSE: CLOSE is a trailing stop loss and indicates that the market is no longer moving in the anticipated direction and that the current position should be closed. The same CLOSE signal is used for both LONG and SHORT
When setting up alerts, LONG and SHORT alerts should be set up to give an alert on ONCE PER BAR CLOSE, whereas the CLOSE alert should be set to ONCE PER BAR
Scalper Bot is a margin trading script, and caution should be exercised when using margin trading
Commission in the backtester is set to 0% as each exchange and each trading pair has its own commission structure. Be sure to change this value for backtesting purposes to the required commission.
---INVITE-ONLY SCRIPT---
This is an invite-only script, if you would like to try out this bot, send me a message
BITCOINDICATOR StrategyStrategy for BITCOINDICATOR for your own backtesting purposes.
The trade locations mirror the price label values generated by BITCOINDICATOR (You can check by clicking on Strategy Tester > List of Trades). Just like BITCOINDICATOR, this strategy works with all time frames, although higher time frames will result in better average profit per trade.
Inputs:
- Click the gear icon to adjust the backtesting date range inputs.
Properties (gear icon then click properties tab):
- The default initial capital is 0, and the default order size is 1 Contract (1 BTC ) per trade (this gives more weight to the most recent data).
* We recommend keeping the order size in contracts because if you use fiat, the time periods of lower-priced Bitcoin will have a greater impact on the strategy (since those trades would transact more BTC ).
- Pyramiding is the number of trades allowed to be taken in the same direction. The default value is set to 5, although it is rare to see more than 2 trades in the same direction.
* Additional trades in the same direction can be useful for adding on to your position or just for trend confirmation. If you prefer to see every SHORT followed by a LONG and vice-versa, you can change pyramiding to 1.
Side Notes:
- BITCOINDICATOR strategy can also be used for any Altcoin/Stable coin pair (such as ETH/USD). However, you will want to increase the order size from 1 Contract, to suit your Altcoin (For example, at the time of writing: 1 BTC = 47 ETH, so I would trade ETH/USD with an order size of 47 contracts). Of course, you can adjust the order size to the amount that you are actually trading.
- You will notice that the lower the selected time frame, the date range for backtesting becomes more limited. This is because there is a historical bar data limit of 5,000 - 10,000 bars depending on the tier of your TradingView account.
*Bitcoindicator Strategy is part of the Bitcoindicator package.
For detailed information on Bitcoindicator and how to add it to your charts, please visit:
www.bitcoindicator.com
Strategy tested on BTC/USD(Day) from 1/1/2017 - 10/1/2019 :
Dompeet Pompeet (Breakout bot)Dompeet Pompeet is my first attempt at a viable swingtrading algo.
It uses volatility and some trend analysis to enter trade when the market is about to breakout or break down. Having a trailing stop locks in profits and prevents runaway losses for low drawdown and 2:1 profit factor.
Settings to use:
BTCUSD or XBTUSD
4hr Timeframe or 2hr or 1hr (not shorter)
Bars window: 13, 16 or 20 bars
Moving average settings: 100/10 EMA to confirm trend
Trade the Trend - check on to only take trades long in a confirmed uptrend (vice versa short), otherwise it will attempt to buy and sell counter trend, which increases profits but also increases loss rate.
Trailing stop, values from 2-5% give the best results.
Take with a pinch of salt, there are some bugs in pine script which are difficult to track down but overall I'm pleased with the idea.
Mossy ADX and DI with Buy/Sell SignalsBasic ADX DI with colored bars to show buy and sell signals , made for 1min but shows general signals of strong or weak buy and sell signals.
Dark Red = Heavy Signal
Light Red = weak signal
Green = buy signal
Dark Green = Heavy Signal
Colors are to confirm or warn, Buy/Sell points are where to enter and exit.
Mossy ADX DI colored bars for quick scalping, works best with Heikin Ashi, confirm with other indicators, Mossy Pop is one shown and works well to confirm.
Remora v19.3 - aka Minuteman (TESTER)Separate weights and switches for the divergence added.
fixed the scale problem with the intensity logic. Having said that, even after the fix, the two scales are widely
apart. This is because the standard deviation can be quite low and the
green line can really be 10x or more away from it. As such, you might want to add a large weighting to the divergence
stuff.
Note: The standard deviations will be different with historical and live
data. Again this is due to the fact we update every bar with the live
data but historical data moves in chunks. So if you can imagine the
3hour green line might only move once every 180 bars with historical
data. That will produce a tiny stdev because it is not moving. However
on live data, it moves every minute and so will produce the correct
values.
Combo Backtest 123 Reversal and 2/20 EMA This is combo strategies for get
a cumulative signal. Result signal will return 1 if two strategies
is long, -1 if all strategies is short and 0 if signals of strategies is not equal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Secon strategy
This indicator plots 2/20 exponential moving average. For the Mov
Avg X 2/20 Indicator, the EMA bar will be painted when the Alert criteria is met.
Please, use it only for learning or paper trading. Do not for real trading.
WARNING:
- For purpose educate only
- This script to change bars colors.
Volatility System by Wilder [LucF]The Volatility System was created by J. Welles Wilder, Jr. It first appeared in his seminal masterpiece, "New Concepts in Technical Trading Systems" (1978). He describes the system on pp.23-26, in the chapter discussing the first presentation ever of the "Volatility Index", built using a novel way of calculating a value representing volatility that he named Average True Range (ATR). The latter stuck.
The system is a pure reversal system (it is always either long or short). One of its characteristics is that its stop strategy moves up and down during a trade, widening the gap from price when volatility (ATR) increases. Because of this, this strategy can suffer large drawdowns and is not for the faint of heart.
The strategy uses a length (n) to calculate an ATR. ATR(n) is then multiplied by a factor to calculate the Average Range Constant (ARC). The ARC is then added to the lowest close n bars back to form the high Stop and Reverse points (SAR), and subtracted from the highest close n bars back to calculate the low SAR. Reversals occur when price closes above the high SAR or below the low SAR.
The system is best suited to higher time frames: 12H and above. Its performance depends heavily on calibration of the length and ARC factor. Wilder proposes a length of 7 and a factor between 2.8 to 3.1. My summary tests at 12H, 1D and 3D on stocks and cryptos yield better results with values of approximately 9-10/1.8-2.5 for cryptos and 9-10/3.0-4.0 for stocks. Small changes in the values will sometimes yield large variations in results, which I don’t particularly like because it tends to imply fragility, whereas I’d expect more robustness from a system with such simple rules. Additionally, backtests at 1D on cryptos provide so little data that no solid conclusions can be drawn from them.
All in all, the system is not very useful in my opinion; I publish it more for completeness, since as far as I can tell, it did not exist on this platform before. I also publish it out of respect for Wilder’s work. His book laid the foundation for many of the building blocks used by system designers, even today. In less than a hundred pages he presented RSI, ATR, DMI, ADXR and the Parabolic SAR indicators, some of which have become built-in functions in programming languages. This is a colossal feat and has not been repeated. Wilder is a monument.
Some lesser-known facts about his book:
It sells for the exact same price it cost in 1978: 65$,
The book has always been published by Wilder himself,
The layout hasn’t changed in 40 years,
He sells >35K copies/year.
Gotta love the guy.
The strategy is shown here on BTC /USD with settings of 12/1.8 (the defaults are 9/1.8). It shows the system under its best light. Other markets will most not reproduce such results. Also, the drawdown is as scary as the results are impressive.
Features
The code is written as a strategy but can easily be converted to an indicator if you want to use the alerts it can produce. Instructions are in the code.
You can change the length and ARC factor.
You can choose to trade only long or short positions.
You can choose to display the SARs (the stops) in multiple ways.
You can show trigger markers.
A date range can be defined.
3 alerts: reversals (both long and short), longs, shorts. Remember that for the moment, strategies cannot generate alerts in TradingView, so the strategy must be converted to an indicator in order to make the alerts available.
MACKAVELLI Algorithmic StrategyI had a hard time finding a strategy that would work in different time-frames and multiple different currency pairs. This is what I ended up with after countless hours of research and testing. I designed this strategy for auto-algorithmic trading and it uses three different indicators for Long/Short positions and a 4th indicator for exiting positions.
1) A green-light indicator that tells you whether or not you can go long/short.
2) A confirmation indicator that executes the long/short positions.
3) A chop indicator that measures the distance between the two MA's. When they're too close a trade will not be executed, as this usually indicates a chop zone.
4) A third MA is used as an exit indicator.
5) Finally, a loop function is designed to prevent repeat signals. Once a signal is produced on bar close it cannot happen again until that trade is closed or a new position is opened.
Be advised, you need to adjust the settings for each currency pair and time-frame. Once you do that, back-test it and count the last 100 trades to determine accurately your wins/losses. Long entries are the top of the previous bar, shorts are the bottom of the previous bar. This is a more accurate way of counting wins/losses. Tradingview back-test's are not accurate because of where they estimate your long/short entries are, it's very misleading.
Right now I have it setup for 2hr USDCAD with a back-test of 58% win rate on the last 100 trades.
The chop indicator is set to 0.04, I suggest starting there. 0.03 is the lowest I would go. You can go all the way up to 0.1 and higher if needed. You'll start missing big trades though.
The EMA for green-light signal is set to 10, a lower number will give you more entries but less accurate results, bigger number will give less entries with more accuracy but with missed opportunities. 10 is a good starting point.
This strategy is also designed so you can use tight stop losses to prevent large losses. This is because the strategy typically catches trends on the way up/down, minimizing risk for reversal.
I use Heikin Ashi candles for a smoother chart to work with. I have not tested this strategy with normal candles.
DEMO this strategy before using it live and make sure you back-test and tune it before you start. This is written in PINE V3 SO IT WILL NOT REPAINT.
High Yielder : USDINR A very simple strategy that can be used on any Ticker, altering parameters in the strategy after applying is possible and recommended. The core component of the code is based on Inside Bar Strategy. Tweaked to yield high returns in a short time with the least number of trades. It would be very economical for swing traders.
First , Controls are as follows :
1. Time Frame for Trade Sessions
2. High & Low compare parameter
3. Profit Target & Stoploss Triggers
Second , Using the strategy :
When the Buy or Signal is marked on the chart, I recommend that the trader wait for the next three to four candles to place an order to prevent sudden reversal marking which I have found to be a common sight after altering parameters.
Third , Feedback and Live-Testing :
I'm always eager to help out with setting up the parameters for your choice of ticker should you have any difficulties. Just drop a message and I'll get to it as soon as possible. I would appreciate having a look at your outcome using the strategy, as I have tried this script on a limited number of tickers. Any freakish result would attract my eyes immediately but haven't come across any till now.
Fourth , Source Code
Drop a message below or directly and I'll send it across. :) There's more where this came from. Cheers!
B3 FisherTransform TraderB3 Fisher Transform Trader ~ As you may have found, Fisher Transform (FT) is not an easy beast to tame. However, I have never seen an indicator so consistently early to a move, so, I had to pry into it some more. I tend to stick with indicators that work on many symbols and time-frames, but FT isn't one of them. For starters, I only had a small amount of success in back-tests and only with stocks not futures. I did find however that when set to 9-10 and tightly trailed with a signal average and then put to a intermediate chart like 2h to day bars, it seems to have a nice sweet space in back-tests. I found this to work in multiple platforms, and after plenty of testing, I came up with a few personal tweaks to the indicator. Then walking forward the tests have played out like the back-testing, which is key!
Each symbol you trade will have a sweet spot bar interval in that intermediate area, so long as you keep the input setting to 9-10 for the FT and 2-3 for the signal average length. You are welcome to test well beyond these parameters . :)
Here is a quick view of the success the system has had trading AAPL in binary long or short at all times fashion over the last 10 years.
virtuosotrader.files.wordpress.com
~B3
Strategy Moving Average Stop and Reverse alertsSo this is for strategy for the Moving Average Stop and Reverse alerts
its seems to be nice , I did not play so much with the TF but one can change settings as he wish
my indicator with alerts is
I think the results is more due to the condition of the test rather to the model? on the other hand the original model in version 2 (not mine) had similar results . also TV put the signals one bar forward where in reality the signal will beep correctly at the right bar as shown in graph
the model is attempt to make SAR better
MondayOpen Gap strategyThis strategy open orders on first bar of the week if there is a gap with Friday close price.
First bar could be on Sunday or on Monday, it depends on broker time.
Adjust starting hour with broker time. Use arrows to help finding correct broker time.
Also you should adjust gap size and exit hour.
Do not place on Daily charts.
Please use comment section for any feedback.
Next improvement (only to whom is interested to this script and follows me): study with alerts on multiple tickers all at one. Leave a comment if you want to have access to study.
********************************** IMPORTANT*******************************
I have developed an expert advisor for metatrader4 (MT4) and for jforex platform: results of expert advisor form 2015-01-01 to 2018-11-25 are very good with low drawdown and good profit.
********************************************************************************
Relative Estimated Price KivanÇ version (Strategy) By Wicksell Thanks to the great work of KIVANÇ in the Relative Estimated Price REP by KIVANÇ fr3762, it has adapted modifications in the Lookback bar length, transformed into strategy, where a line determines a relative average price of XBTUSD, BTCUSD, ETHUSD and BCH.
the line is a calculation, where it involves reading previous candles where it determines what the current price should be.
When the REP line is above the candle, open buy and close sell, when it is below, open sell and close buy.
When setting which currency, do not forget to change the settings where they are:
1 - XBTUSD
2 - BTCUSD
3 - ETHUSD
4 - BCHBTC
may also be modified:
the Lookback bar length, stop loss settings, test date.
The best results are in the 1H time, with the default settings, but try to modify the data and if you find better results, I would be grateful if you post here.






















