How many strategies can Ptrade support at the same time?

You can create countless strategies and backtests in Ptrade, but if you want to run real-time strategies, you can only run 5 at the same time. After more than 5, you will be prompted to stop some of the running strategies before you can add a new strategy.

In the code, if multiple strategies are running at the same time, it is necessary to distinguish the orders under different strategies at the code level, otherwise conflicts will occur. For example, your order under the first strategy is cleared by the second strategy. So how to distinguish between different strategies to place an order?

1. If it is an intraday strategy, you only need to use a dictionary dict to record each purchase record, and each sale target must be in the dict.

2. Persistence. Although the Ptrade of most brokerages does not support networking, local persistence, pickle or sqlite can be used. Save locally in the cloud.


In fact, if we want to do quantification, there is no need to be limited to Ptrade. After all, the threshold is relatively high. I can also try other quantitative trading interfaces, which also support localization, such as the following:

name

Function

basic function

Init

API initialization

Deinit

API deinitialization

Logon

Login to trading account

logoff

Log out of trading account

QueryData

Query various transaction data

QueryHistoryData

Query various historical data

SendOrder

Order

CancelOrder

Order Cancellation

GetQuote

Get five quotes

Repay

Margin and securities lending account direct repayment

GetExpireDate

Query API authorization expiration date

There are many quantitative trading interface projects now , and we can also find them on code hosting platforms, such as here: https://gitee.com/metatradeapi. Quantitative platforms like Ptrade are good, but in fact, after careful understanding, you will find other options Not less.

Guess you like

Origin blog.csdn.net/qq1841085904/article/details/127905289