TradingView
sydneyshan
1 mars 2018 05:33

"Crypto Cradle" trigger 

Bitcoin / DollarBitfinex

Description

This script highlights bars/candles that match a few of the 10 criteria in Craig Cobb's (@TraderCobb) Crypto Cradle checklist-based trading strategy.

A long signal is flagged if the low of a small bullish candle is within the cradle.
A short signal is flagged if the high of a small bearish candle is within the cradle.

By default, bars/candles are considered 'small' if their high & low range is below 34% of the largest bar/candle in the last 90 periods prior).

This study is designed to be used in conjunction with the full Crypto Cradle checklist. It should not be used without a number of other factors being confirmed.

If you would like to know more, check out the Crypto Cradle strategy here:
tradercobb.com/education-course-2/

Notes de version

Just adding in the EMA 10 & 20's so you don't have to do this manually.
Also added in transparency to background colours.

Notes de version

Excluded the currently playing-out bar from highlighting (rules state it has to close small).

Improved alerting functionality.

You can now create an alert for both long & short conditions.

1. Click '+' in the Alerts panel.
2. Condition: select 'Cradle Tip', 'long signal', and 'Cradle Long Alert' OR 'Cradle Tip', 'short signal' and 'Cradle Short Alert' depending on the direction you wish to monitor.
3. Options: select 'Once Per Bar Close'

Notes de version

This is a major rewrite of the original script.
Updates:
1. 95% of the bad signals (bull/bear) have been eliminated. :-)
2. Revised the method for detecting 'short' candles (candle size is now relative to the EMA10/20 cradle size, not previous x bars as it was previously)
3. Added more granular control over what 'quality' of signals you see (see indicator settings). Play with them if you like to live on the wild side.
4. Added entry price target for bull/bear signals
5. Added flag or cross above next bar if the entry requirements were/were not met.
6. Added MACD-based filtering of good/bad signals
7. Improved alerting functionality
8. Optimised code to avoid repeatedly calling ema() functions

TODO:
I've found some incorrect bear signals around dramatic price action (very few) and will address this in the next version.

HOW TO USE:
Add this indicator to your chart.
When a bull candle closes and the background highlighted green the following candle will have an entry point marked and the expectation is you'll have a continuation of the bull run. For back-testing purposes I've included a green flag or red x depending on whether the signal should have been followed by an entry.
Vice versa for bear candles with background highlighted red.
Set your targets, stop loss, and leverage responsibly.

If you're not getting enough signals try different time periods (15M/30M/1H/2H/4H etc) or if you like to walk on the wild side, turn on some of the more lenient candle settings by clicking on the indicator's cog/settings icon.

This script works on forex, crypto, etc.

Let me know your thoughts in the comments below.

Notes de version

Another big update!

Updates:
1. Better detection of likely price reversal through MACD, RSI, and monitoring of counter-trend price movement prior to entry.
2. Script will monitor entry criteria for the next 1-4 bars (including MACD & entry price) and display green flag if 'safe' and red cross when trade is not recommended.
3. More granular controls if you'd like more signals (settings are at their 'safest' by default)

Notes:
The entry price is marked with a small x.

Alerts:
1. Bring up the 'create alert' dialog.
2. Select 'Crypto Cradle' from the first 'Conditions' select menu (it will be defaulted to your ticker pair)
3. Select 'Long Target' or 'Short Target' from the next 'Conditions' select menu (it will be defaulted to 'EMA(10)'
4. Select 'Cradle Long Alert' or 'Cradle Short Alert' from the next 'Conditions' select menu
5. Select 'Once Per Bar Close' from the Options
6. In the Message make a note of the ticker and period you're alerting on (ie BTCUSD 4H)

Please share your comments below.

Notes de version

Added a unified alert for either long or short conditions.

To use, add an alert using the conditions "Crypto Cradle", "Cradle Short/Long Alert", "Cradle Short/Long Alert", and Once Per Bar Close.
Remember to fill in the Ticker and Timeframe in the message.

Notes de version

Updated example snapshot/graph (no code change).

Notes de version

WHAT'S NEW?
1. Add a debug mode
2. Refined the criteria for long/short opportunity detection further
3. Added a generic 'Cradle Short/Long Alert' alert condition
4. Entry price '+' more visible

ALERT:
To create a generic alert, click the + button in the Alerts panel, select the script's name from the first list, select 'Cradle Short/Long Alert' from the next two lists, and select 'Once Per Bar Close'. Don't forget to add the ticker and timeframe to the message.

DEBUG MODE:
All 'potential' signals are highlighted in a more transparent green/red.
The red/green circles above the bar relate to the 5 criteria in the script's settings.
From top to bottom the dot will be green under the following conditions:
Dot 1 - Small candle's wick has not broken through the EMA 10/20 cradle
Dot 2 - Small candle's MACD signal lines are in the correct order (helps confirm direction)
Dot 3 - Small candle does not have recently opposing momentum (large candles heading in opposite direction - 5 candle look-back)
Dot 4 - Small candle is not preceded by overbought/oversold RSI (5 candle look-back)
Dot 5 - Small candle's open/close is in the cradle (bonus factor for extra confidence)

Notes de version

This is a complete rewrite from scratch!

The indicator now looks at price trend, MACD convergence, next higher time frame trend & EMA order, and other essential factors.

I'll be working to iron out any bad signals over the coming weeks.

Notes de version

Updated snapshot

Notes de version

Small algorithm tweaks.

Notes de version

Added next higher time period check.
Added threshold for candles that get 'close enough' to cradle but not breaking it.

Notes de version

This indicator has been superseded with "Crypto Cradle v5":

tradingview.com/script/7RpXSWUe-Crypto-Cradle-v5/

Notes de version

This script is now superseded by Crypto Cradle v6:
tradingview.com/script/dIODLr62-Crypto-Cradle-v6/
Commentaires
mannines
awesome work, does it automatically update?
benedictnoone
I was looking into doing something similar myself and then stumbled on yours. This is fantastic, thanks for sharing!
Aerostan
Hi Shannon. Where is the Script found? Under which tab, or section?
Thanks, Stan
sydneyshan
Hey @Aerostan, if you add this to your favourites, you can then right-click on your chart and select ‘add indicator’ then select your favourites on the left and you’ll see it available to add.
KwaggaSmit
Hi Shannon, I've done Trader Cobbs courses and wondered if you have back tested this indicator in Trading View? Would love to know the results.
cryptomius
@KwaggaSmit, I'm now up to v5 for this indicator (which hasn't been published yet) and the outcome is an average of 60% ROI over a series of trades basis.
LongShortReport
@cryptomius, Hi there, I Was wondering if you could please explain to me what 60% ROI means over a 'series of trades basis'? Over how many trades w/ what kind of risk management? Thanks for all your hard work.
cryptomius
@LongShortReport over say a 100 trade basis the expectation is you’ll increase your capital by 60% (ie $10,000 -> $16,000). The position size is relative to the entry vs stop price (never risking more than 1% of overall portfolio per trade/position if stopped out). Ideally you’ll be looking for good trending conditions on the higher timeframes to support a signal on your entry timeframe. Google search TraderCobb for more specifics.
BrendanMoss
great work, i didn't even know you could runs scripts like that, will have to look into it a bit more.
Plus