moomoo SG Help Center-How to Set Trigger Conditions to Run a Strategy
English
Back
Download
Log in to access Online Inquiry
Back to the Top

How to Set Trigger Conditions to Run a Strategy

Trigger conditions are essential for running strategies during backtesting and live trading. The following are some of the trigger conditions provided in Algo trading:

 

Any images provided are not current and any securities shown are for illustrative purposes only and are not recommendations.

1. Real-time quotes

1.1 Run once per candle

Any images provided are not current and any securities shown are for illustrative purposes only and are not recommendations.

If you select "Run once for every 1h candle," the strategy will start at the beginning of each hour's candle instead of its end. This means the strategy will always run at the start of the trading day, coinciding with the first 1-hour candle. But it won't run at the end of the trading day. Please note that at the beginning of each candle, it's still incomplete, so only one price is available. Thus, the highest, lowest, opening, and closing prices of the latest candle will all equal the opening price.

 

Any images provided are not current and any securities shown are for illustrative purposes only and are not recommendations.

1.2 Run once for every tick

A tick shows the details of a trade.

 

Any images provided are not current and any securities shown are for illustrative purposes only and are not recommendations.

By selecting this option, the strategy will run once for every tick.

 

Any images provided are not current and any securities shown are for illustrative purposes only and are not recommendations.

The frequency of the trigger depends on the underlying security's trading activity. If the security is highly active, the strategy will run more frequently. This trigger condition is ideal for real-time monitoring of a specific security to avoid missing any quotes.

Note: The tick data in backtesting is simulated based on 1-minute candles (with four trades per minute) and not actual past tick data.

 

2. Time intervals

Any images provided are not current and any securities shown are for illustrative purposes only and are not recommendations.

If you set it to run once every 2 seconds, for example, the strategy will execute every 2 seconds, regardless of the underlying security's trading status.

 

3. Specific time

Any images provided are not current and any securities shown are for illustrative purposes only and are not recommendations.

If you set it to run at a specific time, such as 15:50:00 ET, the strategy will run once daily at that specified time, regardless of the underlying security's trading status. This trigger condition is typically used for scenarios like "performing operations before market close each day" or "rebalancing portfolio each day".

 

Risk Disclosure This presentation is for informational and educational use only and is not a recommendation or endorsement of any particular investment or investment strategy. Investment information provided in this content is general in nature, strictly for illustrative purposes, and may not be appropriate for all investors. It is provided without respect to individual investors’ financial sophistication, financial situation, investment objectives, investing time horizon, or risk tolerance. You should consider the appropriateness of this information having regard to your relevant personal circumstances before making any investment decisions. Past investment performance does not indicate or guarantee future success. Returns will vary, and all investments carry risks, including loss of principal. Moomoo makes no representation or warranty as to its adequacy, completeness, accuracy or timeliness for any particular purpose of the above content.