Coinrule/coinrule_help_center huggingface dataset:
Bybit Spot & Futures API Setup

A step-by-step guide on how to connect Bybit Spot to your Coinrule account.

Connect Exchange: Bybit Spot & Futures API Setup

To connect your Coinrule account to Bybit you will need to create an API Key on Bybit that will allow you to create an automated trading bot on Coinrule.

Bybit now uses Unified trading accounts this means you can use the same API key for both Spot and Futures trading.

1. First, you will need to sign in or create an account with Bybit. Once you've signed in, navigate to the profile icon on the top right corner then click on "API" box.

​Watch video guide:

2. Once you navigate to "API" box, select "Create New Key" then choose the option for "System-generated API keys" to generate a new key. Select "Connect to Third-Party Applications" under Application Name search for Coinrule and select it.

3. As shown in the video guide below on your API Key, select “Read-Write” permissions and keep "No IP Restriction" on. Next, under Trade permissions, select "Unified Trading" then enable permissions for "Orders", "Positions", "USDC Derivatives Trading" and "Trade". Finally, check the “Assets” box and select “Account Transfer” and ““Convert, Exchange History” then click submit. You'll need to enter your verification codes and your API key will be successfully created.

Watch video guide:

3. After you've gone through the security steps you will be provided with an API key and Secret Key. As the final step, you have to copy/paste both your API Key and API Secret Key in the Exchanges section of your Coinrule account with Bybit selected.

Note: If you want to trade futures, select 'Bybit futures' on the Exchange page on Coinrule.

Watch video guide:

You are now ready to create your automated trading strategies on Coinrule with Bybit!

Happy trading!
How To Use Coinrule

A detailed guide on how to get started with Coinrule

Learn How To Use Coinrule

Coinrule is an automated trading platform that helps you trade and take profits or stop losses depending on your trading needs.

Coinrule stands as a dynamic automated trading platform, tailored to empower traders with a range of strategies for different levels of automation and involvement. We don't create bots for you, but we present a Marketplace and hundreds of template rules that can help you get started.

Here's how you can leverage Coinrule for your trading needs:

Marketplace Strategies: Fully Automated Rules

In the Marketplace, you'll find a variety of pre-made strategies designed for full automation. This option is perfect for those who prefer a hands-off approach, allowing the system to execute trades based on predefined conditions. You can visit our Strategies Marketplace and Learn How To Use.

Templates Strategies: Semi-Automated Rules

For those who prefer a bit more control, Template Strategies offer a semi-automated experience. Here, you can start with a pre-designed rule and then customize it to suit your specific trading style or preferences: Pre-Built Template Strategies.

Build Your Own Strategy: 'Manual' Creation of Rules

If you're looking for complete control over your trading strategy, Coinrule allows you to build your strategy from scratch. This option is ideal for experienced traders who have a clear vision of their trading rules and criteria.

The platform includes various indicators, timeframes, and also our TradingView integration that provides you with more trading options. ﻿The profit can vary based on the coins the rule trades and the general market conditions. Trading involves risk, so you could lose or you can gain with profits not being stable over time.

​﻿

﻿Coinrule is cloud-based so you don't need to keep your PC on as they run on our servers 24/7.

​﻿

﻿You can use Coinrule for free on a Starter plan, or you can upgrade to one of the Premium options: Compare Plans. Using a premium plan will gain you access to our Telegram community where Coinrule traders share their rules and trading ideas.

​﻿

These 1-Minute Short Videos will give you a brief introduction to Coinrule.

​﻿

﻿Find out how to Build a Rule in a few steps.

​﻿

You can visit our exhaustive Knowledge Base for more information or drop us a message and we would be happy to help. To get started, you can begin trading with our Demo Exchange which helps you get familiar with the platform without involving your funds.

Happy Trading!
How to Use CoinruleGPT to Optimize Strategies with AI


CoinruleGPT is a powerful tool designed to enhance your algorithmic trading experience on Coinrule. Follow these steps to maximize its potential:

Input Your Strategy:
- Start by copying your trading strategy logic from Coinrule and pasting it into CoinruleGPT. Ensure that you include all condition blocks, action blocks, and operators such as "OR" and "AND."

Optimize Rule Logic:
- CoinruleGPT can help you refine your rule logic. For example, understanding the use of "that coin" in action blocks can simplify complex strategies. Remember, "that coin" only appears if the output of the conditions is unambiguous​​.

Validate Conditions and Actions:
- Verify that each condition and action block is correctly set. CoinruleGPT will highlight any inconsistencies or potential errors, such as too many "OR" operators which can complicate the rule's execution​​.

Simulate Strategies:
- Use CoinruleGPT to simulate your strategy. It will provide insights into potential outcomes and identify areas for improvement. Simulating helps ensure your strategy performs well under various market conditions.

Incorporate Feedback:
- Review the feedback provided by CoinruleGPT and adjust your rules accordingly. This iterative process will help you create a more robust and effective trading strategy.

By following these steps, you can leverage CoinruleGPT to optimize your Coinrule trading strategies, making your trading more efficient and potentially more profitable.
Edit A Rule

The option to edit parameters of the rules allows for great flexibility in managing your strategies dynamically

How To Edit A Rule On Coinrule

Creating a successful automated strategy is a dynamic process. By monitoring the performance of the rule and adjusting some key parameters, you can improve the returns on the go.

Your next best strategy could be an edited version of one of the rules you are already running today!

On the activity page of each rule, you can select the Edit option to change selected parameters of the rule to optimise it according to market conditions or your needs.

Some parameters are not editable, as they would change the overall structure of the rule significantly.

NOTE: If you need greater flexibility, you can use the Duplicate option, instead. That creates a new rule that will run in parallel to the original one.

In Edit mode, you can change the following parameters:

Price percentages
RSI target values
Order type (market or limit)
Order amounts and sizes
Rule Name
Max number of executions
Max frequency of executions ("no more than")

Typical use cases

Increase the number of executions of rules which are performing well to boost your profits.

Stop new executions by changing the number of times the rule should execute and setting it equal to the number of times the rule is already executed. For example, by setting the number to 50 for a rule that opened 50 positions, the rule is not going to open new trades. Trades previously open are not affected, they will close gradually according to the original setup.

Increase or decrease the frequency the rule will open new positions. Depending on your needs, you can run rules more or less aggressively.

Adjust stop loss and take profit on trades. Depending on evolving market conditions, you can adjust on-the-go your risk management approach for the strategy.
​

Adjust order sizes. This way, you can allocate more funds for rules that are overperforming, and scale down on rules that not performing as expected.

Change the rule name. Rule names are important for record-keeping, and to add notes about the performances of the strategy.

NOTE: When editing a rule including a TradingView signal, you don't need to edit the alert on TradingView. The webhook address and the requited message remain the same.
DeFi Trading on Coinrule

Learn more about DeFi integrations

Introducing Our New DeFi Product (Closed Beta)

We're excited to announce the integration of our new DeFi product, currently in a closed beta phase. It's available to a select number of users who can help us refine and enhance it before the full launch.

If you're interested in being added to the whitelist, you can apply for access through this application form.

More on DeFi

To start building DeFi Rules, you’ll first need to connect a DeFi wallet. This connection allows Coinrule to automatically set up a secure Smart Account for you.

Each Smart Account is unique and tied to your Coinrule account. Your connected wallet acts as the signer for your Coinrule Smart Account. After your Smart Account is set up, you can deposit funds into it to begin launching rules to automate trades on decentralized exchanges (DEXs). This setup combines the power of automation with the benefits of decentralization, giving you more control and flexibility in your trading all while ensuring that your funds remain fully under your control at all times.

On top of that, Coinrule's Smart Account gives you complete self custody over your funds. There is no risk of a bank giving you a hassle for running a crypto business and the smart contract that is deployed is completely trustless and in your control.

For more detailed information, guides, and a technical overview, visit our DeFi Docs. If you have any questions, check out our DeFi FAQs.
Ichimoku Cloud with MACD


Introducing The 'Ichimoku Cloud with MACD' Template

The Ichimoku Cloud is a collection of technical indicators that show support and resistance levels, as well as momentum and trend direction. It does this by taking multiple averages and plotting them on a chart. It also uses these figures to compute a “cloud” that attempts to forecast where the price may find support or resistance in the future.

​

The Ichimoku Cloud was developed by Goichi Hosoda, a Japanese journalist, and published in the late 1960s. It provides more data points than the standard candlestick chart. While it seems complicated at first glance, those familiar with how to read the charts often find it easy to understand with well-defined trading signals.

​

The Ichimoku Cloud is composed of five lines or calculations, two of which comprise a cloud where the difference between the two lines is shaded in.

The lines include a nine-period average, a 26-period average, an average of those two averages, a 52-period average, and a lagging closing price line.

The cloud is a key part of the indicator. When the price is below the cloud, the trend is down. When the price is above the cloud, the trend is up.

The above trend signals are strengthened if the cloud is moving in the same direction as the price. For example, during an uptrend, the top of the cloud is moving up, or during a downtrend, the bottom of the cloud is moving down.

​

The MACD is a trend following momentum indicator and provides identification of short-term trend direction. In this variation it utilises the 12-period as the fast and 26-period as the slow length EMAs, with signal smoothing set at 9.

​

This strategy combines the Ichimoku Cloud with the MACD indicator to better enter trades.

​

Long/Short orders are placed when three basic signals are triggered.

​

Long Position:​

Tenkan-Sen is above the Kijun-Sen
​
Chikou-Span is above the close of 26 bars ago
​
Close is above the Kumo Cloud
​
MACD line crosses over the signal line
​

Short Position:​

Tenkan-Sen is below the Kijun-Sen
​
Chikou-Span is below the close of 26 bars ago
​
Close is below the Kumo Cloud
​
MACD line crosses under the signal line
​

The script is backtested from 1 June 2022 and provides good returns.

​

The strategy assumes each order is using 30% of the available coins to make the results more realistic and to simulate you only ran this strategy on 30% of your holdings. A trading fee of 0.1% is also taken into account and is aligned to the base fee applied on Binance.

​

This script also works well on MATIC (1h timeframe), AVA (45m timeframe), and BTC (30m timeframe).
Technical Indicators

An introduction to technical indicators and how Coinrule calculates the values

Introduction To Technical Indicators On Coinrule

An automated trading strategy takes decisions based on indicators and triggers that signal when it's the best time to buy or sell a coin.

​

​What Is a Technical Indicator?

Technical indicators are heuristic or pattern-based signals produced by the price, volume, and/or open interest of a security or contract used by traders who follow technical analysis.

By analyzing historical data, technical analysts use indicators to predict future price movements. Examples of common technical and effective technical indicators include the Relative Strength Index (RSI), Moving Averages, Money Flow Index (MFI), moving average convergence divergence (MACD), and Bollinger Bands®.

Technical indicators are mathematical ideals and methodologies applied to asset prices that provide meaningful information regarding the trend. Is it weakening? Is it strengthening? These are valuable information that can make a trading system very profitable.

Examples of very common and effective technical indicators traders use are the Relative Strength Index (RSI) and the Moving Averages.

Interpreting Technical Indicators

It is important to know that technical indicators are not the same as trading strategies, they are tools used in creating trading strategies.

Apart from the subjective interpretation of signals generated by indicators, their mathematical formula or the setup can be adjusted by an experienced trader to provide profitable results.

A common trading tip is to calculate indicators starting from the asset's closing price in a specific period (according to the selected time frame). Then, the trader considers only signals generated by "closing prices."

Wait for Price Confirmation

Using closed prices avoids false signals and ensures that your rule executes upon a confirmation. This prevents your rule from executing on every single volatile move which can be caused by outliers, such as, a relatively large market order causing price and intra-timeframe indicator values to spike. ​

If your rule is set to sell if the RSI reaches 70 on the 1-hour timeframe, the bot needs a value greater than 70 and confirmed by the closing a candle to trigger the order.

Once the candle closes, and the RSI is confirmed, that is valid until a new candle closes. As an example, selecting a time frame of 1-hour results in each sequential RSI value to be valid for 1 hour.

The system does not consider values of RSI calculated from real-time trades. That would result in different indicator values very frequently, potentially causing over-reaction to every price move.

Over-reacting to a price move is typical error traders do with manual trading. Respecting the strict rule of relying on confirmations is one of the main advantages of running an automated trading strategy, excluding emotions from the decision-making process.

To learn more about how technical indicators are used on Coinrule, kindly visit our Technical FAQ page https://atlas-kb.com/atlas-sbw870763c/categories/980014-technical-faq
Time Frames For Price Changes

Optimise the timeframe of your trading strategy to increase the performance of your trades.

Understanding Time Frames For Price Changes

There are endless trading strategies that traders can build. The style and the approach of each system depend mostly on

the indicator selected
the time frame of the indicator.

The time frame determines the calculation of the indicator, and thus, has a key role in shaping the trading strategy.

For example, regarding the choice of a price change in a condition, you can set a higher or lower price change, and you can calculate it on a longer or shorter time frame.

This matrix summarizes how these elements influence the style of the strategy.

How we calculate the time frames for price

After selecting an indicator to add to your condition block, you need to choose the time frame in which to calculate it.

Let's take as an example a "price increase within 15 minutes".

That means that the price reference to calculate the price increase is updated every 15 minutes. The bot uses candlestick data so that at any time, it compares the market price to the closing price of the first previous 15-minutes candle.

You can check the time frame on a chart to see how it works. The example below shows how it would work.

​The current price increase of BTCUSDT within 15 minutes is around +0.40%

When you select a time frame, the bot dynamically follows the market trend. If you prefer to use a fixed price reference, you can use "from current market price" instead.

In the realm of cryptocurrency trading, the use of 'closed candles' is pivotal for accurate analysis and decision-making. Trades are executed on Coinrule based on closed candles. Read more here

What Are Closed Candles?

Closed candles are candles that have completed their time period and have a finalized set of data. This is in contrast to an 'open candle' which is still forming and whose final values can change until the time period closes. Using closed candles for technical analysis provides a more stable and reliable foundation for evaluating market trends and making trading decisions. It ensures that all the information used has been settled, reflecting a full cycle of trading dynamics within the time frame selected.

​

​Example from a Chart

For instance, in a 1-hour candlestick chart, each candle represents price movement over one hour. A closed candle on this chart means that the hour has ended and the next candle begins. If a trader is looking at a candle from 2 PM to 3 PM, once the clock strikes 3 PM, that candle is considered closed, and the analysis will only consider the data between 2 PM and 3 PM. Below is an example of how closed candles might appear on a chart:

Here, you can see several closed candles, each indicating the finalized state of market conditions over successive time frames. Traders would use this finalized information to predict future movements or confirm past trends.
How To Use Time-Weighted Average Price (TWAP)

A guide explaining the new TWAP indicator on Coinrule!

TWAP is a trading benchmark used to determine the average price of an asset over a specific period. It is particularly useful for traders aiming to execute large orders while minimizing market impact.

What is TWAP?

TWAP, or Time-Weighted Average Price, calculates the average price of an asset over a set period by dividing the total value traded by the total volume traded during that period.

TWAP = (Sum of (Price × Time Interval within Anchor Period) ) / (Sum of Time Intervals within Anchor Period)

TWAP is commonly used by algorithmic traders and institutions to split large trades into smaller chunks to ensure execution at or near the average market price, reducing slippage and impact on the market.

Using TWAP on Coinrule

On Coinrule, you can configure TWAP to match your strategy. The periods available range from 5 minutes to 1 day.

The Anchor Period setting specifies the Anchor, i.e. how frequently the TWAP calculation will be reset.

Here are some ways to integrate TWAP into your strategies:

Market Execution Strategy:

Place orders based on the TWAP value to ensure execution near the average price.
Example: Buy an asset when the market price is below the TWAP for the selected period, signaling a potential discount.

Price Benchmarks:

Compare the current price to the TWAP to gauge market conditions.
Example: If the current price is significantly above TWAP, it might indicate an overbought condition.

Exit Strategies:

Use TWAP as a reference for selling an asset when prices exceed a defined threshold relative to the TWAP.
Example: Trigger a sell when the market price is 5% above the TWAP.

Example Use:

Example: TWAP in Action

Let’s consider a TWAP with a 1-hour period:

An asset has fluctuated in price over the last hour, with the TWAP calculated at $100.
If the current price falls to $95, traders might see this as a buying opportunity, expecting a reversion to the mean.
Conversely, if the price rises to $105, it could signal an overbought condition, prompting a sell.

Important Note: this article does not constitute trading advice.
Moving Average Scalper

A strategy to catch short-term rallies in all market conditions, opening and closing trades very quickly.

Introducing The 'Moving Average Scalper' Strategy

The main goal of a scalping strategy is to open and close trades frequently, profiting from small gains and limiting the downside risk.

This strategy, on average, manages to close trades within one day, meaning that you are not exposed to the risk of holding that coin for long. In this way, market conditions affect much less the overall performance of the trading system.

The setup of this strategy uses four moving averages combined with an unconventional approach. On one side, the strategy aims to catch assets trading in a downtrend but on the verge of a possible reversal. Then, the goal of the trading strategy is not to ride the eventual uptrend but to close the trade with minimal profit so that it can scan the market for a new opportunity again.

ENTRY

The buy order is placed on assets that most likely are about to have at least a short-term "relief rally." To capture this setup, the strategy buys when

the MA9 crosses above the MA50
the MA50 is lower than the MA100
the MA100 is lower than the MA200

EXIT

The trading system closes the trade when the MA9 crosses above the MA200, which could be the first major resistance the asset faces before developing a more sustained uptrend.

As a reminder, the goal of the strategy is not to catch the whole upside of the asset but has a more conservative approach. This allows keeping the risk of the strategy low.

​

Create the strategy with Coinrule

You will find the strategy in the template library, or you can build it yourself step-by-step.

Pro tip: The 15-min time frame has proven to return the best results on average. The strategy can work well also in the 5-min time frame.

​This strategy made 71.43% net profit on ETH/USDT on the 12Hour timeframe from January 2022 - November 2022.

Backtest the strategy on Tradingview

You can backtest this strategy using this trading script published on Tradingview. You can test the results on historical data, selecting the coin of your choice, and adjusting the parameters to fit even better your needs.

This is a guide to learn how to backtest strategies on Tradingview.