PiXiu - A Chinese mythological creature that brings fortune to people.
PiXiu
A trading backtesting tool similar to MT4/MT5.
It has a standard set of API definitions, and backtesting code written using these APIs can be run on www.TradePython.com without changes.
Install
pip install pixiu
If you have problems installing TA-Lib, please refer to https://github.com/mrjbq7/ta-lib
How to use
Parameters :
-c/--testconfig test config
-n/--testname test name (in the test configuration file)
-s/--scriptpath script file
-o/--logpath log file
-p/--printlogtype print log type
-m/--multiprocessing multiprocessing mode
-r/--compare compare with the tags list
-t/--tag tag
-l/--datafile data file name
Basic
pixiu -c pixiu_sample.json -n testUSDCHF_TP -s pixiu_sample.py
pixiu -c pixiu_sample.json -n testUSDCHF_TP -s pixiu_sample.py
pixiu -c pixiu_sample.json -n testUSDCHF -s pixiu_sample2.py -o log.txt
Compare multiple strategies
pixiu -c pixiu.json -n testAUDUSD_TP_Demo1 testGBPUSD_TP_Demo1 testNZDUSD_TP_Demo1 testEURUSD_TP_Demo1 testUSDCHF_TP_Demo1 testUSDJPY_TP_Demo1 testUSDCAD_TP_Demo1 -s ../EA/EA_V2.10.0.py -p report -t 2.10.0 -l ea2_7.json
pixiu -c pixiu.json -n testAUDUSD_TP_Demo1 testGBPUSD_TP_Demo1 testNZDUSD_TP_Demo1 testEURUSD_TP_Demo1 testUSDCHF_TP_Demo1 testUSDJPY_TP_Demo1 testUSDCAD_TP_Demo1 -s ../EA/EA_V2.10.1.py -p report -t 2.10.1 -l ea2_7.json
pixiu -c pixiu.json -n testAUDUSD_TP_Demo1 testGBPUSD_TP_Demo1 testNZDUSD_TP_Demo1 testEURUSD_TP_Demo1 testUSDCHF_TP_Demo1 testUSDJPY_TP_Demo1 testUSDCAD_TP_Demo1 -s ../EA/EA_V2.10.2.py -p report -t 2.10.2 -l ea2_7.json
pixiu -c pixiu.json -n testAUDUSD_TP_Demo1 testGBPUSD_TP_Demo1 testNZDUSD_TP_Demo1 testEURUSD_TP_Demo1 testUSDCHF_TP_Demo1 testUSDJPY_TP_Demo1 testUSDCAD_TP_Demo1 -t 2.10.0 -r 2.10.1 2.10.2 -l ea2_7.json
Output:
+----+--------------------------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+--------------------+
| | | testAUDUSD_TP_Demo1 | testGBPUSD_TP_Demo1 | testNZDUSD_TP_Demo1 | testEURUSD_TP_Demo1 | testUSDCHF_TP_Demo1 | testUSDJPY_TP_Demo1 | testUSDCAD_TP_Demo1 | Total/Avg |
+----+--------------------------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+--------------------+
| 1 | Init Balance(2.10.0) | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 35000.0 / 5000.0 |
| 1 | Init Balance(2.10.1) | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 35000.0 / 5000.0 |
| 1 | Init Balance(2.10.2) | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 35000.0 / 5000.0 |
...
| 7 | Balance(2.10.0) | 4988.31 | 5064.61 | 5041.77 | 5071.6 | 4994.96 | 4996.97 | 4996.94 | 35155.16 / 5022.17 |
| 7 | Balance(2.10.1) | 5003.42 ↑ | 5061.26 ↓ | 5000.58 ↓ | 4965.65 ↓ | 5009.12 ↑ | 5033.44 ↑ | 4931.17 ↓ | 35004.64 / 5000.66 |
| 7 | Balance(2.10.2) | 4981.59 ↓ | 5076.74 ↑ | 5000.58 ↓ | 4985.02 ↓ | 5023.02 ↑ | 5029.35 ↑ | 4965.34 ↓ | 35061.64 / 5008.81 |
| 8 | Total Net Profit(2.10.0) | -11.69 | 64.61 | 41.77 | 71.6 | -5.05 | -3.02 | -3.05 | 155.17 / 22.17 |
| 8 | Total Net Profit(2.10.1) | 3.42 ↑ | 61.26 ↓ | 0.58 ↓ | -34.35 ↓ | 9.14 ↑ | 33.44 ↑ | -68.84 ↓ | 4.65 / 0.66 |
| 8 | Total Net Profit(2.10.2) | -18.41 ↓ | 76.74 ↑ | 0.58 ↓ | -14.98 ↓ | 23.04 ↑ | 29.35 ↑ | -34.68 ↓ | 61.64 / 8.81 |
| 9 | Total Net Profit Rate(2.10.0) | -0.23 % | 1.29 % | 0.84 % | 1.43 % | -0.1 % | -0.06 % | -0.06 % | 3.11 % / 0.44 % |
| 9 | Total Net Profit Rate(2.10.1) | 0.07 % ↑ | 1.23 % ↓ | 0.01 % ↓ | -0.69 % ↓ | 0.18 % ↑ | 0.67 % ↑ | -1.38 % ↓ | 0.09 % / 0.01 % |
| 9 | Total Net Profit Rate(2.10.2) | -0.37 % ↓ | 1.53 % ↑ | 0.01 % ↓ | -0.3 % ↓ | 0.46 % ↑ | 0.59 % ↑ | -0.69 % ↓ | 1.23 % / 0.18 % |
...
pixiu -c pixiu.json -n testUSDCAD_TP_Demo1 -t 2.10.0 -r 2.10.1 2.10.2 -l ea2_7.json
Output:
+----+--------------------------------------+---------------------+-------------------+
| | | testUSDCAD_TP_Demo1 | Total/Avg |
+----+--------------------------------------+---------------------+-------------------+
| 1 | Init Balance(2.10.0) | 5000.0 | 5000.0 / 5000.0 |
| 1 | Init Balance(2.10.1) | 5000.0 | 5000.0 / 5000.0 |
| 1 | Init Balance(2.10.2) | 5000.0 | 5000.0 / 5000.0 |
...
| 7 | Balance(2.10.0) | 4996.94 | 4996.94 / 4996.94 |
| 7 | Balance(2.10.1) | 4931.17 ↓ | 4931.17 / 4931.17 |
| 7 | Balance(2.10.2) | 4965.34 ↓ | 4965.34 / 4965.34 |
| 8 | Total Net Profit(2.10.0) | -3.05 | -3.05 / -3.05 |
| 8 | Total Net Profit(2.10.1) | -68.84 ↓ | -68.84 / -68.84 |
| 8 | Total Net Profit(2.10.2) | -34.68 ↓ | -34.68 / -34.68 |
| 9 | Total Net Profit Rate(2.10.0) | -0.06 % | -0.06 % / -0.06 % |
| 9 | Total Net Profit Rate(2.10.1) | -1.38 % ↓ | -1.38 % / -1.38 % |
| 9 | Total Net Profit Rate(2.10.2) | -0.69 % ↓ | -0.69 % / -0.69 % |
...
Test configuration file format
JSON format:
{
"accounts": {
"default": {
"balance": 10000.0,
"equity": 10000.0,
"margin": 0,
"free_margin": 10000.0,
"credit": 0.0,
"profit": 0.0,
"margin_level": 0,
"leverage": 100,
"currency": "USD",
"free_margin_mode": 0,
"stop_out_level": 0,
"stop_out_mode": 0,
"company": "TradePython.com",
"name": "PXTester",
"number": "000",
"server": "PXTester",
"trade_mode": 0,
"limit_orders": 500,
"margin_so_mode": 0,
"trade_allowed": true,
"trade_expert": 1,
"margin_so_call": 0.0,
"margin_so_so": 0.0,
"commission": 0.0
}
},
"symbols": {
"USDCHF": {
"symbol": "USDCHF",
"spread": 2,
"digits": 5,
"stop_level": 0,
"volume_min": 0.01,
"trade_contract_size": 100000,
"point": 0.00001,
"currency_profit": "CHF",
"currency_base": "USD",
"currency_margin": "USD"
}
},
"tests": {
"testUSDCHF": {
"symbol": "USDCHF",
"tick_data": "usdchf_m1_20210315-0415.csv",
"start_time": "2021-03-15",
"end_time": "2021-04-16",
"max_tick": 100,
"balance": 10000,
"leverage": 100,
"currency": "USD",
"account": "default",
"spread_point": 15
},
"testUSDCHF_TP": {
"symbol": "USDCHF",
"tick_data": {
"channel": "tradepython.com",
"api_token": "YOUR-API-TOKEN",
"source": "12345678@PixiuServer01",
"format": "json",
"period": 30,
"timeframe": "m1"
},
"max_tick": 100,
"balance": 10000,
"leverage": 100,
"currency": "USD",
"account": "default",
"spread_point": 15
},
"testUSDCHF_TP2": {
"symbol": "USDCHF",
"tick_data": {
"channel": "tradepython.com",
"api_token": "YOUR-API-TOKEN",
"source": {"type": "public", "name": "Demo1"},
"format": "json",
"period": 30,
"start_time": "2021-03-15",
"end_time": "2021-04-16",
"timeframe": "m1"
},
"start_time": "2021-03-15",
"end_time": "2021-04-16",
"max_tick": 100,
"balance": 10000,
"leverage": 100,
"currency": "USD",
"account": "default",
"spread_point": 15
}
}
}
Testing with csv files:
symbol: product
tick_data: tick data data file
start_time: start time
end_time: end time
max_tick: the maximum number of ticks to test, which can reduce the test time
balance: initial capital of the test account
leverage: leverage of the test account
account: the name of the test account (in the test profile accounts)
spread_point: spread
"testUSDCHF": {
"symbol": "USDCHF",
"tick_data": "usdchf_m1_20210315-0415.csv",
"start_time": "2021-03-15",
"end_time": "2021-04-16",
"max_tick": 100,
"balance": 10000,
"leverage": 100,
"currency": "USD",
"account": "default",
"spread_point": 15
}
Test with tradepython data test
source: Data account
account@account-server
Example:
12345678@PixiuServer01
or: {"type": "public", "name": "Demo1"}
type: public or private
name: Account name
period: data period (days)
Example:
30 - the last 30 days of data
timeframe: time frame, the following values
s1 - 1 second
m1 - 1 minute
m5 - 1 minute
m15 - 15 minutes
m30 - 30 minutes
h1 - 1 hour
h4 - 1 hour
d1 - 1 day
w1 - 1 week
mn1 - 1 month
"testUSDCHF_TP": {
...
"tick_data": {
"channel": "tradepython.com",
"api_token": "YOUR-API-TOKEN",
"source": "account@account-server",
"format": "json",
"period": 30,
"timeframe": "m1"
},
...
}
Cross-currency conversion
When the trading symbol profit or margin currency differs from the account currency, Pixiu can convert profit and margin into the account currency during testing.
Enable dynamic conversion with currency_conversion_settings:
{
"tests": {
"testEURGBP_USD": {
"symbol": "EURGBP",
"account": "default",
"currency": "USD",
"tick_data": {
"channel": "tradepython.com",
"api_token": "YOUR-API-TOKEN",
"source": {"type": "public", "name": "Demo1"},
"format": "json",
"period": 30,
"timeframe": "m1"
},
"currency_conversion_settings": {
"mode": "dynamic",
"auto_download": true,
"download_policy": "before_test",
"path_policy": "direct_then_usd",
"missing_rate": "download_then_error",
"time_alignment": "latest_before_or_at_tick",
"price_mode": "bid_ask",
"fallback_enabled": false
}
}
}
}
Supported first-version behavior:
mode: dynamic
Use conversion symbol tick data.
auto_download: true
PXTester attempts to load missing conversion symbols from the same tick_data channel before the backtest loop starts.
download_policy: before_test
Conversion data is prepared before the test starts. Pixiu does not download data during the tick loop.
path_policy: direct_then_usd
Pixiu first tries the direct or inverse conversion pair. If it is unavailable and neither currency is USD, Pixiu uses a USD bridge.
time_alignment: latest_before_or_at_tick
Use the latest conversion tick whose time is less than or equal to the current test tick.
Examples:
GBP -> JPY:
Prefer GBPJPY.
If GBPJPY is unavailable, use GBPUSD + USDJPY.
GBP -> USD:
Prefer GBPUSD.
If GBPUSD is unavailable, use USDGBP.
You can explicitly configure conversion sources with currency_conversions:
{
"currency_conversions": {
"GBPUSD": {
"source": "symbol",
"symbol": "GBPUSD",
"price": "bid_ask",
"fallback": {
"bid": 1.2500,
"ask": 1.2502
}
},
"USDJPY": {
"source": "symbol",
"symbol": "USDJPY",
"price": "bid_ask"
},
"GBPJPY": {
"source": "symbol",
"symbol": "GBPJPY",
"price": "bid_ask"
}
}
}
For a full development note, see CROSS_CURRENCY.md.
Script Samples
-
Buy or sell a product
errid, order_uid = Buy(volume=volume, price=Ask()) errid, order_uid = Sell(volume=0.01, price=Bid())
-
Modify an order
errid, order_uid = ModifyOrder(order_uid, stop_loss=stop_loss, take_profit=take_profit)
-
Close an order
errid, order_uid = CloseOrder(order_uid, price=Ask(), volume=volume)
-
Get the current open order UIDs
uids = GetOpenedOrderUIDs() for uid in uids: o = GetOrder(uid)
API
AccountEquity(self)
Returns the equity.
Returns:
The account equity.
AccountFreeMargin(self)
Returns the free margin.
Returns:
The free margin.
CalcProfit(order_type, symbol, volume, open_price, close_price) -> float
Calculates hypothetical order profit in the current account currency.
Parameters:
order_type: Order direction. Supported values are OrderCommand.BUY and OrderCommand.SELL.
symbol (str): Symbol name. If None returns current symbol.
volume (float): Number of lots.
open_price (float): Hypothetical open price.
close_price (float): Hypothetical close price.
Returns:
Profit in account currency. Positive means profit, negative means loss.
OrderCalcProfit(order_type, symbol, volume, open_price, close_price) -> float
MT5-style alias of CalcProfit.
CalcMargin(order_type, symbol, volume, price) -> float
Calculates hypothetical order margin in the current account currency.
Parameters:
order_type: Order direction. Supported values are OrderCommand.BUY and OrderCommand.SELL.
symbol (str): Symbol name. If None returns current symbol.
volume (float): Number of lots.
price (float): Hypothetical open price.
Returns:
Margin in account currency.
OrderCalcMargin(order_type, symbol, volume, price) -> float
MT5-style alias of CalcMargin.
TickValue(symbol=None, order_type=OrderCommand.BUY, price=None) -> float
Returns the account-currency value of one tick for one lot.
Parameters:
symbol (str): Symbol name. If None returns current symbol.
order_type: Order direction used for the estimate.
price (float): Reference price. If None, uses current market price.
Returns:
One-tick value for one lot in account currency.
PipValue(symbol=None, order_type=OrderCommand.BUY, price=None) -> float
Returns the account-currency value of one pip for one lot.
Parameters:
symbol (str): Symbol name. If None returns current symbol.
order_type: Order direction used for the estimate.
price (float): Reference price. If None, uses current market price.
Returns:
One-pip value for one lot in account currency.
Ask(self, shift=0, symbol=None) -> float
Returns Ask price value for the default symbol with default timeframe and shift.
Parameters:
shift (int): Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
symbol (str): The symbol name.
If None returns current symbol.
Returns:
Ask price.
Bid(self, shift=0, symbol=None) -> float
Returns Bid price value for the default symbol with default timeframe and shift.
Parameters:
shift (int): Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
symbol (str): The symbol name.
If None returns current symbol.
Returns:
Bid price.
Buy(self, volume: float, type=0, price=None, stop_loss=None, take_profit=None, magic_number=None, symbol=None, slippage=None, arrow_color=None, expiration=None, tags=None) -> tuple[ErrorID, OrderResult]
Open a long order.
Parameters:
volume (float): Number of lots.
type (OrderType): Order type.
price (float): Order price. If price is None, price = Ask().
stop_loss (float): Stop loss price.
take_profit (float): Take profit price.
magic_number (float): Order magic number.
symbol (float): Symbol for trading.
slippage (float): Maximum price slippage for trading.
arrow_color (float): Color of the opening arrow on the MT4/5 chart.
expiration (float): Order expiration time (for pending order only)
tags (dict): Order tags
Returns:
ErrorID: If 0 success.
OrderResult: The order result.
Sell(self, volume: float, type=0, price=None, stop_loss=None, take_profit=None, magic_number=None, symbol=None, slippage=None, arrow_color=None, expiration=None, tags=None) -> tuple[ErrorID, OrderResult]
Open a short order.
Parameters:
volume (float): Number of lots.
type (OrderType): Order type.
price (float): Order price. If price is None, price = Bid().
stop_loss (float): Stop loss price.
take_profit (float): Take profit price.
magic_number (float): Order magic number.
symbol (float): Symbol for trading.
slippage (float): Maximum price slippage for trading.
arrow_color (float): Color of the opening arrow on the MT4/5 chart.
expiration (float): Order expiration time (for pending order only)
tags (dict): Order tags
Returns:
ErrorID: If 0 success.
OrderResult: The order result.
ModifyOrder(self, uid, price=None, stop_loss=None, take_profit=None, arrow_color=None, expiration=None, tags=None) -> tuple[ErrorID, OrderResult]
Modify a order.
Parameters:
uid : The order UID.
price (float): New open price. (for pending order only)
stop_loss (float): New stop loss price.
take_profit (float): New take profit price.
arrow_color (float): New color of the opening arrow on the MT4/5 chart.
expiration (float): New order expiration time (for pending order only)
tags (dict): Order tags
Returns:
ErrorID: If 0 success.
OrderResult: The order result.
UpdateOrderTags(self, uid, tags=None, patch=None, merge=True, remove_keys=None, expected_tag_ver=None) -> tuple[ErrorID, dict]
Update only the tags of an existing order.
This API is intended for strategy metadata, such as the manager that
created or currently owns an order. It does not send a broker modify
command and does not change trading fields such as volume, open price,
stop loss, take profit, or order status.
Parameters:
uid : The order UID.
tags (dict): Tags to write. When merge is True, these values
are merged into existing tags. When merge is False,
they replace existing tags.
patch (dict): Tags to merge into existing tags. Useful when
the caller wants to express a partial update.
merge (bool): If True, merge tags/patch into current tags.
If False, replace current tags with tags, or patch
when tags is None.
remove_keys (list): Tag keys to remove after merge/replace.
expected_tag_ver: Optional optimistic-lock version. If it is
provided and current tags.tag_ver does not match, the
update fails.
Returns:
ErrorID: If 0 success.
dict: {'order_uid': uid, 'tags': updated_tags, 'sync': True}
SetOrderTags(self, uid, tags) -> tuple[ErrorID, dict]
Replace all tags of an existing order.
This is a convenience wrapper for UpdateOrderTags(uid, tags=tags,
merge=False). It only updates order tags and keeps all trading fields
unchanged.
Parameters:
uid : The order UID.
tags (dict): The complete tag dictionary to store.
Returns:
ErrorID: If 0 success.
dict: {'order_uid': uid, 'tags': updated_tags, 'sync': True}
CloseOrder(self, uid, price, volume: float, slippage=None, arrow_color=None, tags=None) -> tuple[ErrorID, OrderResult]
Close a order.
Parameters:
uid : The order UID.
price (float): Close price.
volume (float): Number of lots.
slippage (float): Maximum price slippage for trading.
arrow_color (float): New color of the opening arrow on the MT4/5 chart.
tags (dict): Order tags
Returns:
ErrorID: If 0 success.
OrderResult: The order result.
Close(self, shift=0, symbol=None) -> float
Returns Close price value for the default symbol with default timeframe and shift.
Parameters:
shift (int): Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
symbol (str): The symbol name.
If None returns current symbol.
Returns:
Close price.
DefaultTimeFrame(self)
Returns the default time frame.
GetAccount(self)
Returns the account data.
Returns:
The account data.
GetClosedOrderUIDs(self, symbol: str = None, scope: int = DataScope.EA)
Returns the UIDs of current closed orders.
Parameters:
symbol: The symbol name.
If None returns current symbol.
If '*' returns all symbols.
scope:
EA: The current ea (default).
ACCOUNT: The current account.
EA_VERSION: The current ea version.
Returns:
The uid list.
GetOpenedOrderUIDs(self, symbol: str = None, scope: int = DataScope.EA)
Returns the UIDs of current opened orders.
Parameters:
symbol: The symbol name.
If None returns current symbol.
If '*' returns all symbols.
scope:
EA: The current ea (default).
ACCOUNT: The current account.
EA_VERSION: The current ea version.
Returns:
The uid list.
GetPendingOrderUIDs(self, symbol: str = None, scope: int = DataScope.EA)
Returns the UIDs of current pending orders.
Parameters:
symbol: The symbol name.
If None returns current symbol.
If '*' returns all symbols.
scope:
EA: The current ea (default).
ACCOUNT: The current account.
EA_VERSION: The current ea version.
Returns:
The uid list.
GetOrder(self, order_uid: OrderUID)
Returns the order object.
Parameters:
order_uid (): The order uid.
Returns:
The order object.
GetParam(self, name, default=None)
Returns the EA parameter value.
Parameters:
name (): The EA parameter name.
default (int): The EA parameter default value.
Returns:
The EA parameter value.
EA_SETTINGS
Read-only EA parameter accessor backed by GetParam/script_settings.params.
Usage:
EA_SETTINGS.grid_pips
EA_SETTINGS.get("grid_pips", 0, "int")
EA_SETTINGS.get("enabled", False, "bool")
Notes:
Attribute access returns None when the parameter is missing.
get(name, default, value_type) supports raw, bool, int and float.
EA_SETTINGS does not provide a write/update API.
EA parameter optimization metadata
Pixiu stores EA parameters in script_settings.params. Each parameter may define
optimization metadata inside config so external optimizers such as EAOptim can
discover which parameters are safe to optimize and what default ranges to use.
Recommended fields:
config.optimizable (bool):
Whether the parameter is allowed to be optimized.
Recommended default: false.
config.optimization (dict):
Optional optimization defaults. Recommended fields:
type, start, stop, step.
type usually matches config.type.
Example:
AddParam(
"grid_atr_ratio",
value=0.5,
type="float",
min=0.1,
max=2.0,
required=True,
optimizable=True,
optimization={"type": "float", "start": 0.1, "stop": 1.5, "step": 0.1},
desc={"en": "Grid ATR ratio"}
)
AddParam(
"group_target_profit",
param={
"value": "1.0%",
"config": {
"type": "percent",
"required": False,
"optimizable": True,
"optimization": {
"type": "percent",
"start": "0.5%",
"stop": "5.0%",
"step": "0.5%"
}
}
}
)
Notes:
Only expose parameters with config.optimizable=true in optimization UIs.
optimization.start/stop/step should use the same representation as the
parameter type: numbers for int/float, percentage strings for percent.
Runtime access through GetParam and EA_SETTINGS is unchanged; these
metadata fields are for tooling and validation.
GetSettings(self, name, default=None)
Returns the EA Settings value.
Parameters:
name (): The EA settings name.
default (int): The EA settings default value.
Returns:
The EA settings value.
GetSymbol(self, symbol=None)
Returns the symbol properties.
Parameters:
symbol (str): The symbol name.
Returns:
The symbol properties
GetSymbolData(self, symbol: str, timeframe: str, size: int)
Get a symbol data.
Parameters:
symbol (str): Symbol name.
timeframe (str): Timeframe. See the TimeFrame defining.
size (int): Maximum size.
Returns:
Symbol data
High(self, shift=0, symbol=None) -> float
Returns High price value for the default symbol with default timeframe and shift.
Parameters:
shift (int): Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
symbol (str): The symbol name.
If None returns current symbol.
Returns:
High price.
Low(self, shift=0, symbol=None) -> float
Returns Low price value for the default symbol with default timeframe and shift.
Parameters:
shift (int): Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
symbol (str): The symbol name.
If None returns current symbol.
Returns:
Low price.
Open(self, shift=0, symbol=None) -> float
Returns Open price value for the default symbol with default timeframe and shift.
Parameters:
shift (int): Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
symbol (str): The symbol name.
If None returns current symbol.
Returns:
Open price.
OrderStats(self, order_uids)
Returns the order statistics.
Parameters:
order_uids : the list of order uids.
Returns:
The order statistics.
StopTester(self, code: int = 0, message: str = None)
Stop the EA tester. (For tester only.)
Parameters:
code (int): Error code.
message (str): Error message.
Returns:
None
Symbol(self) -> str
Returns the current symbol name.
Returns:
The symbol name.
SymbolInfo(self, item, symbol=None, default=None)
Returns the symbol information.
Parameters:
item (str): The symbol item name.
symbol (str): The symbol name.
default (): The default value.
Returns:
The symbol information.
Time(self, shift=0, symbol=None) -> datetime.datetime
Returns time value for the default symbol with default timeframe and shift.
Parameters:
shift (int): Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
symbol (str): The symbol name.
If None returns current symbol.
Returns:
Time.
Volume(self, shift=0, symbol=None) -> float
Returns volume value for the default symbol with default timeframe and shift.
Parameters:
shift (int): Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
symbol (str): The symbol name.
If None returns current symbol.
Returns:
Volume price.
__init__(self)
Initialize self. See help(type(self)) for accurate signature.
iAD(self, symbol_data, shift=0)
Chaikin A/D Line (Volume Indicators)
Parameters:
symbol_data (object): The symbol data.
shift: Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
Returns:
Chaikin A/D Line
iADX(self, symbol_data, timeperiod, shift=0)
Average Directional Movement Index (Momentum Indicators)
Parameters:
symbol_data (object): The symbol data.
timeperiod (int): The time period.
shift: Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
Returns:
Average Directional Movement Index
iATR(self, symbol_data, timeperiod, shift=0)
Average True Range (Volatility Indicators)
Parameters:
symbol_data (object): The symbol data.
timeperiod (int): The time period.
shift: Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
Returns:
Average True Range
iBands(self, symbol_data, timeperiod, nbdevup, nbdevdn, matype, shift=0)
Bollinger Bands (Overlap Studies)
Parameters:
symbol_data (object): The symbol data.
timeperiod (int): The time period.
nbdevup (int): 2
nbdevdn (int): 2
ma_type: 0 (Simple Moving Average) ,For details see the TA-LIB
shift: Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
Returns:
Bollinger Bands
iCCI(self, symbol_data, timeperiod, shift=0)
Commodity Channel Index (Momentum Indicators)
Parameters:
symbol_data (object): The symbol data.
timeperiod (int): The time period.
shift: Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
Returns:
Commodity Channel Index
iChaikin(self, symbol_data, fastperiod, slowperiod, shift=0)
Chaikin A/D Oscillator (Volume Indicators)
Parameters:
symbol_data (object): The symbol data.
fastperiod (int): The fast period.
slowperiod (int): The low period.
shift: Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
Returns:
Chaikin A/D Oscillator
iDEMA(self, symbol_data, timeperiod, shift=0)
Double Exponential Moving Average (Overlap Studies)
Parameters:
symbol_data (object): The symbol data.
timeperiod (int): The time period.
shift: Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
Returns:
Double Exponential Moving Average
iMA(self, price_data, period, ma_type, shift=0)
Calculates the Moving Average indicator and returns its value.
Parameters:
price_data (object): The price data. (Close, Open, Low, etc...)
period (int): Averaging period for calculation.
ma_type: 0 (Simple Moving Average) ,For details see the TA-LIB
shift: Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
Returns:
Moving average value.
iMACD(self, symbol_data, fastperiod, slowperiod, signalperiod, shift=0)
Moving Average Convergence/Divergence (Momentum Indicators)
Parameters:
symbol_data (object): The symbol data.
fastperiod (int): The fast period.
slowperiod (int): The slow period.
signalperiod (int): The signal period.
shift: Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
Returns:
Moving Average Convergence/Divergence
iMFI(self, symbol_data, timeperiod, shift=0)
Money Flow Index (Momentum Indicators)
Parameters:
symbol_data (object): The symbol data.
timeperiod (int): The time period.
shift: Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
Returns:
Money Flow Index
iMomentum(self, symbol_data, timeperiod, shift=0)
Momentum (Momentum Indicators)
Parameters:
symbol_data (object): The symbol data.
timeperiod (int): The time period.
shift: Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
Returns:
Momentum
iOBV(self, symbol_data, shift=0)
On Balance Volume (Volume Indicators)
Parameters:
symbol_data (object): The symbol data.
shift: Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
Returns:
On Balance Volume
iRSI(self, symbol_data, timeperiod, shift=0)
Relative Strength Index (Momentum Indicators)
Parameters:
symbol_data (object): The symbol data.
timeperiod (int): The time period.
shift: Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
Returns:
Relative Strength Index
iSAR(self, symbol_data, acceleration, maximum, shift=0)
Parabolic SAR (Overlap Studies)
Parameters:
symbol_data (object): The symbol data.
acceleration (int): 0.02
maximum (int): 0.2
shift: Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
Returns:
Parabolic SAR
iStdDev(self, symbol_data, timeperiod, nbdev, shift=0)
Standard Deviation (Statistic Functions)
Parameters:
symbol_data (object): The symbol data.
timeperiod (int): The time period.
nbdev (int): 1
shift: Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
Returns:
Standard Deviation
iStochastic(self, symbol_data, fastk_period, slowk_period, slowk_matype, slowd_period, slowd_matype, shift=0)
Stochastic (Momentum Indicators)
Parameters:
symbol_data (object): The symbol data.
fastk_period (int): 5
slowk_period (int): 3
slowk_matype (int): 0
slowd_period (int): 3
slowd_matype (int): 0
shift: Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
Returns:
Stochastic
iTEMA(self, price_data, timeperiod, shift=0)
Triple Exponential Moving Average (Overlap Studies)
Parameters:
price_data (object): The price data.
timeperiod (int): The time period.
shift: Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
Returns:
Triple Exponential Moving Average
iWPR(self, symbol_data, timeperiod, shift=0)
Williams' %R (Momentum Indicators)
Parameters:
symbol_data (object): The symbol data.
timeperiod (int): The time period.
shift: Index of the value taken from the buffer
(shift relative to the current the given amount of periods ago).
Returns:
Williams' %R
WaitCommand(self, uid, timeout=120)
Waiting for a asynchronous command execution。
Parameters:
uid : The command UID.
timeout : Timeout (seconds)
Returns:
ErrorID: If 0 success.
CommandResult: If failed returns None.
AcquireLock(self, name, timeout=60) -> bool:
Acquire a lock
Parameters:
name : The lock name
timeout : Lock timeout (seconds)
Returns:
If True success.
ReleaseLock(self, name):
Release a lock
Parameters:
name : The lock name
Plot(self, series):
Plot
Parameters:
series
DeleteData(self, name, scope: int = DataScope.EA) -> ErrorID:
Delete data
Parameters:
name : The data name
scope : The data scope (current EA settings `EA_SETTINGS`, current account + current EA `ACCOUNT_EA`, EA version, EA, Account)
Returns:
The errorid.
LoadData(self, name, scope: int = DataScope.EA, format='json'):
Load data
Parameters:
name : The data name
scope : The data scope (current EA settings `EA_SETTINGS`, current account + current EA `ACCOUNT_EA`, EA version, EA, Account)
format: Only support JSON.
Returns:
data.
SaveData(self, name, data, scope: int = DataScope.EA, format='json') -> ErrorID:
Save data
Parameters:
name : The data name
scope : The data scope (current EA settings `EA_SETTINGS`, current account + current EA `ACCOUNT_EA`, EA version, EA, Account)
format: Only support JSON.
Returns:
The errorid.
Notify(self, message) -> ErrorID:
Send a notification
Parameters:
message: The content of notification
Returns:
The errorid.
[2026-08-04]
Version:
Package:
pixiu: 0.180.*.20260804
Descriptions:
1.docs/ea-explain-protocol.zh.md:
1) Add Pixiu EA Explain protocol design for the open-source standalone project
2) Define the two EA-facing Explain APIs: PX_UpdateEAExplainStatus and PX_AppendEAExplainEvent
3) Define status, event, and materialized order_state data models
4) Define object/list input validation, context normalization, payload limits, and chart protocol mapping
5) Keep the protocol independent from external runtimes and specific EA implementations
2.api.py / tester_api_v1.py:
1) Add PX_UpdateEAExplainStatus API declaration and tester forwarding
2) Add PX_AppendEAExplainEvent API declaration and tester forwarding
3) Allow PX_AppendEAExplainEvent to accept one event object or a list of event objects
3.ea_tester.py / ea_tester_context.py:
1) Add tester-side EA Explain status, event, order_state, and warning buffers
2) Normalize Explain payloads with schema, type, run mode, run id, symbol, script metadata, and UTC tick time
3) Validate Explain input object shapes and skip invalid batch items without interrupting the tester
4) Enforce per-event and batch limits for low-overhead Explain collection
5) Materialize order_state from event order_state payloads
6) Add build_ea_explain_export and save_ea_explain_files for explain_status.json, explain_events.jsonl, and explain_orders.json
4.chart_protocol.py:
1) Map normalized Explain events into Pixiu chart protocol events
2) Preserve original Explain payloads for future viewer tooltips and timeline display
5.test_pixiu.py:
1) Add regression coverage for Explain event mapping in LegacyChartAdapter
2) Add regression coverage for tester Explain API injection, status/event normalization, batch events, invalid event handling, order_state materialization, chart replay, and JSON/JSONL export
6.setup.py:
1) Bump package version to 0.180.0
7.Validation:
1) Full test_pixiu.py suite passes: 38 passed
8.docs/ops-api:
1) Replace project-specific wording with runtime-neutral terminology for public release
2) Remove concrete external project identifiers from the Ops API resource model
[2026-06-20]
Version:
Package:
pixiu: 0.179.*.20260620
Descriptions:
1.pxtester.py:
1) Fix chart replay frame timestamps to use the raw feed epoch from current_time()
2) Avoid converting Time() naive UTC datetimes with timestamp(), which shifts graph frames in local time zones such as Asia/Shanghai
3) Keep generated chart_replay in test_graph_data for downstream browser/report validation
4) Send final report data to the live chart server when tester graph mode is enabled
5) Add throttled live report updates during tester execution to avoid per-tick report serialization overhead
6) Attach throttled live report snapshots to update_data messages so the browser report panel can refresh during fast backtests
7) Serialize live graph messages as strict JSON and convert NaN/Infinity report values to null
8) Attach sanitized test configuration and final EA script settings metadata to the first live chart update
2.chart protocol / chart viewer:
1) Verify the time-fixed chart protocol report fixture with anonymized sample replay data
2) Confirm order markers and graph frames now use the same UTC time base
3) Confirm #36 CLOSE at 2026-05-11 18:25:00 UTC matches the same-minute frame range
4) Confirm #37 OPEN at 2026-05-11 20:20:00 UTC is within spread tolerance against the same-minute frame
5) Record remaining small price mismatches as bid/ask or stop-loss execution display semantics, not graph timestamp drift
6) Add live chart mode using the same browser chart protocol and EventSource updates
7) Support snapshot replacement and append-only live deltas for frames, account points, orders, logs, and reports
8) Sanitize embedded chart replay JSON so invalid floating-point values do not break browser parsing
9) Make report number formatting more consistent with tabular numerals, stable decimals, and percentage formatting
10) Display report time metrics as UTC time strings and trade/tick count metrics as integers
11) Make chart time formatting safe for epoch seconds, epoch milliseconds, and date strings
12) Display browser report metric keys as readable titles such as Sortino Ratio instead of sortino_ratio
13) Keep preformatted report datetime strings unchanged in the browser to avoid local timezone shifts
14) Use report desc/type/precision metadata so browser report values follow terminal formatting
15) Remove the browser report metric grid height cap so report rows can expand without inner scrolling
16) Improve browser order row spacing and wrap long order text within the highlighted row area
17) Render negative browser report values in red while preserving terminal-compatible value formatting
18) Use a professional DIN/Helvetica-style numeric font stack with tabular numerals for browser chart numbers
19) Add a Settings panel that shows sanitized test configuration and final EA script settings
20) Redact sensitive chart metadata fields and collapse local file paths to file names before embedding HTML
21) Populate the Settings panel from live chart metadata as soon as the first live update arrives
22) Add an Orders panel native details/summary collapse control that matches the Test Config folding style
23) Lazy-render formatted Settings JSON so large test_config/script_settings payloads do not block the first chart render
24) Add English chart protocol documentation mirroring docs/chart-protocol.zh.md
3.test_pixiu.py:
1) Add regression coverage that PXTester graph ticks preserve the raw epoch timestamp
2) Verify full test suite passes after the timestamp fix
3) Add live chart HTML regression coverage
4) Add live chart state conversion coverage from PXTester update_data messages
5) Add regression coverage for throttled PXTester live report pushes
6) Add regression coverage for NaN/Infinity report values in live and browser chart JSON
7) Add regression coverage for Sharpe/Sortino calculation from the account equity curve
4.ea_tester_graph.py:
1) Replace the legacy Dash/Plotly graph server with a lightweight standard-library HTTP server
2) Serve the new browser live chart at http://127.0.0.1:8050 when tester graph mode is enabled
3) Add /snapshot JSON endpoint for the current chart protocol state
4) Add /events Server-Sent Events endpoint for live protocol deltas
5) Support update_report messages and merge report summary into the live chart protocol snapshot
6) Merge report summaries carried by update_data messages into the live chart protocol snapshot
7) Write /snapshot and /events payloads as strict JSON to keep EventSource updates browser-safe
8) Preserve lightweight report item metadata for terminal-compatible browser formatting
9) Merge and sanitize metadata carried by update_data messages for live Settings display
5.main.py:
1) Change -g/--graph from a boolean flag to a live chart URL such as http://127.0.0.1:8051
2) Bind the live chart server to the host and port parsed from the graph URL
3) Automatically open the live chart URL when graph mode is enabled
4) Keep -g true as a compatibility alias for http://127.0.0.1:8050
5) Preserve chart replay metadata when replaying saved graph_data into the live chart server
6.setup.py:
1) Remove dash and plotly runtime dependencies
2) Bump package version to 0.179.0
7.Validation:
1) Same-minute order/frame match with spread tolerance: 214 / 218
2) Old minus-8-hour matching behavior after the fix: 1 / 218
3) Runtime JavaScript syntax check for the generated chart HTML passes
4) Live chart HTTP server smoke test passes
5) Live chart report smoke test passes
6) Live chart realtime report smoke test passes
8.ea_tester.py:
1) Calculate Sharpe and Sortino ratios from the full account equity curve when available
2) Use log returns for the account equity curve
3) Calculate Sortino with downside deviation from negative excess returns
4) Clear return_logs during init_data to avoid reusing stale return samples
5) Anchor Sharpe/Sortino return samples at init_balance so the first account log cannot become the implicit baseline
6) Anchor Sharpe/Sortino return samples at final realized balance and clear stale floating profit after close_all_orders
[2026-05-27]
Version:
Package:
pixiu: 0.178.*.20260527
Descriptions:
1.ea_tester.py:
1) Add dynamic cross-currency conversion helpers for tester profit and margin calculation
2) Add direct_then_usd conversion path resolution
3) Prefer direct conversion symbols first, then fall back to USD bridge symbols
4) Add latest_before_or_at_tick conversion tick lookup
5) Add CalcProfit/CalcMargin/TickValue/PipValue tester implementations
2.pxtester.py:
1) Add per-symbol tick data cache for conversion symbols
2) Allow channel-backed tick data loading for inferred conversion symbols before backtest execution
3.api.py / tester_api_v1.py:
1) Add EA-facing CalcProfit and CalcMargin APIs with MT5-style aliases
2) Add EA-facing TickValue and PipValue APIs
4.test_pixiu.py:
1) Add regression tests for direct cross-currency profit conversion
2) Add regression tests for direct pair priority
3) Add regression tests for USD bridge conversion when direct pair is unavailable
4) Add script-level regression coverage for CalcProfit, CalcMargin, TickValue, and PipValue
5.README.md / README.zh.md:
1) Document cross-currency dynamic conversion configuration in the API/config guide
2) Document CalcProfit, CalcMargin, TickValue, and PipValue
6.CROSS_CURRENCY.md / CROSS_CURRENCY.zh.md:
1) Add cross-currency conversion development design and implementation notes
[2026-05-14]
Version:
Package:
pixiu: 0.177.*.20260514
Descriptions:
1.ea_base.py:
1) Add AddParam helper support for desc, optimizable, and optimization metadata
2.api.py:
1) Document AddParam optimization metadata fields in the API declaration
3.README.md / README.zh.md:
1) Add EA parameter optimization metadata documentation and examples
2) Recommend config.optimizable=false by default and define config.optimization usage
4.ts_settings.py / test_pixiu.py:
1) Add optimization metadata script-setting examples
2) Add regression coverage for optimizable and optimization metadata parsing
[2026-05-13]
Version:
Package:
pixiu: 0.176.*.20260513
Descriptions:
1.ea_tester.py:
1) Keep tester order history robust when open, modify, close, partial close, or seeded orders do not include tags
2) Default missing order tags to an empty dict to avoid KeyError in diagnostic EA order tests
[2026-05-07]
Version:
Package:
pixiu: 0.175.*.20260507
Descriptions:
1.api.py:
1) Add read-only EASettings accessor class for script parameters
2.api_base.py:
1) Inject global EA_SETTINGS into EA safe globals
2) EA_SETTINGS reads values from the existing GetParam/script_settings.params path
3.test_pixiu.py:
1) Add test_ea_tester_ea_settings_accessor
2) Verify EA_SETTINGS.xxx and EA_SETTINGS.get(name, default, value_type)
4.README.md / README.zh.md:
1) Document EA_SETTINGS usage
[2026-05-06]
Version:
Package:
pixiu: 0.174.*.20260506
Descriptions:
1.api.py:
1) Add UpdateOrderTags API declaration
2) Add SetOrderTags API declaration
2.tester_api_v1.py:
1) Add tester API forwarding for UpdateOrderTags and SetOrderTags
3.ea_tester.py:
1) Add in-memory order tags update support
2) Support merge, replace, remove_keys and expected_tag_ver checks
3) Keep order trading fields unchanged when only tags are updated
4.ts_order_market.py:
1) Add API tests for UpdateOrderTags and SetOrderTags
[2026-04-28]
Version:
Package:
pixiu: 0.173.*.20260428
Descriptions:
1.api.py:
1) Add DataScope.ACCOUNT_EA for current account + current EA scope
2) Replace EA_SETTIGNS usage with EA_SETTINGS
2.ea_tester.py:
1) Add ACCOUNT_EA persistent data scope support
3.ea_tester_context.py:
1) Support injected persistent_data for shared tester state
4.test_pixiu.py:
1) Add test_ea_tester_account_ea_scope
5.__init__.py:
1) Add __version__ via importlib.metadata
6.ea_tester.py:
1) Replace pkg_resources version lookup with pixiu.__version__
7.ea_optimizer.py:
1) Replace pkg_resources version lookup with pixiu.__version__
[2026-04-24]
Version:
Package:
pixiu: 0.172.*.20260424
Descriptions:
1.scenario.py:
1) Add ScenarioEngine
2) Add initial_state support
3) Add events support
4) Add mutate_tick support
5) Add override_spread support
6) Add place_order support
7) Add close_order support
8) Add cancel_order support
2.ea_tester.py:
1) Add scenario_engine
2) Add seed_order
3) execute_: Add scenario initial_state support
4) execute_: Add pre_tick, post_order_processing, post_tick hooks
3.__init__.py:
1) Export scenario
4.test_pixiu.py:
1) Add test_ea_tester_scenario_initial_state
2) Add test_ea_tester_scenario_mutate_tick
3) Add test_ea_tester_scenario_place_order
4) Add test_ea_tester_scenario_cancel_order
5.ts_scenario.py:
1) Add scenario tests
[2025-06-04]
Version:
Package:
pixiu: 0.171.*.20250604
Descriptions:
1.api_base.py:
1) Add talib, scipy support
[2025-04-09]
Version:
Package:
pixiu: 0.170.*.20250409
Descriptions:
1.ea_optimizer.py:
1) parse_config: Add argument params
2) valid_config: Add argument params
3) generate_optimization_code_file: Add argument params
2.pxtester.py:
1) Replace utcfromtimestamp with utc_from_timestamp
3.account.py:
1) Replace utcfromtimestamp with utc_from_timestamp
4.order.py:
1) Replace utcfromtimestamp with utc_from_timestamp
5.symbol.py:
1) Replace utcfromtimestamp with utc_from_timestamp
6.ea_tester.py:
1) Replace utcfromtimestamp with utc_from_timestamp
7.test_pixiu.py:
1) Replace utcfromtimestamp with utc_from_timestamp
[2025-04-08]
Version:
Package:
pixiu: 0.169.*.20250408
Descriptions:
1.ea_optimizer.py:
1) Add MAX_VARIABLES
2) valid_config: Add percent type
3) parse_config: Add percent type
4) calculate_optimization_max_task_count: Add percent type
2.test_pixiu.py:
1) Add test_ea_optimizer_config
[2025-03-31]
Version:
Package:
pixiu: 0.168.*.20250331
Descriptions:
1. symbol.py:
1) Replace np.NaN with np.nan
[2025-03-07]
Version:
Package:
pixiu: 0.167.*.20250307
Descriptions:
1.ea_optimizer.py:
1) Add random_choose_variable
[2025-03-05]
Version:
Package:
pixiu: 0.166.*.20250305
Descriptions:
1.ea_optimizer.py:
1) Add calculate_optimization_max_task_count
[2025-03-04]
Version:
Package:
pixiu: 0.165.*.20250204
Descriptions:
1.Add python 3.9 support
[2025-02-03]
Version:
Package:
pixiu: 0.164.*.20250203
Descriptions:
1.ea_tester.py:
1) Replace json with pyjson5
[2025-02-02]
Version:
Package:
pixiu: 0.163.*.20250202
Descriptions:
1.ea_tester.py:
1) __update_report__: Remove calculate_return_ratio
2) Add update_return_ratio
[2025-02-01]
Version:
Package:
pixiu: 0.162.*.20250201
Descriptions:
1.ea_optimizer.py:
1) parse_config: Add var_precision, var_type
[2025-01-23]
Version:
Package:
pixiu: 0.161.*.20250123
Descriptions:
1.pxtester.py:
1) Fix errors:
self.update_log_time = time.time()
self.last_update_print_log_index = 0
self.print_logs
[2024-12-10]
Version:
Package:
pixiu: 0.160.*.20241210
Descriptions:
1.ea_base.py:
1) Modifiied init_script_env: temp context
[2024-12-06]
Version:
Package:
pixiu: 0.159.*.20241206
Descriptions:
1.ea_base.py:
1) Add context
2.ea_tester.py:
1) Rename:
tick_test_start_index -> tick_start_index
current_tick_index -> tick_current_index
tick_max_count -> tick_max_index
3.ea_tester_context.py:
1) Init
[2024-12-02]
Version:
Package:
pixiu: 0.158.*.20241202
Descriptions:
1.ea_tester.py:
1) get_init_data: add orders
[2024-11-25]
Version:
Package:
pixiu: 0.157.*.20241125
Descriptions:
1.errors.py
1) Add EID_EAT_LOAD_LIBS
2.ea_base.py:
1) Add copy_globals
[2024-11-21]
Version:
Package:
pixiu: 0.156.*.20241112
Descriptions:
1.ea_tester.py
1) Fix init_report_data error
[2024-11-12]
Version:
Package:
pixiu: 0.155.*.20241112
Descriptions:
1.ea_base.py
1) Modified init_script_env: add temp_ti
[2024-11-09]
Version:
Package:
pixiu: 0.154.*.20241109
Descriptions:
1.ea_tester.py
1) Add get_init_data
[2024-10-21]
Version:
Package:
pixiu: 0.153.*.20241021
Descriptions:
1.Replace json5 with pyjson5
[2024-10-20]
Version:
Package:
pixiu: 0.152.*.20241020
Descriptions:
1.ea_builder.py:
1) Add parse_order_config_tp_sl
[2024-10-11]
Version:
Package:
pixiu: 0.151.*.20241011
Descriptions:
1.ea_builder.py:
1) Fix SymbolBuilder.build_code timeframe bug
[2024-09-26]
Version:
Package:
pixiu: 0.150.*.20240926
Descriptions:
1.ea_tester.py:
1) Add start_time, end_time in report
2.ea_builder.py:
1) Fix SymbolBuilder.build_code timeframe bug
[2024-09-25]
Version:
Package:
pixiu: 0.149.*.20240925
Descriptions:
1.ea_optimizer.py:
1) Add generate_optimization_parsed_code: fix header comments missing error
2)Add class ReplaceValue
[2024-09-24]
Version:
Package:
pixiu: 0.148.*.20240924
Descriptions:
1.ea_tester.py:
1) Change set_errid(errid) to set_error(errid, errmsg)
2) Change get_errid -> errid to get_error -> errid, errmsg
[2024-08-29]
Version:
Package:
pixiu: 0.147.*.20240829
Descriptions:
1.ea_optimizer.py:
1) Fix max_tasks type bug
[2024-06-30]
Version:
Package:
pixiu: 0.146.*.20240630
Descriptions:
1.module_indicators.json 1) Add define
[2024-06-29]
Version:
Package:
pixiu: 0.145.*.20240629
Descriptions:
1.ea_builder.py: 1) parse_options_config: Change format
[2024-06-27]
Version:
Package:
pixiu: 0.144.*.20240627
Descriptions:
1.ea_builder.py: 1) parse_options_config: remove default_options
[2024-06-25]
Version:
Package:
pixiu: 0.143.*.20240625
Descriptions:
1.ea_builder.py: 1) Modified load_builder_config: json format
[2024-06-24]
Version:
Package:
pixiu: 0.142.*.20240624
Descriptions:
1.ea_builder.py: 1) Add valid_order_config
[2024-05-14]
Version:
Package:
pixiu: 0.141.*.20240514
Descriptions:
1.Modified ea_tester.py:
1) Add reset_flags
2) Add get_errid, set_errid
2.ea_optimizer.py:
1) Add generator, max_tasks
[2024-05-08]
Version:
Package:
pixiu: 0.140.*.20240508
Descriptions:
1.Modified api.py:
1) iTEMA: symbol_data -> price_data
2.Modified ea_optimizer.py:
1) Add calculate_optimization_task_count, generate_variable_md5
[2024-05-02]
Version:
Package:
pixiu: 0.139.*.20240502
Descriptions:
1.Modified ea_optimizer.py:
1) Add parse_config_file
2) Add generate_optimization_code
[2024-04-26]
Version:
Package:
pixiu: 0.138.*.20240426
Descriptions:
1.Modified ea_builder.py:
1) Add entry_func_name, exit_func_name support
[2024-04-25]
Version:
Package:
pixiu: 0.137.*.20240425
Descriptions:
1.Add tpeac_parser.py
2.Modified ea_builder.py:
1) get_value: '.' instead of '/'
2) generate_condition_elements_code
3) Add add_functions_config, find_functions_config
3.Remove strategy_base.json, runner_base.json, ea_strategy_base.j2, ea_runner_base.j2
[2024-04-23]
Version:
Package:
pixiu: 0.136.*.20240423
Descriptions:
1.Modified ea_builder.py:
[2024-04-22]
Version:
Package:
pixiu: 0.135.*.20240422
Descriptions:
1.Modified ea_builder.py:
1) Add build_code
[2024-03-11]
Version:
Package:
pixiu: 0.134.*.20240311
Descriptions:
1.Modify ea_optimizer.py:
1) Add show_stats
[2024-03-10]
Version:
Package:
pixiu: 0.133.*.20240310
Descriptions:
1.Modify ea_optimizer.py:
1) Add task stats
[2024-03-09]
Version:
Package:
pixiu: 0.132.*.20240309
Descriptions:
1.Modify ea_optimizer.py:
1) Add testing report
2.Modify ea_tester.py:
1) __add_market_order__: min_volume
[2024-03-08]
Version:
Package:
pixiu: 0.131.*.20240308
Descriptions:
1.Modify ea_optimizer.py:
1) optimize
[2024-03-07]
Version:
Package:
pixiu: 0.130.*.20240307
Descriptions:
1.Modify pxtester.py:
1) Add config_path_to_abs_path
2.Modify ea_optimizer.py:
1) Modify parse_config, optimize
[2024-03-06]
Version:
Package:
pixiu: 0.129.*.20240306
Descriptions:
1.Modify main.py:
1) Add action optimize
[2024-03-05]
Version:
Package:
pixiu: 0.128.*.20240305
Descriptions:
1.Modify build_strategy.json:
1) Add variables: adx, adx_period, near_peroid, far_peroid for optimization
[2024-03-03]
Version:
Package:
pixiu: 0.127.*.20240303
Descriptions:
1.Modify ea_builder.py:
1) Clean codes
2.Create ea_optimizer.py
[2024-02-29]
Version:
Package:
pixiu: 0.126.*.2024029
Descriptions:
1.Modify ea_strategy_base.j2:
1) Remove GROUP_MAX_ORDERS
2.Modify ea_strategy_runner.j2
1) Add DEBUG_PRINT
3.Modify ea_builder.py:
1) Add parse_runner_variables_config, parse_options_config
[2024-02-28]
Version:
Package:
pixiu: 0.125.*.2024028
Descriptions:
1.Modify ea_strategy_base.j2:
1) valid_order_config, valid_order_config_tp_sl, calculate_tp_sl_pips, calculate_order_data
[2024-02-27]
Version:
Package:
pixiu: 0.124.*.2024027
Descriptions:
1.Modify ea_builder.py:
2.ea_strategy_runner.j2:
1) Add money_to_points, money_to_lots
[2024-02-26]
Version:
Package:
pixiu: 0.123.*.2024026
Descriptions:
1.Modify ea_builder.py:
1) Add get_order_config in class EntryBuilder
2) Add system_variables in build_data
[2024-02-24]
Version:
Package:
pixiu: 0.122.*.2024024
Descriptions:
1.Modify ea_builder.py:
1) Add @var, @sym,
2) Entry.build_code add order_config
[2024-02-20]
Version:
Package:
pixiu: 0.121.*.20240220
Descriptions:
1.Modify module_indicators.py:
Add some indicators
[2024-02-08]
Version:
Package:
pixiu: 0.120.*.20240208
Descriptions:
1.Modify ea_builder.py:
[2024-02-07]
Version:
Package:
pixiu: 0.119.*.20240207
Descriptions:
1.Modify ea_builder.py:
[2024-02-06]
Version:
Package:
pixiu: 0.118.*.20240206
Descriptions:
1.Modify ea_builder.py:
1) Rename ParmeterBuilder to VariableBuilder
2)Add black format ea code
[2024-02-05]
Version:
Package:
pixiu: 0.117.*.20240205
Descriptions:
1.Modify ea_builder.py:
1) Add ParameterBuilder
2.Add strategy_default.json
[2024-02-02]
Version:
Package:
pixiu: 0.116.*.20240202
Descriptions:
1.Modify ea_builder.py:
[2024-02-01]
Version:
Package:
pixiu: 0.115.*.20240201
Descriptions:
1.Modify ea_builder.py:
[2024-01-31]
Version:
Package:
pixiu: 0.114.*.20240131
Descriptions:
1.Modify ea_builder.py:
2.Add jinja2
[2024-01-30]
Version:
Package:
pixiu: 0.113.*.20240130
Descriptions:
1.Modify ea_builder.py:
1) EntryBuilder, FunctionBuilder
[2024-01-29]
Version:
Package:
pixiu: 0.112.*.20240129
Descriptions:
1.Modify ea_builder.py
[2024-01-26]
Version:
Package:
pixiu: 0.111.*.20240126
Descriptions:
1.Create ea_builder.py
[2024-01-25]
Version:
Package:
pixiu: 0.110.*.20240125
Descriptions:
1.Add builder
[2023-12-07]
Version:
Package:
pixiu: 0.109.*.20231207
Descriptions:
1.ea_taster.py:
1) __close_order__
Fix profit calculation error when closing partitioned volumes
[2023-11-16]
Version:
Package:
pixiu: 0.108.*.20231116
Descriptions:
1.main.py:
1) gen_report_row:
Add compare_item['value'] checking
[2023-11-15]
Version:
Package:
pixiu: 0.107.*.20231115
Descriptions:
1.ea_tester.py:
1) __close_order__:
Fix new order open_price error
2.ts_order_market.py:
1) Add from_uid, to_uid test
[2023-11-14]
Version:
Package:
pixiu: 0.106.*.20231114
Descriptions:
1.ea_tester.py:
1) Fix order_to_ndarray KeyError: 'magic_number'
2) __close_order__:
Change order comment from 'close by #xxx' to 'from #xxx'
Remove the tags of closed order
3) __add_market_order__:
Add comment checking
2.ts_order_market.py:
1) Add close partial order test
[2023-06-23]
Version:
Package:
pixiu: 0.105.*.20230623
Descriptions:
1.ea_tester.py:
1) Add tick_test_start_index in params
2) Add test_period in pixiu config file
[2023-03-13]
Version:
Package:
pixiu: 0.104.*.20230313
Descriptions:
1.pxtester.py:
1) Add get_tick_data_from_yfinance, covert_yfinance_data_to_json
[2023-02-26]
Version:
Package:
pixiu: 0.103.*.20230226
Descriptions:
1.main.py:
1) start_mp, start_sp: results add exception
[2023-02-28]
Version:
Package:
pixiu: 0.102.*.20230228
Descriptions:
1.ea_tester.py:
1) Remove parse_script, get_script_init_settings
2) execute_: Add ValidScriptSettings Error
3) __init__: self.log_file = open(self.log_path, mode='wt')
[2023-02-22]
Version:
Package:
pixiu: 0.101.*.20230222
Descriptions:
1.ea_tester.py:
1) Add script_settings output
[2023-02-12]
Version:
Package:
pixiu: 0.100.*.20230212
Descriptions:
1.ea_tester.py:
1) Fix get_api missing error.
[2023-01-11]
Version:
Package:
pixiu: 0.99.*.20230111
Descriptions:
1.ea_tester.py:
1) Fix self.current_tick_index exception in execute_(self, ticket)
[2022-12-28]
Version:
Package:
pixiu: 0.98.*.20221228
Descriptions:
1.Add global API:
PX_InitScriptSettings, PX_ValidScriptSettings
Call order:
PX_InitScriptSettings -> AddChart/AddParam -> PX_ValidScriptSettings
2.Add ts_settings.py
[2022-12-19]
Version:
Package:
pixiu: 0.97.*.20221219
Descriptions:
1.Add global API:
PX_InitScriptSettings, PX_ValidScriptSettings
Call order:
PX_InitScriptSettings -> AddChart/AddParam -> PX_ValidScriptSettings
[2022-12-07]
Version:
Package:
pixiu: 0.96.*.20221207
Descriptions:
1.api.py:
Add AddChart, AddParam
[2022-12-06]
Version:
Package:
pixiu: 0.95.*.20221206
Descriptions:
1.api.py:
Add AddChart, AddParam
[2022-12-05]
Version:
Package:
pixiu: 0.94.*.20221205
Descriptions:
1.pxtester.py: 1) Replace json with json5
[2022-12-02]
Version:
Package:
pixiu: 0.93.*.20221202
Descriptions:
1.pxtester.py: 1) Fix get_data_info tzinfo error
[2022-11-04]
Version:
Package:
pixiu: 0.92.*.20221104
Descriptions:
1.api_base.py:
1) Add _safe_import
[2022-10-25]
Version:
Package:
pixiu: 0.91.*.20221025
Descriptions:
1.ea_tester.py:
1)Add execute_script
[2022-08-26]
Version:
Package:
pixiu: 0.90.*.20220826
Descriptions:
1.test_pixiu.py:
1) test_ea_tester_func_base: datetime.utcfromtimestamp(new_a['t'][idx])
2) test_ea_tester_func_indicators: datetime.utcfromtimestamp(new_a['t'][idx])
2.ts_symbol_data.py:
1) Change
assertEqual(df['time'][valid_shift], get_timeframe_value_by_time(timeframe, c_time, "time").timestamp(),
f'@ {c_time}, {timeframe}')
to
assertEqual(df['time'][valid_shift], get_timeframe_value_by_time(timeframe, c_time, "time").replace(tzinfo=timezone('UTC')).timestamp(),
f'@ {c_time}, {timeframe}')
3.setup.py:
1) Add requires: dash, plotly
[2022-08-02]
Version:
Package:
pixiu: 0.89.*.20220802
Descriptions:
1.ea_tester.py:
1) Fix calculate_return_ratio return value error
[2022-07-28]
Version:
Package:
pixiu: 0.88.*.20220728
Descriptions:
1.pxtester.py:
1) Change datetime.fromtimestamp to datetime.utcfromtimestamp
2.account.py:
1) Change datetime.fromtimestamp to datetime.utcfromtimestamp
3.order.py:
1) Change datetime.fromtimestamp to datetime.utcfromtimestamp
4.symbol.py:
1) Change datetime.fromtimestamp to datetime.utcfromtimestamp
5.ea_tester.py:
1) Change datetime.fromtimestamp to datetime.utcfromtimestamp
6.test_pixiu.py:
1) Change datetime.fromtimestamp to datetime.utcfromtimestamp
[2022-07-18]
Version:
Package:
pixiu: 0.87.*.20220718
Descriptions:
1. Fix gen_report_row total_value bug
[2022-06-20]
Version:
Package:
pixiu: 0.86.*.20220620
Descriptions:
1.Add ea_tester_graph
support dash + plotly
[2022-05-18]
Version:
Package:
pixiu: 0.85.*.20220518
Descriptions:
1.ea_tester.py:
1) Fix calculate_returns calculation error
[2022-04-26]
Version:
Package:
pixiu: 0.84.*.20220426
Descriptions:
1.tester_api_v1.py:
1) Fix __get_indicator__ cache_name error
[2022-04-24]
Version:
Package:
pixiu: 0.83.*.20220424
Descriptions:
1.symbol.py:
1) SymbolIndicator, SymbolPrice, SymbolTime, SymbolData add getitem_index
2) SymbolPrice add:
< __lt__(self, other)
> __gt__(self, other)
<= __le__(self, other)
>= __ge__(self, other)
== __eq__(self, other)
!= __ne__(self, other)
+ __add__(self, other)
– __sub__(self, other)
* __mul__(self, other)
/ __truediv__(self, other)
// __floordiv__(self, other)
% __mod__(self, other)
** __pow__(self, other)
[2022-04-23]
Version:
Package:
pixiu: 0.82.*.20220423
Descriptions:
1.symbol.py:
1) Add to_dataframe
2.api_base.py:
1) env_dict add _iter_unpack_sequence_ # [abs(value - level) < ave for _, level in levels]
3.ea_node_transformer.py:
1) Add EARestrictingNodeTransformer
[2022-04-22]
Version:
Package:
pixiu: 0.81.*.20220422
Descriptions:
1.ea_tester.py:
1) Change min_volume initial value to None
2.pxtester.py:
1) Fix on_end_execute item['value'] None error
3.main.py:
1) Fix gen_report_row item['value'] None error
[2022-04-21]
Version:
Package:
pixiu: 0.80.*.20220421
Descriptions:
1.ea_tester.py:
1) report add max_volume
[2022-04-20]
Version:
Package:
pixiu: 0.79.*.20220420
Descriptions:
1.ea_tester.py:
1) Fix __valid_order__ pending order error
[2022-04-18]
Version:
Package:
pixiu: 0.78.*.20220418
Descriptions:
1.api_base.py:
1) env_dictAdd property
[2022-04-07]
Version:
Package:
pixiu: 0.77.*.20220407
Descriptions:
1.ea_tester.py:
1) Fix calculate_return_ratio error
2) Add sortino_ratio
[2022-04-06]
Version:
Package:
pixiu: 0.76.*.20220406
Descriptions:
1.ea_tester.py:
1) Add percent_str_to_float
2) Add calculate_sharpe_ratio
[2022-04-03]
Version:
Package:
pixiu: 0.75.*.20220403
Descriptions:
1.ea_tester.py:
1) Add margin_so_so, margin_so_call checking
[2022-04-02]
Version:
Package:
pixiu: 0.74.*.20220402
Descriptions:
1.ea_tester.py:
Fix modify_order order_log error
[2022-03-30]
Version:
Package:
pixiu: 0.73.*.20220330
Descriptions:
1.ea_tester.py:
__remove_pending_order__ pop add None
2.Add set:
env_dict["set"]
[2022-03-10]
Version:
Package:
pixiu: 0.72.*.20220310
Descriptions:
1.ts_order_buylimit.py,ts_order_buystop.py,ts_order_selllimit.py,ts_order_sellstop.py:
Add check order.status
2.api.py:
Add GetSettings
[2022-03-09]
Version:
Package:
pixiu: 0.71.*.20220309
Descriptions:
1.defines.py:
Add OrderStatus
2.order.py:
Add status
[2022-03-05]
Version:
Package:
pixiu: 0.70.*.20220305
Descriptions:
1.ea_tester.py:
1) __process_order__: Add parameters: ask, last_ask, bid, last_bid
2) __calculate_profit__: Update calculation m
3) __valid_order__: Add parameters: ask, bid
[2022-03-04]
Version:
Package:
pixiu: 0.69.*.20220304
Descriptions:
1.Add PositionType
2.Fix __valid_order__ pending order error
3.Fix __close_order__ close_time error
[2022-03-02]
Version:
Package:
pixiu: 0.68.*.20220301
Descriptions:
1.ea_tester.py: Add volume_precision
[2022-03-01]
Version:
Package:
pixiu: 0.67.*.20220301
Descriptions:
1.fix __remove_order__ pop bug
[2022-02-26]
Version:
Package:
pixiu: 0.66.*.20220226
Descriptions:
1.Add is_dirty method to order
2.API: add RunMode, CloseMultiOrders
3.Defines: add RunModeValue
[2022-02-24]
Version:
Package:
pixiu: 0.65.*.20220224
Descriptions:
1.Change error name: EID_EAT_MARGIN_CALL -> EID_EAT_NOT_ENOUGH_MONEY
[2022-02-22]
Version:
Package:
pixiu: 0.64.*.20220222
Descriptions:
1.Add tags in order data
[2022-02-11]
Version:
Package:
pixiu: 0.63.*.20220211
Descriptions:
1.Add new testing 'test_ea_tester_func_load_lib'
[2022-02-10]
Version:
Package:
pixiu: 0.62.*.20220210
Descriptions:
1.Add library function
###[lib|library]=["PriceAction==0.1.0"]
2.ea_base.py:
1)Add method parse_script
[2022-02-09]
Version:
Package:
pixiu: 0.61.*.20220209
Descriptions:
1.Remove OrderScope, using DataScope
[2021-12-14]
Version:
Package:
pixiu: 0.60.*.20211114
Descriptions:
1.EA script support timezone
2.ts_base: Add test_timezone
[2021-12-11]
Version:
Package:
pixiu: 0.59.*.20211111
Descriptions:
1.Support auto loading script from tag
pixiu -c pixiu.json -n testAUDUSD_TP_Demo1 -s ../Test/Test_V2.11.18-3x.py -p report -t 2.11.18-3x -l ea2_7_211209.json
or
pixiu -c pixiu.json -n testAUDUSD_TP_Demo1 -s ../Test -p report -t 2.11.18-3x -l ea2_7_211209.json
[2021-11-26]
Version:K
Package:
pixiu: 0.58.*.20211126
Descriptions:
1.Update README.md/README.zh.md
2.ea_tester.py:
Modify notify output format
[2021-11-25]
Version:
Package:
pixiu: 0.57.*.20211125
Descriptions:
1.Update README.md/README.zh.md
2.ea_tester.py:
Modify notify output format
[2021-11-24]
Version:
Package:
pixiu: 0.56.*.20211124
Descriptions:
1.api.py, tester_api_v1.py:
Add Notify
[2021-11-16]
Version:
Package:
pixiu: 0.55.*.20211116
Descriptions:
1.Fix setup.py requires.
[2021-11-15]
Version:
Package:
pixiu: 0.54.0.20211115
Descriptions:
1.api.py, tester_api_v1.py:
Add DeleteData, LoadData, SaveData
Buy/Sell/ModifyOrder/CloseOrder add argument tags
2.tests:
ts_base.py add data test
ts_order_market.py add tags
3.api_base.py:
Add uuid, hashlib
[2021-11-14]
Version:
Package:
pixiu: 0.53.0.20211114
Descriptions:
1.api.py, tester_api_v1.py:
Ask, Bid, Time, Volume, Open, Close, Low, High add symbol
2.order.py:
Add from_uid, to_uid, group_uid, tags
[2021-11-13]
Version:
Package:
pixiu: 0.52.0.20211113
Descriptions:
1.Add arguments :
--compare-wit-tag/-r, --tag/-t, --datafile/-l
sample:
1)
pixiu -c pixiu.json -n testAUDUSD_TP_Demo1 testGBPUSD_TP_Demo1 testNZDUSD_TP_Demo1 testEURUSD_TP_Demo1 testUSDCHF_TP_Demo1 testUSDJPY_TP_Demo1 testUSDCAD_TP_Demo1 -s ../EA/EA_V2.10.0.py -p report -t 2.10.0 -l ea2_7.json
pixiu -c pixiu.json -n testAUDUSD_TP_Demo1 testGBPUSD_TP_Demo1 testNZDUSD_TP_Demo1 testEURUSD_TP_Demo1 testUSDCHF_TP_Demo1 testUSDJPY_TP_Demo1 testUSDCAD_TP_Demo1 -s ../EA/EA_V2.10.1.py -p report -t 2.10.1 -l ea2_7.json
pixiu -c pixiu.json -n testAUDUSD_TP_Demo1 testGBPUSD_TP_Demo1 testNZDUSD_TP_Demo1 testEURUSD_TP_Demo1 testUSDCHF_TP_Demo1 testUSDJPY_TP_Demo1 testUSDCAD_TP_Demo1 -s ../EA/EA_V2.10.2.py -p report -t 2.10.2 -l ea2_7.json
pixiu -c pixiu.json -n testAUDUSD_TP_Demo1 testGBPUSD_TP_Demo1 testNZDUSD_TP_Demo1 testEURUSD_TP_Demo1 testUSDCHF_TP_Demo1 testUSDJPY_TP_Demo1 testUSDCAD_TP_Demo1 -t 2.10.0 -r 2.10.1 2.10.2 -l ea2_7.json
+----+--------------------------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+--------------------+
| | | testAUDUSD_TP_Demo1 | testGBPUSD_TP_Demo1 | testNZDUSD_TP_Demo1 | testEURUSD_TP_Demo1 | testUSDCHF_TP_Demo1 | testUSDJPY_TP_Demo1 | testUSDCAD_TP_Demo1 | Total/Avg |
+----+--------------------------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+--------------------+
| 1 | Init Balance(2.10.0) | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 35000.0 / 5000.0 |
| 1 | Init Balance(2.10.1) | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 35000.0 / 5000.0 |
| 1 | Init Balance(2.10.2) | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 5000.0 | 35000.0 / 5000.0 |
...
| 7 | Balance(2.10.0) | 4988.31 | 5064.61 | 5041.77 | 5071.6 | 4994.96 | 4996.97 | 4996.94 | 35155.16 / 5022.17 |
| 7 | Balance(2.10.1) | 5003.42 ↑ | 5061.26 ↓ | 5000.58 ↓ | 4965.65 ↓ | 5009.12 ↑ | 5033.44 ↑ | 4931.17 ↓ | 35004.64 / 5000.66 |
| 7 | Balance(2.10.2) | 4981.59 ↓ | 5076.74 ↑ | 5000.58 ↓ | 4985.02 ↓ | 5023.02 ↑ | 5029.35 ↑ | 4965.34 ↓ | 35061.64 / 5008.81 |
| 8 | Total Net Profit(2.10.0) | -11.69 | 64.61 | 41.77 | 71.6 | -5.05 | -3.02 | -3.05 | 155.17 / 22.17 |
| 8 | Total Net Profit(2.10.1) | 3.42 ↑ | 61.26 ↓ | 0.58 ↓ | -34.35 ↓ | 9.14 ↑ | 33.44 ↑ | -68.84 ↓ | 4.65 / 0.66 |
| 8 | Total Net Profit(2.10.2) | -18.41 ↓ | 76.74 ↑ | 0.58 ↓ | -14.98 ↓ | 23.04 ↑ | 29.35 ↑ | -34.68 ↓ | 61.64 / 8.81 |
| 9 | Total Net Profit Rate(2.10.0) | -0.23 % | 1.29 % | 0.84 % | 1.43 % | -0.1 % | -0.06 % | -0.06 % | 3.11 % / 0.44 % |
| 9 | Total Net Profit Rate(2.10.1) | 0.07 % ↑ | 1.23 % ↓ | 0.01 % ↓ | -0.69 % ↓ | 0.18 % ↑ | 0.67 % ↑ | -1.38 % ↓ | 0.09 % / 0.01 % |
| 9 | Total Net Profit Rate(2.10.2) | -0.37 % ↓ | 1.53 % ↑ | 0.01 % ↓ | -0.3 % ↓ | 0.46 % ↑ | 0.59 % ↑ | -0.69 % ↓ | 1.23 % / 0.18 % |
...
pixiu -c pixiu.json -n testUSDCAD_TP_Demo1 -t 2.10.0 -r 2.10.1 2.10.2 -l ea2_7.json
+----+--------------------------------------+---------------------+-------------------+
| | | testUSDCAD_TP_Demo1 | Total/Avg |
+----+--------------------------------------+---------------------+-------------------+
| 1 | Init Balance(2.10.0) | 5000.0 | 5000.0 / 5000.0 |
| 1 | Init Balance(2.10.1) | 5000.0 | 5000.0 / 5000.0 |
| 1 | Init Balance(2.10.2) | 5000.0 | 5000.0 / 5000.0 |
...
| 7 | Balance(2.10.0) | 4996.94 | 4996.94 / 4996.94 |
| 7 | Balance(2.10.1) | 4931.17 ↓ | 4931.17 / 4931.17 |
| 7 | Balance(2.10.2) | 4965.34 ↓ | 4965.34 / 4965.34 |
| 8 | Total Net Profit(2.10.0) | -3.05 | -3.05 / -3.05 |
| 8 | Total Net Profit(2.10.1) | -68.84 ↓ | -68.84 / -68.84 |
| 8 | Total Net Profit(2.10.2) | -34.68 ↓ | -34.68 / -34.68 |
| 9 | Total Net Profit Rate(2.10.0) | -0.06 % | -0.06 % / -0.06 % |
| 9 | Total Net Profit Rate(2.10.1) | -1.38 % ↓ | -1.38 % / -1.38 % |
| 9 | Total Net Profit Rate(2.10.2) | -0.69 % ↓ | -0.69 % / -0.69 % |
...
[2021-11-11]
Version:
Package:
pixiu: 0.51.0.20211111
Descriptions:
1.api_base:
Add build-in function: max, min, all, any, ascii, bin, chr, divmod, enumerate, filter, format, hex, next, oct, ord, pow, reversed, sorted, sum
2.main.py:
Add argument: multiprocessing
[2021-10-26]
Version:
Package:
pixiu: 0.50.0.20211026
Descriptions:
1.ea_tester.py:
1) Fix report currency bug
[2021-10-24]
Version:
Package:
pixiu: 0.49.0.20211024
Descriptions:
1.Using process pool
[2021-10-23]
Version:
Package:
pixiu: 0.48.0.20211023
Descriptions:
1.Add support multiple test names:
pixiu -c pixiu.json -n testAUDUSD_TP_Demo1 testGBPUSD_TP_Demo1 testNZDUSD_TP_Demo1 testEURUSD_TP_Demo1 testUSDCHF_TP_Demo1 testUSDJPY_TP_Demo1 testUSDCAD_TP_Demo1 ...
[2021-10-19]
Version:
Package:
pixiu: 0.47.0.20211019
Descriptions:
1.ea_tester.py:
1) Fix report total_net_profit_rate error.
2.pxtester.py:
1) parse_test_config: Add custom account
[2021-10-18]
Version:
Package:
pixiu: 0.46.0.20211018
Descriptions:
1.ea_tester.py:
1) Fix modify_order bug, if take_profit or stop_loss is None
[2021-10-16]
Version:
Package:
pixiu: 0.45.0.20211016
Descriptions:
1.pxtester.py:
1) Report add win rate
[2021-10-15]
Version:
Package:
pixiu: 0.44.0.20211015
Descriptions:
1.pxtester.py:
1) Add argument: print_log_type = account|order|ea|report
[2021-10-14]
Version:
Package:
pixiu: 0.43.0.20211014
Descriptions:
1.ea_tester.py:
1) Fix bugs: __process_order__, close_all_orders call close_order error
2) Fix bugs: max_drawdown calculation
2.pxtester.py:
1) on_end_execute: report output format
[2021-08-25]
Version:
Package:
pixiu: 0.42.0.20210825
Descriptions:
1.ea_tester.py:
1) __add_market_order__:
new_order['comment'] = f"cuid#{new_order['uid']}|"
to
new_order['comment'] = f"uid#{new_order['uid']}|"
[2021-08-06]
Version:
Package:
pixiu: 0.41.0.20210806
Descriptions:
1.API 1
1) Add Plot
[2021-08-04]
Version:
Package:
pixiu: 0.40.0.20210804
Descriptions:
1.ea_tester.py:
1).Change plot parameters to plot(chart_name, {series_name1: data, series_name2: data, ...})
[2021-07-20]
Version:
Package:
pixiu: 0.39.0.20210720
Descriptions:
1.ea_tester.py:
1).Add plot
[2021-07-16]
Version:
Package:
pixiu: 0.38.0.20210716
Descriptions:
1.Update API:
1) GetOpenedOrderUIDs, GetPendingOrderUIDs, GetClosedOrderUIDs
Add parameter: scope
[2021-07-08]
Version:
Package:
pixiu: 0.37.0.20210708
Descriptions:
1.fix write_log bugs: parameters count
[2021-06-07]
Version:
Package:
pixiu: 0.36.2.20210607
Descriptions:
1.fix dependencies bugs
remove oeoeweb library
add pymongo library
2.fix sample.py, sample2.py errors.
3.API add AcquireLock, ReleaseLock
[2021-06-04]
Version:
Package:
pixiu: 0.35.0.20210604
Descriptions:
1.Modify API:
1)
def CloseOrder(self, uid, price, volume: float, slippage=None, arrow_color=None) -> (ErrorID, OrderResult)
->
def CloseOrder(self, uid, volume=None, price=None, slippage=None, arrow_color=None) -> (ErrorID, OrderResult)
2.fix:
__valid_order__: EID_EAT_INVALID_ORDER_CLOSE_PRICE
3.Add:
__order_close_price__
[2021-06-03]
Version:
Package:
pixiu: 0.34.0.20210603
Descriptions:
1.fix bugs GetSymbolData('*')
2.
self.orders['ds'] -> order['__ds__']
self.account_info['ds'] -> self.account_info['__ds__']
3.Add build-in :
datetime, timedelta, random
[2021-06-01]
Version:
Package:
pixiu: 0.33.0.20210601
Descriptions:
1.add APIs:
WaitCommand
2.modify APIs:
Buy, Sell, CloseOrder, ModifyOrder return order_uid -> OrderResult
[2021-05-31]
Version:
Package:
pixiu: 0.32.0.20210531
Descriptions:
1.fix EATesterPrintCollector._call_print write_log bug
[2021-05-30]
Version:
Package:
pixiu: 0.31.0.20210530
Descriptions:
1. get_url_data add headers
[2021-05-29]
Version:
Package:
pixiu: 0.30.0.20210529
Descriptions:
1.Add output
[2021-05-28]
Version:
Package:
pixiu: 0.29.0.20210528
Descriptions:
1.Struct project directories
2.Complete README.txt
[2021-05-27]
Version:
Package:
pixiu: 0.28.0.20210527
Descriptions:
1.Add load channel
[2021-05-26]
Version:
Package:
pixiu: 0.27.0.20210526
Descriptions:
1.Add PXTester, main
[2021-05-24]
Version:
Package:
pixiu: 0.26.0.20210524
Descriptions:
1. api add help doc string
[2021-05-22]
Version:
Package:
pixiu: 0.25.0.20210522
Descriptions:
1.add language
2.fix sl/tp error:
ds[((ds['sl'] > 0) & (ds['sl_p'] <= 0)) | ((ds['tp'] > 0) & (ds['tp_p'] >= 0))]
3.api:
Dict - > UIDs
def GetOpenedOrderUIDs(self, symbol: str = None)
def GetPendingOrderUIDs(self, symbol: str = None)
def GetClosedOrderUIDs(self, symbol: str = None)
[2021-05-19]
Version:
Package:
pixiu: 0.24.0.20210519
Descriptions:
1.add test_pixiu set_test_result
[2021-05-18]
Version:
Package:
pixiu: 0.23.0.20210518
Descriptions:
[2021-05-17]
Version:
Package:
pixiu: 0.22.0.20210517
Descriptions:
1.SymbolIndicator, SymbolPrice, SymbolTime, SymbolData arguments.
[2021-05-15]
Version:
Package:
pixiu: 0.21.0.20210515
Descriptions:
[2021-05-13]
Version:
Package:
pixiu: 0.20.0.20210513
Descriptions:
[2021-05-11]
Version:
Package:
pixiu: 0.19.0.20210511
Descriptions:
1.fix ea_tester some bugs
[2021-05-10]
Version:
Package:
pixiu: 0.18.0.20210510
Descriptions:
[2021-05-09]
Version:
Package:
pixiu: 0.17.0.20210509
Descriptions:
1. Buy, Sell, ModifyOrder remove arguments comment
[2021-05-08]
Version:
Package:
pixiu: 0.16.0.20210508
Descriptions:
1.
[2021-05-07]
Version:
Package:
pixiu: 0.15.0.20210507
Descriptions:
1. def GetSymbolData(self, symbol: str, timeframe: str, count: int)
[2021-05-06]
Version:
Package:
pixiu: 0.14.0.20210506
Descriptions:
1. some fixs
[2021-05-01]
Version:
Package:
pixiu: 0.13.0.20210501
Descriptions:
1.Add test open, modify, close in the EAT testing.
[2021-04-30]
Version:
Package:
pixiu: 0.12.0.20210430
Descriptions:
1.Finish EAT's 7 tests.
[2021-04-29]
Version:
Package:
pixiu: 0.11.0.20210429
Descriptions:
1.Add Account, Symbol Classes
2.Add ts_order, ts_base
[2021-04-28]
Version:
Package:
pixiu: 0.10.0.20210428
Descriptions:
1.Add some methods
[2021-04-27]
Version:
Package:
pixiu: 0.9.0.20210427
Descriptions:
[2021-04-26]
Version:
Package:
pixiu: 0.8.0.20210426
Descriptions:
1. Add test_ea_tester_func_indicators
Metadata
Release files for pixiu 0.180.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pixiu-0.180.0.tar.gz | 207.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pixiu-0.180.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 345.3 kB
Release files / pixiu-0.180.0.tar.gz
| Download URL | pixiu-0.180.0.tar.gz |
|---|---|
| Size | 207.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e0a9f9731b874187451d016e1e9eb2fb0dfcb0e6c08113d5b503879b338cc1e6
|
|
BLAKE2b-256 checksum How to use checksums |
b2150ec25dd63c82d33603b0e8d0d6cefde71e76ccb7b04f2b4b082ed1512433
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.0
|
Release files / pixiu-0.180.0-py3-none-any.whl
| Download URL | pixiu-0.180.0-py3-none-any.whl |
|---|---|
| Size | 138.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
346255114a8158448839d32aecf42ab2f932f174b11545daab358b29916e9dec
|
|
BLAKE2b-256 checksum How to use checksums |
9eb8ecb005757521ab144af6b801cdefa977940c1ce56a374b5b5b42e3cd5f07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.0
|