TradingView
ramsay09
2020年9月18日午後2時42分

The Strategy - Ichimoku Kinko Hyo and more 

Ethereum / DollarBitfinex

詳細

The purpose of this strategy is to make the signals from my scripts available for verification by backtests. Different signal and filter combinations can be created and specific manual parameter optimization can be carried out.

In detail, this strategy includes:

23 entry signals
two entry filters with each 9 filters
two exit filters with each 9 filters
take profit and stop loss
time period for backtesting

リリースノート

Bug fixed.

リリースノート

Added all Ichimoku signals as filter.
Chikou X Price is not working. At the moment I don't know why... but the study signal is working.
I have to rework the exit filters...

リリースノート

Exit filter bug fixed.
Exit filter parameter added.

リリースノート

Tow DMI ADX signlas added.
Signal 1 long:
Di+ is above D- and ADX is between DI- and DI+ (long_1 = diplus_s > diminus_s and adx_s < diplus_s and adx_s > diminus_s )
Signal 2 long:
DI+ is above DI- and ADX is above ADX Threshold (long_2 = diplus_s > diminus_s and adx_s >= adx_thres)

Tailing stop added.

リリースノート

Segments signal from my "Two Fractals Trendlines" study added.
Trend line signal from my "Two Fractals Trendlines" study added. This signal is not rsi filtered by default like is the study but a pure trendline signal of two fractals.
Changed Bar sig into Bar cross breakout sig.

The signals are not repainting according to my tests. At the moment I don't trust the backtest results with trailing stop... didn't live tested.

リリースノート

Chikou bug fixed.
Minor improvements.
New signals added.

リリースノート

SuperTrend exit filter bug fixed.

A note on repainting and trailing stop:
All signals, input filters and output filters do not repaint unless "Recalculate after every tick" is used.
Backtests with a trailing stop are only useful for large values. The reason is that TV backtests only work with bar closed. As a result, the trailing stop exit is always, in the case of a trailing long position: last candle high minus offset. Apart from that, trailing stops generally seem pointless. I did back-tests with Metatrader mt4 on every tick basis in Forex markets and found nothing useful. I hoped it would be different with BTC, which is not the case.

リリースノート

Screenshot issue

リリースノート

Some signals added to filters.
Fractals 1-2-3 signal added.
TRIX indicator added.
Filter bug fixed.

リリースノート

Screenshot issue.

リリースノート

Entry signals added:
Higher-low/Lower-high bar sig
Entry on every bar-open sig

Exit limit added

Pyramiding mode added (at the moment it makes sense to use pyramiding only in long or short direction)
A guide to backtesting in pyramid mode:
Choose your favorit timeframe and market e.g. 1h and BYBIT:BTCUSD -> choose long or short entry e.g. long -> enable "Pyramid mode" -> choose your favorite entry signal -> optionally choose an entry filter -> choose an exit filter or take profit, stop loss, limit price, trail price e.g. "Enable take profit" -> set a backtesting periode with a trend e.g. long 01.11.2020 to 21.11.2020 -> increase properties/pyramiding e.g. 200

A general note on pyramiding:
Pre-analyze your favorite market to make sure the probability of a trend is very high. Pyramiding can be used very agressively and can kill your account if you are wrong. Always use sub accounts with money you can afford to lose for trading with pyramiding. Use low leverage and small entry positions. This is just a tool, you act at your own risk.


リリースノート

SMA filter bug fixed.
Code cleaned up.
Take average profit added.

リリースノート

"Toggle take-average-profit type" added.
Reverse fractal signal improved.

リリースノート

Kijun-dist X Tenkan-Kijun-dist signal added (inspired by a follower). Also implemented in the Kijun-dist script.

リリースノート

Kijun-dist X Tenkan-Kijun-dist signal replaced by Kijun-dist X Tenkan-dist signal.

リリースノート

Revised parts of code and some signals.

リリースノート

Screenshot issue.

リリースノート

"2nd ENTRY Signal" option added. The two available entry signals are OR-linked. All filters and exits work with both entry signals.
Reverse fractal signal revised.

リリースノート

"2nd ENTRY Signal" bug fixed.
Reverse fractal signal improved.

リリースノート

Grid signals added. For precise grid gaps, use a large gap size with a small time frame as the strategy works with closed bars . For BTC, e.g. use a grid gap = 300 in a time frame of 1h or lower. Prefere a long or short grid in pyramid mode with average take profit. Pre-analyse whether the market is trending or moving sideways.

リリースノート

"Take average-entry profit" works now similar to the forward grid. Take profit is taken in equal steps. This is useful in conjunction with "take average-entry profit - quantity ..." < 100%.
Trix added to CB/CB signal.

リリースノート

Removed forward grid. TP and SL are not working correctly with a short-grid. I am looking for an alternative way that works with Tradingview.

リリースノート

Screenshot issue.

リリースノート

The average-entry TP and SL work properly in a long grid (at least with BTC on Bybit). Short grid still pending...

リリースノート

Script reworked.
Tooltips and groups added.

リリースノート

Strategy parameters changed/adapted.

リリースノート

Changed the average take profit and the average stop loss calculation. Now the profit and the step is calculated on basis of ATR.
It seems I have to rework some signals... maybe later.

リリースノート

Stop loss bug fixed.

リリースノート

Time frames for entry signals added. Ichimoku signals to filters added.

リリースノート

Pin bar signal added.
Average position price line added.
Time frames for entry and exit filters added.

リリースノート

Removed "Backtest (...)".
Fixed entry signal bug when using a higher time frame filter.
Script now works with contracts instead of percent of equity.
MACD(fast) slope sig (no pyr) added.

リリースノート

All signals now also work with pyramiding.

リリースノート

Repainting option added.

リリースノート

Script converted to Pine v5.

リリースノート

Screenshot issue.

リリースノート

Info panel for unrealized profit/loss added.
Some copy/paste bugs fixed since the last conversion. Now everything should work correct again.
New signals and filters added.
IB/IS signal improved .
Comments for strategy.close() added.

リリースノート

Exits filters revised.

リリースノート

Script revised (signals, fiters, exits, live trading comments)

リリースノート

Code revised/updated.
Inputs rearranged.
コメント
didaskein
@ramsay09 The ADX strategy is very nice in 4H ;) when we have a clear trend. But we need to avoid the range ;) (Grid should be good for range ?)
I don't know if you found good settings for scalping in 5mn ?
ramsay09
@didaskein, Don't try to trade noise. You need a trend to make a profit. If the range is large enough, you can try the reverse signals in the 'both' mode. Signals like pinbar, grid reentry and grid reverse could work. In my opinion it is very difficult to program a filter to separate trends from range markets in a very short time frame. It's just too much noise.
didaskein
@ramsay09, Hi Thank you for your feedback. Would you like to do a short call with me ? i would like to show you something.
didaskein
@ramsay09 Thank you very much for this nice strategy !!! Could you share with us the best combinaison you have found for the triggers ?
Thank you very much !!
ramsay09
@didaskein, There are many good combinations. It depends on the Market environment you want to trade in. You can make the settings I've listed below for the upcoming uptrend in BTC. These settings will continually buy and take profits and to some extent protect your account from losses on pullbacks. But be careful in September and Q1 2022:
Chart timeframe: 4h
Pyramid mode: activated and you need to increase the value of the pyramiding order to 100 or more (in the properties). In pyramiding mode you must always do this and set this value to 1 if not in pyramiding mode.
1st entry signal: 2. DMI ADX sig or chikou x price sig
Define the backtest period or start of trend: 20.07.2021 (for a backtest set 20.08.2020)
Enable take profit - average-entry profit: enabled
Take average-entry profit - quantity of position (percent): 20
Take profit based on average-entry price: atr factor: 1.4
Enable stop loss - average-entry loss: enabled
Stop average-entry loss - quantity of position (percent): 20
Enable trailing price: enabled
Trail points and offset: 7200

This is just a tool and you are the operator and I am not a financial advisor. I wish you success.
didaskein
Hi @ramsay09,

Thank you very much for your advice about your Strategy - Ichimoku Kinko Hyo and more ! :-)

I found maybe some interesting settings for your strategy ;) (it's seem working nice with the top crypto ETH, SOL, ADA, EGLD, DOT, LINK, BTC, DASH, VET, LUNA ... :)

H4
Position = Long
Pyramiding = false
1st Entry Signal = 2. DMI ADX Sig (very good thank you)

Exit Filter 1 = ADX exit

ENTRY Signals :
DI Length (signals) = 14
ADX Smooth (Signals) = 14
ADX Threshold (signals) = 30

EXIT Filter
Exit Adx Period = 14
Exit Adx Smooth = 14
Edit Adx Threshold = 25

Enable TP avg position price = true
% = 100
atr length = 50
atr TF = W
Atr Factor 1

Enalbe Stop loss = true
Stop % = 100
Atr lenght = 50
Atr TF = W
Atr Factor = 0.5

I do not enable Trailing Stop loss because the backtesting in tradingview is not very good with it : tradingview.com/script/9CG43Ho2-Why-is-it-ok-to-backtest-on-TradingView-from-now-on/

I also add the function f_secureSecurity in order to be sure to get the data without repaint for the ATR (Week data for Take profit and stop loss)
tradingview.com/script/cyPWY96u-How-to-avoid-repainting-when-using-security-PineCoders-FAQ/

The logic of Take profit from this article could be intersting tradingview.com/script/jjhUHcje-Stepped-trailing-strategy-example/

It could be also nice to show the position like this : tradingview.com/script/JuOqMfBq-ADX-RSI-Strategy-by-Trade-Rush-created-by-SirPoggy/

If you have other nice idea, on how to improve the score , it will be with pleasure ;-)
And also if you want to do a call to discuss on strategies ;)

Kind regards,
DiDasKein
didaskein
It could also be interesting to set calc_on_every_tick = true, in order to get the event of the Stop loss immediately and not after 4H :)
Gooba
Well done! I'm particularly impressed that you got your pyramided orders to close with one alert, not several. Which part of your code accounts for that?
ramsay09
@Gooba, Thanks for your comment and yes, the several closes were annoying... The relevant lines of code are 1181 - 1272. In detail, it's lines 1213, 1214 and 1249, 1250 and 1271, 1272 (for stop loss) and 1194,1195 and 1238,1239 and 1260,1261 (for take profit).
Gooba
@ramsay09, Fantastic. Thank you so much for your response. Again, congrats on an amazing piece of code.
詳細