i have been a python programmer for some years studying artificial intelligence for general purpose; after some time i finally decided to have a look at some finance related stuff and scripts.
Moved by curiosity i've decided to make some but decisive modifications to a script i tried to use initially but without success: the LVQ machine learning strategy.
So after studying the charts and indicators, i have rewritten this script made by Capissimo and added heavy filtering thanks to and , then fixed repaint and other issues.
I hope you enjoy it and that it could increase your possibilities of success in trading.
HOW TO USE THE SCRIPT
Add the script to 3h+ charts like for example BTC 4h, 6h, 8h, 12h, daily. (In order for it to work on shorter timeframes charts you can try to change to lookback window but i dont advise it).
Change only and volfilter( filtering) settings to try to find the best winrate. Leave dataset to open. Fyi the winrate isn't 100% accurate but can give you a raw vision of final results.
Use alerts included for trading and and in options click on 'Once per bar'. If you have checked 'Reverse Signals' in the control panel you have got more 'risky' signals so be advised if trading and stocks.
Exit trade signals not provided, so it is recommended the use of take profits and stop loss (1.5:1 ratio)
As always, the script is for study purposes. Do not risk more than you can spend!
Original LVQ-based strategy made by capissimo
Modified by gravisxv 13/10/2021
The script is using ai strategy and is now overperforming,semiprofessional and easier for everyone to understand. I transformed it to a complete trading system for crypto, futures etc. It works on most timeframes in every condition thanks to multiple varying settings.
Most important new feature now is that the bot start the trade and quit the trade in profit automatically. No further manual intervention needed from the trader(hooray).
Lookback window is now called 'LBW Reactivity' as you can increase this value upto 500 to reduce the buy-sell reactivity to changes in price and so it is reflected in the number of trades. Useful for traders who want low-frequency trading and sure profits.
Fixed a bug that caused a mismatch between plotted signals and alarms.
Added customizable Take profits and Stop loss alarms(code based on theCrypster 2020 open source study script thx) for people who prefer automated trading, then included a panel options to enable 'aggressive stance' for lower timeframes trading(so that the bot works on 1 & 1+ minute charts).
Important: set your alarms with 'Once per bar'. The setting 'Once per bar close' works as well but it might be too late. Please do note that that tp and sl are executed even during the candle(thus optimal reactivity).
Informational panel on the right now displays last trading signal plus volatility value (might help in manual trading). The number of trades is now correct. The winrate is approximated(because it doesn't consider tp and sl atm and other options).
The volume filter has better filtering in order to remove false signals, just change the threshold value to fit it for best backtrade results. If trading lower timeframes please consider increasing 'Volume filter threshold' to remove more unwanted signals and viceversa.
The script can now be directly hooked for trading with automated alert systems as it provide multiple start-stop alerts. Happy trade.
Please consider to make a small donation(a coffee lol) to help me develop the bot.
// BTC 36hcvdyoRqw8VcoEQvSKZ6AYGPFYEP4upp
// XRP rf5VFsp5HnmAwiuQugQsrNALwPkCWesAGL
// LTC M8U1xdoU34peZTz7b8Ve48ubLGQoGW9myn
// TRON TEUziyvYmhjnuH3bzgvCdRoZBLcvMbGPqo
The script is only for study purposes. Do not invest more than you can spend! Thanks for your undestanding & to TV community.
Added volatility filter multiplier option to magnify volatility filter effect
Added safety exits option as a stop measure when price is starting to move against the trade direction
Added directional movement filter for removing false signals
Added Take Profit alarm work for both long-short
-Converted to v5
Significant release for more automatization
Important: Signals are fully synchronized with alerts via correct candles (the problem was persistent in v2).
If you still encounter some problems let me know. -Work in progress
// Added more signals for added risks-rewards in ai-automatic mode
// Option to enable heikenashi smoothing
// Automatic exits-trend exits with manual level tp always on (they work together)
// Added DCA for short-long in emulation mode(you need to use external alert systems for safety orders) and SWING trading
// Possibility of exit in immediate trend or wait at next trend
// Institutional trading option catch whales movements and avoid range market situations
// Scalping filters on-off switch
// Changed machine learning feed data to include monetary movements
// Manual mode consist of supertrend mode red/green zones and dual hma moving indicators for expert users.
// Exit Long-Short Global alerts provide exit alarms when takeprofit/stoploss/changetradedirection signals are triggered
// AI signals are now more efficient with possibility of fine-tuning
// Added multiple modalities for exit option
// The filters now offer a full suite of parameters to remove unwanted signals
// Changed DCAbot into Supertrend Pivot, scalping and swing updated too
// Some changes to takeprofit/stop loss levels
I sann TradingView-anda har författaren publicerat detta skript med öppen källkod så att andra handlare kan förstå och verifiera det. Hatten av för författaren! Du kan använda det gratis men återanvändning av den här koden i en publikation regleras av våra ordningsregler. Du kan ange den som favorit för att använda den i ett diagram.
Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.