Starbots

Self Optimizing ROC [Starbots]

Self Optimizing Rate of Change (ROC) Strategy. (non-repainting)

Script constantly tests 15 different ROC parameter combinations for maximum profitability and trades based on the best performing combination.
You will notice that signal lines switch after a bar close sometimes, this is when the strategy optimizes to the better combination and change plots, strategy is dynamic.

---------------------------------------------------------------------------------------------------------
The Rate-of-Change (ROC) indicator, which is also referred to as Momentum, is a pure momentum oscillator that measures the percent change in price from one period to the next. The ROC calculation compares the current price with the price “n” periods ago. The plot forms an oscillator that fluctuates above and below the zero line as the rate of change moves from positive to negative. As a momentum oscillator, ROC signals include centerline crossovers, divergences, and overbought-oversold readings.

ROC = (Close - Close n periods ago) / (Close n periods ago) * 100
-----------------------------------------------------------------------------------------------------------

The logic of self - optimizing:
This script is always backtesting 15 different combinations of ROC settings in the background and saves the net. profit gained for every single one of them, then strategy selects and use the best performing combination of settings currently available for you to trade.
It's recalculating on every bar close - if one of the parameters starts performing better than others - have a higher net profit gain (it's literally like running 15 backtests with different settings in the background) strategy switches to that parameter and continues trading like that until one of the other indicator parameters starts performing better again and switches to that settings.

We are optimizing our strategy based on 15 different 'lengths' or also called 'periods' of ROC.

Inputs (ROC period) : (you don't need to change them, you have a nice wide variety of periods)
🔴Roc (default=9) = 5
🟢Roc2 = 6
🔵Roc3 = 7
🟡Roc4 = 8
🟣Roc5 = 9
🟠Roc6 = 10
🔴Roc7 = 11
🟢Roc8 = 12
🔵Roc9 = 13
🟡Roc10 = 14
🟣Roc11 = 15
🟠Roc12 = 16
🟡Roc13 = 17
🟣Roc14 = 18
🟠Roc15 = 20

Backtester in the background works like this:
backtest ROC1 => save net. profit
backtest ROC2 => save net. profit ;
backtest ROC3 => save net. profit ;
..........
..........
backtest ROC15 => save net. profit ;
=>
It will backtest 15 different ROC parameters and save their profits.
Your strategy then trades based on the best performing (highest net.profit) ROC Setting currently available. It will check the calculations and backtest them on every new bar close - it's like running 15 strategies at time, and manually selecting the best performing one.
________________________________________________________________________


If you wish to use it as INDICATOR - turn on 'Recalculate after every tick' in Properties tab to have this script updating constantly and use it as a normal Indicator tool for manual trading.


-- Noise Filter - This will punish the tiny trades made by certain parameters and give more advantage to big average trades. It's basically normal fee calculation, it will deduct 0.xx % fee from every trade when optimizing. You usually want it to have the same number as your fees on exchange. Large number will choose big long swing trades, small number will prioritize small scalping trades.
-- Turn on ROC Combination Profits and spot the worst/best performing combination. You can change periods to get the best performance after checking this table stats.
-- Backtesting Range - backtest within your desired time window. Example: 'from 01 / 01 /2020 to 01 / 01 /2023'.
-- Optimizing range - you can decrease the amount of bars/data for optimizing script. This way you can keep it up to date to more recent market by selecting optimizing range to optimize it just from the recent 3-6months of data for example. Strategy before this selected range will normally trade (backtest) based on the first ROC period ( 'Roc(default=9)' Input) parameter in your menu if you have Optimizing Range turned on.
**** I recommend 'Optimizing Range' to be turned off, use max amount of available bars in your history for optimization script.
-- Strategy is trading on the bar close without repaint. You can trade Long-Sell or Long- Short. Alerts available, insert webhook messages.
-- Turn on Profit Calendar for better overview of how your strategy performs monthly/annualy
-- Recommended ROC periods: from 5 to 24.
-- Recommended Sources : close, hlc3, hlcc4
-- Recommended Chart Timeframe : 4h +
-- Notes window : add your custom comments here or save your webhook messages inside here
-- Trading Session: in a session, you have to specify the time range for every day. It will trade only within this window and close trades when it's out. Session from 9am to 5pm will look like that: 0900-1700 or 7am to 4:30pm 0700-1630. After the colon, you can specify days of the week for your trading session. 1234567 trading all days, 23456 – Monday to Friday ('1 is Sunday here'). 0000-0000:1234567 by default will trade every day nonstop. 00.00am to 00.00pm and 1234567 every day of the week for example - Cryptocurrencies.

This script is simple to use for any trader as it saves a lot of time for searching good parameters on your own. It's self-optimizing and adjusting to the markets on the go.

Private strategies and Signaler. www.star-bots.com
초대 전용 스크립트

이 스크립트에 대한 접근은 작성자가 승인한 사용자로 제한되며, 일반적으로 지불이 필요합니다. 즐겨찾기에 추가할 수 있지만 권한을 요청하고 작성자에게 권한을 받은 후에만 사용할 수 있습니다. 자세한 내용은 Starbots에게 문의하거나 아래의 작성자의 지시사항을 따르십시오.

트레이딩뷰는 당신이 스크립트 작성자를 100% 신뢰하고 스크립트의 작동 방식을 이해할 때까지 스크립트 비용을 지불하고 사용할 것을 권장하지 않습니다. 대부분의 경우 트레이딩뷰의 커뮤니티 스크립트 에서 무료로 좋은 오픈 소스 대안을 찾을 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

작성자 지시 사항

PM or visit our website for more info. www.star-bots.com

차트에 이 스크립트를 사용하시겠습니까?

경고: 액세스를 요청하기 전에 읽으십시오 .