[OKX Signal Bot] Strategy Script Set Up TemplateWelcome to the Beginner's Guide: Creating a Custom Trading Signal on TradingView with OKX Signal Bot Integration. This entry-level script provides a step-by-step reference for beginner TradingView users who want to develop their own trading signal and seamlessly integrate it with the OKX Signal Bot.
Using a simple yet effective Relative Strength Index (RSI) strategy as an example, this script walks you through the process of creating a trading signal that generates buy and sell alerts based on RSI conditions. By following this guide, you will gain hands-on experience in building and customizing your trading signals while learning how to connect them with the OKX Signal Bot for automated trading execution.
The script begins with defining the necessary strategy parameters, such as the RSI length, overbought level, and oversold level. These parameters can be adjusted to suit your trading style and preferences.
Next, the script calculates the RSI value based on the specified length. The RSI is a popular momentum indicator used to identify potential overbought and oversold market conditions.
The script then establishes the trading signal conditions. In this example, a long entry signal is generated when the RSI crosses above the oversold level, indicating a potential entry point. Conversely, a long exit signal is triggered when the RSI crosses below the overbought level, suggesting a potential exit point. Similarly, the script also supports short entry and short exit signals.
To integrate the script with the OKX Signal Bot, the script includes the necessary inputs for the Signal Token. You can provide your unique Signal Token to connect with the OKX Signal Bot and enable automated trade alerts and execution.
The script also incorporates a custom alert message function specific to the OKX Signal Bot integration. This function generates the alert messages required for the bot, including the action (e.g., "ENTER_LONG"), the trading instrument, and the Signal Token.
Once the buy and sell signals are generated, the script sends the corresponding alert messages to the OKX Signal Bot, triggering the desired trading actions.
By following this entry-level script, beginner TradingView users can gain a practical understanding of how to create their own custom trading signals and seamlessly integrate them with the OKX Signal Bot. It serves as an excellent starting point for those interested in automated trading and empowers traders to take control of their strategies with confidence.
Please note that while this guide provides a basic framework, it is essential to test and optimize your trading signals before implementing them with real capital. Always exercise proper risk management techniques and validate your strategies in different market conditions.
Embark on your trading journey and unlock the potential of custom trading signals with OKX Signal Bot integration. Build your expertise, automate your trades, and make informed decisions using TradingView as your trusted platform.
These scripts are only functioning as sample script templates to support okx alert standards. It is not intended to provide any investment, tax, or legal advice, nor should it be considered an offer to purchase, sell, hold or offer any services relating to digital assets. Digital assets, including stablecoins, involve a high degree of risk, can fluctuate greatly, and can even become worthless. You should carefully consider whether trading or holding digital assets is suitable for you in light of your financial condition and risk tolerance. OKX does not provide investment or asset recommendations. You are solely responsible for your investment decisions, and OKX is not responsible for any potential losses. Past performance is not indicative of future results. Please consult your legal/tax/investment professional for questions about your specific circumstances.
"bot"に関するスクリプトを検索
The Witcher [30MIN] - AlertsHello,
This is the Witcher Bot
This bot is got best performance at BTCUSDTPERP BINANCE FUTURES
this is bot for leverage 1x,
I tried focusing at highest % profitable trades, bot could be optimalised to even higher profit net.
TP: 1.1
SL: 8.2
Stop-loss unfortunelly have to be high to avoid bear/bull traps
The core of this strategy is trend strenght ( MONEY FLOW INDKES)
Strategy can only open position on strong price movment, to avoid wrong decision
Settings are set for highest profitable trades %
Bot using 10 indicators to trigger basic condtition for long and short :
1) ADX - Is one of the most powerful and accurate trend indicators. ADX measures how strong a trend is, and can give valuable information on whether there is a potential trading opportunity.
2) RSI - value helps strategy to stop trade in right time. When RSI is overbought strategy don't open new longs , also when RSI is oversold strategy don't open new shorts
3) TREND STRENGHT
4) JURIK MOVING AVERAGE - The Jurik Moving Average indicator is one of the surest ways to smoothen price curves within a minimum time lag. The indicator offers currency traders one of the best price filters during strong price moves. In this time, when bitcoin price action is so strong, this indicator is necessary.
5) SAR - The parabolic SAR is a technical indicator used to determine the price direction of an asset, as well as draw attention to when the price direction is changing. SAR supporting bot, to not open new trades when the trends are slowly changing
6) TREND INDICATOR
7) MOMENTUM - Indicator istechnical analysis tool used to determine the strength or weakness of a stock's price. Momentum measures the rate of the rise or fall of stock prices. Common momentum indicators include the relative strength index ( RSI ) and moving average convergence divergence ( MACD ).
8) OBV - On-balance volume (OBV) is a technical trading momentum indicator that uses volume flow to predict changes in stock price.
9) FAST MA - like previous ones this is for better view of trends, and correctly define the trends, also Speed_MA are using for predict the future price action.
10) RANGE FILTER - this indicator is for the better view of trends, define trends, that is important for every bull/bear traps which helps a lot becouse of the very variable trends.
I decided to add momentum indicator to strategy, to make a fast-reacting decision on lower timeframes at extremly price volatility
Also bot got additional EMA scalping option, which increase profit net but, in some situation, that could be risky.
For max security I recommend to turn off this option.
Commision are set at standard binancefutures VIP-0 = 0.04%
After converting strategy into study version, bot is ready for automation.
All the ploting color depends of adx value.
Strategy are not Repainting
For the source code I tried to keep as clean as I could
Enjoy
Argo II - (alerts for 3commas composite bots) - publicThis script lets users create BUY/SELL alerts for 3commas composite bots (1 alert = 12 pairs) in a simple way, based on a built in set of indicators that can be tweaked to work together or alone through the study settings.
There is a version of this script for single pair bots, with slightly more features here .
If the user choses to create both BUY and SELL signals from the study settings, the (1) alert created will send both BUY and SELL signals for all 12 pairs selected. At this stage, the script forces the user to select 12 pairs in the study settings. If less pairs are inserted, it will not work. Also, the script will only send alerts for the pairs selected in the study settings, not for the current chart (if different).
How to use:
- Add the script to the current chart
- Open the study settings , insert bot details and select 12 pairs. You should write the pairs manually, using the format BTC , ADA, ETH, etc. They MUST be in capital letters or 3commas will not recognize them.
- Still in the study settings, tweak the deal start/close conditions from various indicators until happy. The study will plot the entry / exit points below the current chart (1 = buy, 2 = sell)
- Make sure your strategy works for all the pairs you have selected, simply by checking each chart with the same study settings
- When happy, right click on the "..." next to the study name, then "Add alert'".
- Under "Condition", on the second line, chose "Any alert () function call". Add the webhook from 3commas, give it a name, and "create".
That's it.
Notes:
- If you insert coins that are not available for the quote currency and exchange of your choosing, the script will not work and return an error.
- Make sure you run tests with paper trading or dummy bots (i.e without actual bot ID) to ensure your alerts trigger as intended on all coins.
- If alerts trigger too much (i.e they all trigger at the same time for all coins), Trading View will stop the alert. So probably not ideal for a scalping bot. It could also be the sign the script doesn't work as intended.
- The script is a bit slow on my side. I am a beginner in pinescript, so if anyone knows how to simplify it, please let me know.
- if anyone knows how to tell the script to function with less than 12 pairs (when not filling the 12 fields in the setting), please also let me know :)
ATR Start & Stop BotThis script is using Average True Range (ATR) and works very well on the Bitcoin 4 hour timeframe to determine when to stop and start your bots.
It has a very similar visual to the EMA RSI Indicator found here:
This 'ATR Start & Stop Bot' is better because it has less confusion during sideways market movement.
As an example - You are using 3commas and have a Composite bot setup with several alt coins, you can use this indicator with the ' Stop bot ' alert to disable your composite bot from taking trades at times when the market is on a trend that looks in the red.
Alternatively you can use the ' Start bot ' alert to turn your bot back on during the green uptrends.
Using this indicator with these alerts on the Bitcoin 4-Hour chart add a great layer of automation to your already existing bots.
Credits:
Original 'ATR Stops' indicator belong to the user failathon and that script is found here:
Also credits to Dradian for the alert additions.
BTC botI made good money on this bot in last few month so i decided to donate it to community (its from my private bot collection) design for BTC mainly . it a great bot for longs , shity for shorts :)
no security in this bot so no repaint
the key issue in any bot design is to find good low , after you just exit by take profit
the exit strategy here is based on pivot system
entry is based on Low finder script (that i put as open script )
the Take profit system is based on Adolgov script
in reality main problem now is that bot cannot utilize signal from alerts .but we are working to fix this issue with a good that will come soon
this script is to show how to create a smart non repainting strategy using take profit and finding low as the key for it success
this strategy very good for bullish assets. may not work as well when we are on bearish trend so keep this in mind if you use it
Bjorgum Double Tap█ OVERVIEW
Double Tap is a pattern recognition script aimed at detecting Double Tops and Double Bottoms. Double Tap can be applied to the broker emulator to observe historical results, run as a trading bot for live trade alerts in real time with entry signals, take profit, and stop orders, or to simply detect patterns.
█ CONCEPTS
How Is A Pattern Defined?
Doubles are technical formations that are both reversal patterns and breakout patterns. These formations typically have a distinctive “M” or a “W” shape with price action breaking beyond the neckline formed by the center of the pattern. They can be recognized when a pivot fails to break when tested for a second time and the retracement that follows breaks beyond the key level opposite. This can trap entrants that were playing in the direction of the prior trend. Entries are made on the breakout with a target projected beyond the neckline equal to the height of the pattern.
Pattern Recognition
Patterns are recognized through the use of zig-zag; a method of filtering price action by connecting swing highs and lows in an alternating fashion to establish trend, support and resistance, or derive shapes from price action. The script looks for the highest or lowest point in a given number of bars and updates a list with the values as they form. If the levels are exceeded, the values are updated. If the direction changes and a new significant point is made, a new point is added to the list and the process starts again. Meanwhile, we scan the list of values looking for the distinctive shape to form as previously described.
█ STRATEGY RESULTS
Back Testing
Historical back testing is the most common method to test a strategy due in part to the general ease of gathering quick results. The underlying theory is that any strategy that worked well in the past is likely to work well in the future, and conversely, any strategy that performed poorly in the past is likely to perform poorly in the future. It is easy to poke holes in this theory, however, as for one to accept it as gospel, one would have to assume that future results will match what has come to pass. The randomness of markets may see to it otherwise, so it is important to scrutinize results. Some commonly used methods are to compare to other markets or benchmarks, perform statistical analysis on the results over many iterations and on differing datasets, walk-forward testing, out-of-sample analysis, or a variety of other techniques. There are many ways to interpret the results, so it is important to do research and gain knowledge in the field prior to taking meaningful conclusions from them.
👉 In short, it would be naive to place trust in one good backtest and expect positive results to continue. For this reason, results have been omitted from this publication.
Repainting
Repainting is simply the difference in behaviour of a strategy in real time vs the results calculated on the historical dataset. The strategy, by default, will wait for confirmed signals and is thus designed to not repaint. Waiting for bar close for entires aligns results in the real time data feed to those calculated on historical bars, which contain far less data. By doing this we align the behaviour of the strategy on the 2 data types, which brings significance to the calculated results. To override this behaviour and introduce repainting one can select "Recalculate on every tick" from the properties tab. It is important to note that by doing this alerts may not align with results seen in the strategy tester when the chart is reloaded, and thus to do so is to forgo backtesting and restricts a strategy to forward testing only.
👉 It is possible to use this script as an indicator as opposed to a full strategy by disabling "Use Strategy" in the "Inputs" tab. Basic alerts for detection will be sent when patterns are detected as opposed to complex order syntax. For alerts mid-bar enable "Recalculate on every tick" , and for confirmed signals ensure it is disabled.
█ EXIT ORDERS
Limit and Stop Orders
By default, the strategy will place a stop loss at the invalidation point of the pattern. This point is beyond the pattern high in the case of Double Tops, or beneath the pattern low in the case of Double Bottoms. The target or take profit point is an equal-legs measurement, or 100% of the pattern height in the direction of the pattern bias. Both the stop and the limit level can be adjusted from the user menu as a percentage of the pattern height.
Trailing Stops
Optional from the menu is the implementation of an ATR based trailing stop. The trailing stop is designed to begin when the target projection is reached. From there, the script looks back a user-defined number of bars for the highest or lowest point +/- the ATR value. For tighter stops the user can look back a lesser number of bars, or decrease the ATR multiple. When using either Alertatron or Trading Connector, each change in the trail value will trigger an alert to update the stop order on the exchange to reflect the new trail price. This reduces latency and slippage that can occur when relying on alerts only as real exchange orders fill faster and remain in place in the event of a disruption in communication between your strategy and the exchange, which ensures a higher level of safety.
👉 It is important to note that in the case the trailing stop is enabled, limit orders are excluded from the exit criteria. Rather, the point in time that the limit value is exceeded is the point that the trail begins. As such, this method will exit by stop loss only.
█ ALERTS
Five Built-in 3rd Party Destinations
The following are five options for delivering alerts from Double Tap to live trade execution via third party API solutions or chat bots to share your trades on social media. These destinations can be selected from the input menu and alert syntax will automatically configure in alerts appropriately to manage trades.
Custom JSON
JSON, or JavaScript Object Notation, is a readable format for structuring data. It is used primarily to transmit data between a server and a web application. In regards to this script, this may be a custom intermediary web application designed to catch alerts and interface with an exchange API. The JSON message is a trade map for an application to read equipped with where its been, where its going, targets, stops, quantity; a full diagnostic of the current state and its previous state. A web application could be configured to follow the messages sent in this format and conduct trades in sync with alerts running on the TV server.
Below is an example of a rendered JSON alert:
{
"passphrase": "1234",
"time": "2022-05-01T17:50:05Z",
"ticker": "ETHUSDTPERP",
"plot": {
"stop_price": 2600.15,
"limit_price": 3100.45
},
"strategy": {
"position_size": 0.1,
"order_action": "buy",
"market_position": "long",
"market_position_size": 0,
"prev_market_position": "flat",
"prev_market_position_size": 0
}
}
Trading Connector
Trading Connector is a third party fully autonomous Chrome extension designed to catch alert webhooks from TradingView and interface with MT4/MT5 to execute live trades from your machine. Alerts to Trading Connector are simple; just select the destination from the input drop down menu, set your ticker in the "TC Ticker" box in the "Alert Strings" section and enter your URL in the alert window when configuring your alert.
Alertatron
Alertatron is an automated algo platform for cryptocurrency trading that is designed to automate your trading strategies. Although the platform is currently restricted to crypto, it offers a versatile interface with high flexibility syntax for complex market orders and conditions. To direct alerts to Alertatron, select the platform from the 3rd party drop down, configure your API key in the ”Alertatron Key” box and add your URL in the alert message box when making alerts.
3 Commas
3 Commas is an easy and quick to use click-and-go third party crypto API solution. Alerts are simple without overly complex syntax. Messages are simply pasted into alerts and executed as alerts are triggered. There are 4 boxes at the bottom of the "Inputs" tab where the appropriate messages to be placed. These messages can be copied from 3 Commas after the bots are set up and pasted directly into the settings menu. Remember to select 3 Commas as a destination from the third party drop down and place the appropriate URL in the alert message window.
Discord
Some may wish to share their trades with their friends in a Discord chat via webhook chat bot. Messages are configured to notify of the pattern type with targets and stop values. A bot can be configured through the integration menu in a Discord chat to which you have appropriate access. Select Discord from the 3rd party drop down menu and place your chat bot URL in the alert message window when configuring alerts.
👉 For further information regarding alert setup, refer to the platform specific instructions given by the chosen third party provider.
█ IMPORTANT NOTES
Setting Alerts
For alert messages to be properly delivered on order fills it is necessary to place the following placeholder in the alert message box when creating an alert.
{{strategy.order.alert_message}}
This placeholder will auto-populate the alert message with the appropriate syntax that is designated for the 3rd party selected in the user menu.
Order Sizing and Commissions
The values that are sent in alert messages are populated from live metrics calculated by the strategy. This means that the actual values in the "Properties" tab are used and must be set by the user. The initial capital, order size, commission, etc. are all used in the calculations, so it is important to set these prior to executing live trades. Be sure to set the commission to the values used by the exchange as well.
👉 It is important to understand that the calculations on the account size take place from the beginning of the price history of the strategy. This means that if historical results have inflated or depleted the account size from the beginning of trade history until now, the values sent in alerts will reflect the calculated size based on the inputs in the "Properties" tab. To start fresh, the user must set the date in the "Inputs" tab to the current date as to remove trades from the trade history. Failure to follow this instruction can result in an unexpected order size being sent in the alert.
█ FOR PINECODERS
• With the recent introduction of matrices in Pine, the script utilizes a matrix to track pivot points with the bars they occurred on, while tracking if that pivot has been traded against to prevent duplicate detections after a trade is exited.
• Alert messages are populated with placeholders ; capability that previously was only possible in alertcondition() , but has recently been extended to `strategy.*()` functions for use in the `alert_message` argument. This allows delivery of live trade values to populate in strategy alert messages.
• New arguments have been added to strategy.exit() , which allow differentiated messages to be sent based on whether the exit occurred at the stop or the limit. The new arguments used in this script are `alert_profit` and `alert_loss` to send messages to Discord
Fibonacci Swing Trading BotStrategy Overview for "Fibonacci Swing Trading Bot"
Strategy Name: Fibonacci Swing Trading Bot
Version: Pine Script v5
Purpose: This strategy is designed for swing traders who want to leverage Fibonacci retracement levels and candlestick patterns to enter and exit trades on higher time frames.
Key Components:
1. Multiple Timeframe Analysis:
The strategy uses a customizable timeframe for analysis. You can choose between 4hour, daily, weekly, or monthly time frames to fit your preferred trading horizon. The high and low-price data is retrieved from the selected timeframe to identify swing points.
2. Fibonacci Retracement Levels:
The script calculates two key Fibonacci retracement levels:
0.618: A common level where price often retraces before resuming its trend.
0.786: A deeper retracement level, often used to identify stronger support/resistance areas.
These levels are dynamically plotted on the chart based on the highest high and lowest low over the last 50 bars of the selected timeframe.
3. Candlestick Based Entry Signals:
The strategy uses candlestick patterns as the only indicator for trade entries:
Bullish Candle: A green candle (close > open) that forms between the 0.618 retracement level and the swing high.
Bearish Candle: A red candle (close < open) that forms between the 0.786 retracement level and the swing low.
When these candlestick patterns align with the Fibonacci levels, the script triggers buy or sell signals.
4. Risk Management:
Stop Loss: The stop loss is set at 1% below the entry price for long trades and 1% above the entry price for short trades. This tight risk management ensures controlled losses.
Take Profit: The strategy uses a 2:1 risk-to-reward ratio. The take profit is automatically calculated based on this ratio relative to the stop loss.
5. Buy/Sell Logic:
Buy Signal: Triggered when a bullish candle forms above the 0.618 retracement level and below the swing high. The bot then places a long position.
Sell Signal: Triggered when a bearish candle forms below the 0.786 retracement level and above the swing low. The bot then places a short position.
The stop loss and take profit levels are automatically managed once the trade is placed.
Strengths of This Strategy:
Swing Trading Focus: The strategy is ideal for swing traders, targeting longer-term price moves that can take days or weeks to play out.
Simple Yet Effective Indicators: By only relying on Fibonacci retracement levels and basic candlestick patterns, the strategy avoids complexity while capitalizing on well-known support and resistance zones.
Automated Risk Management: The built-in stop loss and take profit mechanism ensures trades are protected, adhering to a strict 2:1 risk/reward ratio.
Multiple Timeframe Analysis: The script adapts to various market conditions by allowing users to switch between different timeframes (4hour, daily, weekly, monthly), giving traders flexibility.
Strategy Use Cases:
Retracement Traders: Traders who focus on entering the market at key retracement levels (0.618 and 0.786) will find this strategy especially useful.
Trend Reversal Traders: The strategy’s reliance on candlestick formations at Fibonacci levels helps traders spot potential reversals in price trends.
Risk Conscious Traders: With its 1% risk per trade and 2:1 risk/reward ratio, the strategy is ideal for traders who prioritize risk management in their trades.
OKX Signal BOT - Strategy Scanner & Orderer
Hello traders,
With the OKX Signal BOT - Strategy Scanner & Orderer, you can now design your own strategy, scan over 20 cryptocurrencies, and send orders for futures trades on the OKX exchange.
How to Use:
🌐 First, log into your account on the OKX exchange and create a signal bot.
📝 While creating the signal bot, note down the webhook URL and signal token variables given to you; they'll be needed later.
🔍 Select the trading pairs that the bot will work on.
📈 Add this indicator to your chart.
⚙️ Adjust the values of the indicators you will use in your strategy.
📊 Set your entry conditions and indicator setups according to your preference.
🚀 Decide which condition will generate a LONG signal and which will generate a SHORT signal.
🔗 Then, link these conditions with either an AND or OR connector.
🛠️ This also serves as a strategy designer.
🆔 Paste the signal token value you got from OKX into the OKX Signal ID section in the indicator.
➕ Add the cryptocurrency pairs you added to the bot on OKX to this design tool as well.
💾 Save and exit.
🚨 Set an alarm and paste the webhook URL link you got from OKX.
Congratulations, you can now send signals from Tradingview to the OKX exchange without needing any other platform.
Warnings:
⚠️ Works only for futures trades.
📈 Make your leverage settings through the exchange.
🛑 It is recommended to set take profit and stop loss through the exchange.
🚫 If too many alarms are triggered, Tradingview may stop your alarms.
💡 Ensure that the coins you add in the symbol section are from the OKX exchange.
🔍 For futures trades, make sure the symbols end with ".P".
🎉 Enjoy using it!
Strategy Myth-Busting #1 - UT Bot+STC+Hull [MYN]This is part of a new series we are calling "Strategy Myth-Busting" where we take open public manual trading strategies and automate them. The goal is to not only validate the authenticity of the claims but to provide an automated version for traders who wish to trade autonomously.
Our first one is an automated version of the " The ULTIMATE Scalping Trading Strategy for 2022 " strategy from " My Trading Journey " who claims to have achieved not only profits but a 98.3% win rate. As you can see from the backtest results below, I was unable to substantiate anything close to that that claim on the same symbol (NVDA), timeframe (5m) with identical instrument settings that " My Trading Journey " was demonstrating with. Strategy Busted.
If you know of or have a strategy you want to see myth-busted or just have an idea for one, please feel free to message me.
This strategy uses a combination of 3 open-source public indicators:
UT Bot Alerts by QuantNomad
STC Indicator - A Better MACD By shayankm
Basic Hull Ma Pack tinkered by InSilico
Trading Rules:
5 min candles
Long
New Buy Signal from UT Bot Alerts Strategy
STC is green and below 25 and rising
Hull Suite is green
Short
New Sell Signal from UT Bot Alerts Strategy
STC is red and above 75 and falling
Hull Suite is red
Grid Bot AutoThis script is an auto-adjusting grid bot simulator. This is an improved version of the original Grid Bot Simulator. The grid bot is best used for ranging/choppy markets. Prices are divided into grids, or trade zones, that will trigger signals each time a new zone is entered. During ranging markets, each transaction is followed by a “take profit.” As the market starts to trend, transactions are stacked (compare to DCA ), until the market consolidates. No signals are triggered above the Upper Limit or Below the Lower Limit. Unlike the previous version, the upper and lower limits are calculated automatically. Grid levels are determined by four factors: Smoothing, Laziness, Elasticity, and Grid Intervals.
Smoothing:
A moving average (or linear regression) is applied to each close price as a basis. Options for smoothing are Linear Regression, Simple Moving Average, Exponential Moving Average, Volume-Weighted Moving Average, Triple-Exponential Moving Average.
Laziness:
Laziness is the percentage change required to reach the next level. If laziness is 1.5, the price must move up or down by 1.5% before the grid will change. This concept is based on Alex Grover’s Efficient Trend Step. This allows the grids to be based on even price levels, as opposed to jagged moving averages.
Elasticity:
Elasticity is the degree of “stickiness” to the current price trend. If the smoothing line remains above (or below) the current grid center without reverting but still not enough to reach the next grid level, the grid line will start to curve toward the next grid level. Elasticity is added to (or subtracted from) the gridline by a factor of minimum system ticks for the current pair. Elasticity of zero will keep the gridlines horizontal. If elasticity is too high, the grid will distort.
Grid Intervals:
Grid intervals are the percentage of space between each grid.
Laziness = 4%, Elasticity = 0. Price must move at least 4% before reaching the next level. With zero elasticity, gridlines are straight.
Laziness = 5%, Elasticity = 100. For each bar at a new grid level, the grid will start “curve” toward the next price level (up if price is greater than the middle grid, down if less than middle grid). Elasticity is calculated by the user-inputted “Elasticity” multiplied by the minimum tick for the current pair (ELSTX = syminfo.mintick * iELSTX)
Try experimenting with different combinations of the Smoothing Length, Smoothing Type, Laziness, Elasticity, and Grid Intervals to find the optimum settings for each chart. Lower-priced pairs (e.g. XRP/ADA/DODGE) will require lower Elasticity. Also note that different exchanges may have different minimum tick values. For example, minimum tick for BITMEX:XBTUSD and BYBIT:BTCUSD is .5, but BINANCE:BTCUSDT and COINBASE:BTCUSD is .01.
s3.tradingview.com
DODGEUSDT, 5min. Laziness: 4%, Elasticity 2.5
Number of Grids: 2. Laziness: 3.75%. Elasticity: 150. Grid Interval 2%.
Settings Overview
Smoothing Length : Smoothing period
Smoothing Type : Linear Regression, Simple Moving Average, Exponential Moving Average, Volume-Weighted Moving Average, Triple-Exponential Moving Average
Laziness : Percentage required for price to move until it reaches the next level. If price does not reach the next level (up or down), the grid will remain the same as previous grid (because it’s lazy).
Elasticity : Amount of curvature toward the next grid, based on the current price trend. As elasticity increases, gridlines will curve up or down by a factor of the number of ticks since the last grid change.
Grid Interval : Percent between grid levels.
Number of Grids : Number of grids to show.
Cooldown : Number of bars to wait to prevent consecutive signals.
Grid Line Transparency : Lower transparencies brighten the gridlines; higher transparencies dim the gridlines. To hide the gridlines completely, enter 100.
Fill Transparency: Lower transparencies brighten the fill box; higher transparencies dim the fill box. To hide the fill box completely, enter 100.
Signal Size : Make signal triangles large or small.
Reset Buy/Sell Index When Grids Change : When a new grid is formed, resetting the index may prevent false signals (experimental)
Use Highs/Lows for Signals : If enabled, signals are triggered as soon as the price touches the next zone. If disabled, signals are triggered after bar closes. Enable this for “Once Per Bar alerts. Disable for “Once Per Bar Close” alerts.
Show Min Tick : If checked, syminfo.mintick is displayed in upper-righthand corner. Useful for estimating Laziness.
Reverse Fill Colors : Default fill for fill boxes is green after buy and red after sell. Check this box to reverse.
Note: The Grid Bot Simulator scripts are experimental and works in progress. Please feel free to comment or contact me if you have suggestions/complaints.
MA Crossover Alerts for Small Quick Profits on 3commas/DCA botDear fellow 3commas users,
This is a the most basic Moving Average crossover technique generating Buy Alerts.
This is especially written for those of you who want to link this basic crossover strategy with your 3commas DCA bot .
Buy Alerts
Moving averages available:
- Simple Moving Average (SMA)
- Exponential Moving Average (EMA)
- Weighted Moving Average (WMA)
- Hull Moving Average (HullMA)
- Volume Weighted Moving Average (VMWA)
- Running Moving Average (RMA)
- Triple Exponential Moving Average (TEMA)
Recommended settings for using with 3commas DCA bot:
Interval:
3m to 15m
3commas bot setup:
- TP/TTP: 0.3%/0.1%,
- Base Order: Your choice ,
- Safety Order: 1.2 * Base order
- Safety Order Volume Scale: 1.2,
- Safety Order Step Scale: 1.5,
- Max Active Deals: Your choice ,
- Price Deviation to Open Safety Order (% from initial order): 0.2%,
- Max Safety Trades Count: 7,
- Simulatenous Deals per Same Pair: 3
> Create Alert with Buy Alert and link it to your bot "Message for deal start signal"
UT Bot Strategy with Backtesting Range [QuantNomad]UT Bot indicator was inially developer by @Yo_adriiiiaan
Idea of original code belongs @HPotter
I can't update my original UT Bot Strategy so I publishing new strategy with backtesting range included.
I just took code of Yo_adriiiiaan, cleaned it, deleted all useless pieces of code, transformet to v4 and created a strategy from it.
Also I added an input that allows you to swich to signals from Heiking Ashi. I saw that author uses HA for the indicator and on HA it look much nices then on real candles.
Do not add this strategy to HA candles, use usual candles and this checkbox.
Original script:
UT Bot
Detect Sequential Trading - Bot DetectorDetect Sequential Trading - Bot Detector.
This tool requires access to volume data .
There are many trading bots out there, that trade 24/7 .
The detector can be used to understand how the bots are configured - to push the market up or down .
Alerts can be set to fire whenever a bot pattern is detected .
They must be configured to run Once per Bar .
It works well with range charts (1R) .
It would work best on 1 second charts or tick charts (currently, TradingView's alert system doesn't work with second charts).
The alternative would be 1 minute charts .
It can be used on higher timeframes but may be less effective.
Advanced Trend Trader BotDescription for "Advanced Trend Trader Bot"
The "Advanced Trend Trader Bot" is a sophisticated strategy designed to identify market trends and automatically trade based on them. This strategy utilizes multiple indicators and filters, including Moving Averages, MACD, RSI, volume, and multi-timeframe trend confirmation, to make precise buy and sell decisions.
Key Features:
Moving Averages (MA): Uses a combination of short and long-term MAs to detect trend crossovers and confirm trend direction.
MACD: Adds an additional layer of trend confirmation by checking if the MACD line crosses the signal line.
RSI: Filters overbought and oversold conditions to avoid entering trades in markets that may be topping or bottoming out.
Volume: Verifies that the volume is above a certain threshold to ensure that signals are generated in a liquid market.
Multi-Timeframe Confirmation: Checks the trend in a higher timeframe to ensure that signals align with the broader market trend.
Risk Management:
The strategy includes adjustable parameters for risk and reward. Users can set the risk amount per trade and the reward-risk ratio. Stop loss and take profit levels are automatically calculated based on the specified settings.
Alerts:
For use with 3Commas and other platforms, the strategy provides buy and sell alerts. These alerts can be set up to trade automatically based on the strategy's signals.
Parameters:
Short MA Period and Long MA Period: Timeframes for the short-term and long-term Moving Averages.
MACD Timeframe and Confirmation Timeframe: Timeframes for the MACD indicator and multi-timeframe trend confirmation.
RSI Period and threshold levels: Used to filter overbought and oversold conditions.
Volume Threshold: Minimum volume requirement for generating a signal.
Risk Amount and Reward-Risk Ratio: Parameters for risk management and profit targets.
This strategy is designed for traders who want to capitalize on market trends while applying robust risk management. The Advanced Trend Trader Bot provides a versatile and flexible solution for automated trading, with extensive customization options to meet the needs of individual traders.
RSI Box Strategy (pseudo- Grid Bot)This is a strategy intended primarily for algorithmic traders. It's a pseudo-grid bot that uses a dynamic, volume-weighted grid that only updates when the RSI meets certain conditions. It's also a breakout strategy, whereas normal grid bots are not (typical grid bots sell when a higher grid is reached, whereas this strategy sells when a lower grid is breached under specific conditions). This strategy also sells 100% of pyramiding orders on close.
In a nutshell, the strategy updates its grid to the volume-weighted highest/lowest values of your given source ("src" in the settings) each time that there is a RSI crossunder/crossover. From this range it produces an evenly-spaced grid of five lines, and uses the current source to determine which grid line is closest to the source. Then, if the source crosses over the line directly above the current line, it enters a buy order. If the source crosses under the line directly below the current line, it enters a sell order.
You can configure shorts, source, RSI length, and overbought/oversold levels in the settings.
For the strategy results below: fees are at 0.1% per trade, with order size 1% of equity and a max pyramiding value of 33. For a greater R/R profile, you can increase the order size, which will increase drawdown but potentially yield better results.
Mizar_LibraryThe "Mizar_Library" is a powerful tool designed for Pine Script™ programmer’s, providing a collection of general functions that facilitate the usage of Mizar’s DCA (Dollar-Cost-Averaging) bot system.
To begin using the Mizar Library, you first need to import it into your indicator script. Insert the following line below your indicator initiation line: import Mizar_Trading/Mizar_Library/1 as mizar (mizar is the chosen alias).
In the import statement, Mizar_Trading.Mizar_Library_v1 refers to the specific version of the Mizar Library you wish to use. Feel free to modify mizar to your preferred alias name.
Once the library is imported, you can leverage its functions by prefixing them with mizar. . This will prompt auto-completion suggestions displaying all the available user-defined functions provided by the Mizar Library.
Now, let's delve into some of the key functions available in the Mizar Library:
DCA_bot_msg(_cmd)
The DCA_bot_msg function accepts an user-defined type (UDT) _cmd as a parameter and returns a string with the complete JSON command for a Mizar DCA bot.
Parameters:
_cmd (bot_params) : ::: User-defined type (UDT) that holds all the necessary information for the bot command.
Returns: A string with the complete JSON command for a Mizar DCA bot.
rounding_to_ticks(value, ticks, rounding_type)
The rounding_to_ticks function rounds a calculated price to the nearest actual price based on the specified tick size.
Parameters:
value (float) : ::: The calculated price as float type, to be rounded to the nearest real price.
ticks (float) : ::: The smallest possible price obtained through a request in your script.
rounding_type (int) : ::: The rounding type for the price: 0 = closest real price, 1 = closest real price above, 2 = closest real price below.
Returns: A float value representing the rounded price to the next tick.
bot_params
Bot_params is an user-defined type (UDT) that represents the parameters required for a Mizar DCA bot.
Fields:
bot_id (series string) : The ID number of your Mizar DCA bot.
api_key (series string) : Your private API key from your Mizar account (keep it confidential!).
action (series string) : The command to perform: "open" (standard) or "close" optional .
tp_perc (series string) : The take profit percentage in decimal form (1% = "0.01") optional .
base_asset (series string) : The cryptocurrency you want to buy (e.g., "BTC").
quote_asset (series string) : The coin or fiat currency used for payment (e.g., "USDT" is standard if not specified) optional .
direction (series string) : The direction of the position: "long" or "short" (only applicable for two-way hedge bots) optional .
To obtain the JSON command string for the alert_function call, you can use the DCA_bot_msg function provided by the library. Simply pass the cmd_msg UDT as an argument and assign the returned string value to a variable.
Here's an example to illustrate the process:
// Import of the Mizar Library to use the included functions
import/Mizar_Trading/Mizar_Library/1 as mizar
// Example to set a variable called “cmd_msg” and all of its parameters
cmd_msg = mizar.bot_params. new()
cmd_msg.action := "open"
cmd_msg.api_key := "top secret"
cmd_msg.bot_id := "9999"
cmd_msg.base_asset := "BTC"
cmd_msg.quote_asset := "USDT"
cmd_msg.direction := "long"
cmd_msg.tp_perc := "0.015"
// Calling the Mizar conversion function named “DCA_bot_msg()” with the cmd_msg as argument to receive the JSON command and save it in a string variable called “alert_msg”
alert_msg = mizar.DCA_bot_msg(cmd_msg)
Feel free to utilize (series) string variables instead of constant strings. By incorporating the Mizar Library into your Pine Script, you gain access to a powerful set of functions and can leverage them according to your specific requirements.
For additional help or support, you can join the Mizar Discord channel. There, you'll find a dedicated Pine Script channel where you can ask any questions related to Pine Script.
Customizable Non-Repainting HTF MACD MFI Scalper Bot Strategy v2Customizable Non-Repainting HTF MACD MFI Scalper Bot Strategy v2
This script was originally shared by Wunderbit as a free open source script for the community to work with. This is my second published iteration of this idea.
WHAT THIS SCRIPT DOES:
It is intended for use on an algorithmic bot trading platform but can be used for scalping and manual trading.
This strategy is based on the trend-following momentum indicator . It includes the Money Flow index as an additional point for entry.
This is a new and improved version geared for lower timeframes (15-5 minutes), but can be run on larger ones as well. I am testing it live as my high frequency trader.
HOW IT DOES IT:
It uses a combination of MACD and MFI indicators to create entry signals. Parameters for each indicator have been surfaced for user configurability.
Take profits are now trailing profits, and the stop loss is now fixed. Why? I found that the trailing stop loss with ATR in the previous version yields very good results for back tests but becomes very difficult to deploy live due to transaction fees. As you can see the average trade is a higher profit percentage than the previous version.
HOW IS MY VERSION ORIGINAL:
Now instead of using ATR stop loss, we have a fixed stop loss - counter intuitively to what some may believe this performs better in live trading scenarios since it gives the strategy room to move. I noticed that the ATR trailing stop was stopping out too fast and was eating away balance due to transaction fees.
The take profit on the other hand is now a trailing profit with a customizable deviation. This ensures that you can have a minimum profit you want to take in order to exit.
I have depracated the old ATR trailing stop as it became too confusing to have those as different options. I kept the old version for others that want to experiment with it. The source code still requires some cleanup, but its fully functional.
I added in a way to show RSI values and ATR values with a checkbox so that you can use the new an improved ATR Filter (and grab the right RSI values for the RSI filter). This will help to filter out times of very low volatility where we are unlikely to find a profitable trade. Use the "Show Data" checkbox to see what the values are on the indicator pane, then use those values to gauge what you want to filter out.
Both versions
Delayed Signals : The script has been refactored to use a time frame drop down. The higher time frame can be run on a faster chart (recommended on one minute chart for fastest signal confirmation and relay to algotrading platform.)
Repainting Issues : All indicators have been recoded to use the security function that checks to see if the current calculation is in realtime, if it is, then it uses the previous bar for calculation. If you are still experiencing repainting issues based on intended (or non intended use), please provide a report with screenshot and explanation so I can try to address.
Filtering : I have added to additional filters an ABOVE EMA Filter and a BELOW RSI Filter (both can be turned on and off)
Customizable Long and Close Messages : This allows someone to use the script for algorithmic trading without having to alter code. It also means you can use one indicator for all of your different alterts required for your bots.
HOW TO USE IT:
It is intended to be used in the 5-30 minute time frames, but you might be able to get a good configuration for higher time frames. I welcome feedback from other users on what they have found.
Find a pair with high volatility (example KUCOIN:ETH3LUSDT ) - I have found it works particularly well with 3L and 3S tokens for crypto. although it the limitation is that confrigurations I have found to work typically have low R/R ratio, but very high win rate and profit factor.
Ideally set one minute chart for bots, but you can use other charts for manual trading. The signal will be delayed by one bar but I have found configurations that still test well.
Select a time frame in configuration for your indicator calculations.
Select the strategy config for time frame (resolution). I like to use 5 and 15 minutes for scalping scenarios, but I am interested in hearing back from other community memebers.
Optimize your indicator without filters : customize your settings for MACD and MFI that are profitable with your chart and selected time frame calculation. Try different Take Profits (try about 2-5%) and stop loss (try about 5-8%). See if your back test is profitable and continue to optimize.
Use the Trend, RSI, ATR Filter to further refine your signals for entry. You will get less entries but you can increase your win ratio.
You can use the open and close messages for a platform integration, but I choose to set mine up on the destination platform and let the platform close it. With certain platforms you cannot be sure what your entry point actually was compared to Trading View due to slippage and timing, so I let the platform decide when it is actually profitable.
Limitations: this works rather well for short term, and does some good forward testing but back testing large data sets is a problem when switching from very small time frame to large time frame. For instance, finding a configuration that works on a one minute chart but then changing to a 1 hour chart means you lose some of your intra bar calclulations. There are some new features in pine script which might be able to address, this, but I have not had a chance to work on that issue.
BTCUSDTPERP MEGABOT 60min [ALERTS VERSION]BINANCE:BTCUSDTPERP
Hello, this is my alerts version of BTCUSDTPERP MEGABOT 60min
THIS BOT IS ONLY FOR BTCUSDTPERP ON BINANCEFUTURES !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
This configs are only for this pair on this market,
It depends of volume , and others indicator
Bot is making amazing results at configs
TP - 4.5%
SL - 7%
Strategy using 4 indicators :
ADX
RSI
VOLUME
MACD
ADX - makes a solid view to trend without any scam wick :
Long only on green bars
Shorts only on red bars
That's helps my strategy to define a right trend
there is also a orange option for unidentified trends
RSI - value helps strategy to stop trade in right time
When RSI is overbought strategy don't open new longs
also when RSI is oversold strategy don't open new shorts
Volume - volume is the most important indicator for the strategy,
to avoid open trades on flat chart, new trades are open after a strong volume
wicks
MACD - this indicator is for define the trend
So the way this bot is working is simple
when every arguments are confirmed , then strategy open trades
Enjoy !!!
Scalping Trading System bot Crypto and StocksThis is a trend trading strategy scalping bot that can work with any type of market. However I concluded my tests so far with Crypto, Stocks and Forex, and with optimizations always could be found some profitable settings.
Indicators
SImple Moving Average
Exponential Moving Average
Keltner Channels
MACD Histogram
Stochastics
Rules for entry
long= Close of the candle bigger than both moving averages and close of the candle is between the top and bot levels from Keltner. At the same time the macd histogram is negative and stochastic is below 50.
short= Close of the candle smaller than both moving averages and close of the candle is between the top and bot levels from Keltner. At the same time the macd histogram is positive and stochastic is above 50.
Rules for exit
We exit when we meet an opposite reverse order.
This strategy has no risk management inside, so use it with caution !
7-RSI strategyHello, I've only been trying to learn PineScript for two months on my own, here I am posting a version of the strategy for a grid bot with 20 orders, order size 5%, earlier I tried to find something similar, but could not. Perhaps others, those who, like me, are just starting to learn PineScript, will find something useful. In the process of using grid bots, I noticed that the RSI indicator is sufficient, so the strategy uses 7 RSI indicators on different timeframes, but it is not necessary to use all 7, usually 3 is enough, therefore, by default, the RSI values are set to limit so that there is no effect on the settings of others. The step between bot orders is set in the settings. The code can of course be simplified, but it's better for understanding, I think.
Stochastic TrendDear community,
I've made another simple trading bot for you to use. This bot is based on the Stochastic Oscillator. It only produces long trades currently.
I changed the oscillation period to a much longer one, which in turn creates opportunities to trade long term trends.
The bot goes long when the Entry lines is crossed from below and it will close its long position once the Exit line has been crossed from above.
RSI Mean Reversion Bot StrategyI started developing this strategy as a way to plug in and test values before defining them in the bots on 3Commas, Coinrule, and Quadency. None of those bots performed the same way my script did and I kept working on it until the strategy finally yielded the same simulated results when paired with the Tradingview bot on Quadency. I looked at all the different RSI strategies already published and saw what each was missing and changed it in mine to make it better:
1. Backtest an actual timeframe by date and time
2. Define the RSI price source
3. Fully manipulate the RSI length
4. Define a stop loss that works
5. Pick Long or Short, or both, based on market conditions. Or compare side by side to decide which you want.
Strategy - Bobo Intraday Swing Bot with filtersThis is an adapted version of my swing bot with additional filters that mean it works quite well on lower timeframes like 1min, 5 mins as long as you adjust the setting accordingly (reduce pivot timescale, band width)
Entry conditions are filtered by an invisible trend calculation running in the background so the bot doesn't repeatedly try and fail to fade a strong trend. It has just about everything you should need for basic use, stop losses and targets, automatically close trade at pivot.
I get good results on rangey instruments like major indices such as SPX / ES that kind of thing. Make sure you understand the minmum tick value of an index so the stop setting on the bot work properly
Hope it's useful!