TradingView
gregh2
12 feb 2021 14:48

Ichimoku Backtester with TP, SL, and Cloud Confirmation Option 

Ethereum / TetherUSBinance

Descrizione

Started with the Basic Ichimoku strategy from Mizuki32. Added Take Profit, Stop Loss (for both long and short), and a toggle to wait for confirmation from the cloud.

Note di rilascio

Added RSI options for Entry and TP.

Note di rilascio

Added option to take profit after X bar closes past the RSI threshold.

Note di rilascio

Updating defaults to have no RSI, no TP, no SL

Note di rilascio

Updated Backtester to have toggle for Stoch RSI and cleaned up RSI logic on strategy exit.

Note di rilascio

Cleaning up Inputs, Removing Stochastic RSI, removing TP after sequential RSI

Note di rilascio

Added back Stoch RSI Toggle per user request. Moved date range to top so the data selector is usable.

Note di rilascio

This update cleans up the code and corrects many bugs. It is recommended you update your strategy and the matching indicator.

MAJOR BUGFIXES:
1. Corrected logic for tenkan and kijun cross to use crossover and crossunder fuctions. This prevents possible misfiring of alerts
2. Corrected RSI and Long/Short logic so RSI TP fires correctly.
3. Correct the Chikou Span Plotting (it was plotting in the wrong direction of the current price).
4. Corrected offsets. Previous indicator that logic was sourced from incorrect offset everything by +1

Note di rilascio

Updated the color of the chikou span so it's easier to see.

Note di rilascio

Fixing entry and exit logic from update

Note di rilascio

Updating name and cleaning up some logic

Note di rilascio

Fixed broken short entry logic
Commenti
raoultesla
gregh2
Some kinda' module man.
Impressive. Just actually read, some vids, historical observations Ichimoku.
Why everyone does not use it, don't understand.
It is not the end all of course. It sure is ergonomic.
Going to take your code out for some laps. Pool, race track.
Totally classy to Open Source this.
Cheers.
gregh2
@raoultesla, Thanks! I agree. Ichimoku doesn't get enough use. Feel free to suggest improvements.
gregh2
The matching indicator with alerts is available here:
tradingview.com/script/FteZeQzb-Ichimoku-Basic-Alerts/
celltech2000
@gregh2, have you considered using Stoch RSI instead of RSI?
gregh2
@celltech2000, Great idea. I just published a new version with a toggle for stochastic RSI. Please take a look and let me know your feedback.
jgeorge888
Repaints? Upon backtesting, the buy or sell alert comes one candle late, so one would likely not be able to obtain the same entry/exit in real time.
AnuAn
Reposted by mistake, hence edited.
AnuAn
@gregh2 Greg very generous of you and thanks a ton for sharing this script. It is awesome. I have been experimenting with Ichimoku Cloud, Stochastic RSI and MACD Leader. I feel, it may work on even smaller Time Frame.
Have you looked at MACD Leader? What are your views?
Thanks again for sharing wonderful script.
tradingmir85
Hi Gregh2, thank you a lot for sharw this Amazing Tool.
I have Just a question, I'm not an Expert programmer hovewer I would like add a condition to Better improve accuracy in according with my trading system.
I would like add Laggin span cross over/cross the Cloud/price as confirmation signal before enter into the market.
I've checked the script and i've tried several time to modify this , but every attempt was a fail till now.
What do you think about add confirmation by LS?
Also, I would like to know with wich time frame the indicator perform better?
Thanks again ;-)
rjinfosoft
Hi gregh2, I love the strategy but it REPAINTS. I test with the 2H chart. Please fix the repaints.
Altro