Creating Profitable Algorithmic Trading Strategies

Master the process of building powerful automated stock trading strategies using Investfly's no-code algorithmic trading platform.

Managing Your Algorithmic Trading Strategies

With Investfly's algorithmic trading platform, you can create multiple automated trading strategies to test different ideas independently. The strategies page displays all your algorithmic trading strategies, showing their name, description, visibility, and deployment status. The deployment status indicates whether your automated trading strategy is deployed to a live or virtual trading account.

You can edit your algorithmic trading strategy name and description directly from the table. To modify deeper strategy details like entry and exit conditions for your automated trading system, click on the strategy name to access the strategy details page. For further instructions on optimizing your algorithmic trading strategy, read Working with Automated Strategy.

Algorithmic Trading Strategy List

Building a New Algorithmic Trading Strategy

Follow these steps to create a new automated stock trading strategy:

  1. Access the algorithmic trading strategy list page
  2. Click on the "Create New" button at the top right
  3. A popup dialog will appear with template algorithmic trading strategies displayed in a slideshow
  4. Click on "Select and Modify" to use a template, or click "Create from Scratch"

A guided wizard with 10 steps will start to help you create your algorithmic trading strategy:

Step 1: Algorithmic Trading Strategy Details

  • Enter the name, description, and visibility for your automated trading strategy
  • A public algorithmic trading strategy is viewable by other users on Investfly's platform

Step 2: Automated Trading General Settings

Security Type for Algorithmic Trading

Investfly's automated trading platform supports algorithmic trading strategies for both stocks and options. However, there are some limitations for option strategies:

  • Entry and exit criteria for automated options trading must be based on the underlying stock price, not the option price, as we do not have continuous data feed for all option prices
  • Algorithmic options trading strategies cannot be backtested due to the lack of historical data for option prices
Position Type for Your Trading Algorithm

Select LONG or SHORT for your automated trading strategy. Currently, you can only specify one entry condition, and when it is met, a LONG or SHORT position is opened as specified here.

Step 3: Automation Scope

Specify the automation scope. Read Automation Concepts for more details.

Step 4: Open Trigger Condition

Specify the entry condition. Read Logical Expressions and Expression Builder for more details.

Trade Security

Normally, you will leave it as "Trade Triggered Security" because the security that meets the entry condition should be traded. This is useful for correlation trading, where you define entry conditions on one security but trade a different stock. For example, if you think WMT typically follows AMZN price movements, you may set a rule to buy WMT when AMZN goes up by 5%. To achieve this, define criteria on AMZN as scope, but select "Trade Different Security" and put WMT as the symbol.

Step 5: Trigger Restriction

Time Restrictions

You may want to start trading only a few minutes after the market opens and stop trading a few minutes before the market closes to avoid high volatility. Set time restrictions for your open trade condition, which will only be evaluated within the time you set here.

Open Trade Gap

To avoid unwanted trade signals due to wild price swings, set an open trade gap.

Step 6: Open Order Type

  • Set Market or Limit Order
  • Set GTC or Day order duration

Step 7: Trade Cash Allocation

Allocation Method

Read the section on portfolio allocation in Automation Concepts and set accordingly.

Incremental Trade

Investfly supports trading incrementally for large orders. If you want to split your order into multiple small orders, select "Trade Incrementally".

Reserved Cash

Reserved Cash is useful only for trading with a real broker account. If your broker account has a large cash balance and you want to risk only a part of it with this strategy, set reserved cash. The strategy will only invest the amount in your account after subtracting reserved cash.

Step 8: Close Trigger

Specify standard exit conditions such as target profit, loss, and trailing loss.

Min Hold Period

If specified, your open position will not be closed until the minimum hold period, even if other exit conditions are met.

Timeout Period

This is the inverse of the min hold period. The open position will always be closed after the timeout period.

Custom Close Condition

Define a logical expression similar to the open trade condition.

Step 9: Close Trade Restrictions

Excluded Securities

This is applicable when the strategy is deployed to a real trading account. If you have already open positions that this strategy should not close, specify those here.

Specify time restrictions if any.

Step 10: Close Order Type

  • Set Market or Limit Order
  • Set GTC or Day order duration
Final Step: After completing all 10 steps, click "Save" to finalize your trading strategy.

Next Steps

After creating your strategy, you can backtest it using historical data, deploy it to a virtual or real broker account, and monitor its performance over time. For more information on managing your strategies, see Working with Automated Strategy.

Ready to Automate Your Trading?

Start building your own algorithmic trading strategies today!

Start Free Trial

No credit card required.