Test Multi Chart Display Python Version
Python strategy by 发明者量化-小小梦.
PythonOther
The original spec has no written description. Read the source below.
Source Python
import random
import time
def main():
cfgA = {
"title" : {"text" : "Handicap chart"},
"xAxis" : {
"type" : "datetime"
},
"series" : [{
"name" : "Buy one",
"data" : [],
},{
"name" : "Sell one",
"data" : [],
}]
}
cfgB = {
"title" : {"text" : "Price Difference Chart"},
"xAxis" : {
"type" : "datetime"
},
"series" : [{
"name" : "Spread",
"type" : "column",
"data" : [],
}]
}
cfgC = {
"__isStock" : False,
"title" : {
"text" : "Pie chart"
},
"series" : [{
"type" : "pie",
"name" : "one",
"data" : [
["A", 25],
["B", 25],
["C", 25],
["D", 25],
]
}]
}
chart = Chart([cfgA, cfgB, cfgC])
chart.reset()
chart.add(3, {
"name" : "ZZ",
"y" : random.random() * 100
})
chart.update([cfgA, cfgB, cfgC])
chart.add(0, [_N(time.time() * 1000, 0), 50])
chart.add(1, [_N(time.time() * 1000, 0), 80])
chart.add(2, [_N(time.time() * 1000, 0), 90])
chart.add(3, {
"name" : "ZZ",
"y" : random.random() * 100
}, -1)
Published by 发明者量化-小小梦 on the FMZ strategy square · last modified 2018-03-30. Collected in the Quant Trading Vault. Unvalidated research: re-test with your own data and costs before trusting it.
Build this with AgenKit
A spec is not a trading system. Paste this into your coding agent and AgenKit runs a specialist team — architecture, test-first build, risk gates, review — with paper trading on by default.
/agenkit build a production-grade trading bot with a backtest engine, risk controls and paper trading by default from strategies/Test-Multi-Chart-Display-Python-Version.md- npx agenkit install engineering-kit in your project
- Paste the command into your agent and approve each phase
- Get tests, backtest, risk controls and a paper-trading switch
Understand it first
Before you run this, read the lesson behind the idea and how to backtest it honestly. Specs like this one are the survivors of an unknown number of trials; deflate their results accordingly.
Related specs
- Dynamic Balancing Strategy Python VersionPython · Other
- Exchange Wash Trading and Mutual BrushingPython · Other
- Leek Protection Program Tang Anqi Channel Position Balancing StrategyPython · Other
- Paul The Gambler Lévy Gold EditionPython · Other
- Porting OKCoin Leek Harvester Multi Variety Version Annotated Python VersionPython · Other
- Python Example Using asyncio http to Obtain Market DataPython · Other