Category
- Trading Strategies
- Get Started
- Exchanges Guidelines
- Trading Tips
How to create your first rule condition
How to Create Your First Rule Condition on Coinrule
Every automated Coinrule strategy begins with a condition. The condition tells the trading bot what must happen in the market before it performs an action.
For example:
If Bitcoin decreases by 2% within one hour, then buy $20 of Bitcoin.
Here, the price decrease is the condition, while the purchase is the action.
Step 1: Open the Rule Editor
Sign in to Coinrule and select Create Rule from the dashboard. Choose the Demo Exchange for your first rule so you can learn how conditions work without risking real funds.
Coinrule recommends selecting the exchange before defining the conditions and actions of a rule. View Coinrule’s rule-building guide.
Step 2: Choose a Condition Type
Select the first condition block and decide what should trigger your rule. Available options may include:
- A price increase or decrease
- A specific market price
- A technical indicator such as RSI
- A moving-average signal
- A recurring time interval
- A direct order
For a simple first condition, you could select:
If BTC has a price decrease of 2% within one hour.
Coinrule uses candlestick data when evaluating percentage changes within a selected timeframe. For a one-hour condition, the current market price is compared with the relevant previous hourly candle close. Learn how Coinrule calculates timeframes.
Step 3: Select the Asset and Timeframe
Choose the cryptocurrency that Coinrule should monitor. You can select one specific asset, a collection of assets or “any coin,” depending on your strategy and account plan.
Next, select a timeframe. Shorter timeframes may produce more signals, while longer timeframes generally respond to broader market movements.
Make sure the timeframe matches your strategy. A 2% movement over five minutes represents a very different market event from a 2% movement over 24 hours.
Step 4: Add More Conditions if Needed
Coinrule allows conditions to be connected with AND or OR:
- Use AND when every condition must be true.
- Use OR when any one of the conditions can trigger the action.
For example:
If BTC decreases by 2% within one hour AND its RSI is below 35, then buy BTC.
Both conditions must be true before the action can execute.
A simpler alternative would be:
If BTC decreases by 2% within one hour OR its RSI falls below 30, then buy BTC.
In this case, either condition can activate the action. Coinrule evaluates combined conditions sequentially, so review their order carefully when creating more complex logic. Read about building condition blocks.
Step 5: Review the Condition
Before adding an action, read the condition as a complete sentence. Confirm that:
- The correct asset is selected
- The percentage or indicator value is correct
- The timeframe matches your intention
- AND and OR are being used correctly
- The condition is not likely to trigger too frequently
Once the condition is ready, define what Coinrule should do when it becomes true, such as buying, selling or sending a notification.
Start with one simple condition and test it on the Demo Exchange. After you understand how the rule responds, you can gradually add indicators, additional conditions and risk-management controls.
Automated trading involves risk, and no condition can guarantee a profitable result. Always test your strategy carefully before using real funds.