外部控制落盤及策略

Spark is good but you might still want to keep using your Excel or your own program for your secret algorithm.  Instead of using complex protocol, you can control Spark's orders and strategies by simply editing specific text files.

Order Control

You can create and edit the file ExtOrders-YYMMDD.txt  inside the Spark Order folder (e.g. today is Dec 10, 2015, the file date will be Spark\ORDERS\ExtOrders-151210.txt ).

[Protocol]
Name=External Order  File
Version=1.00
Description=External Order  File

[Orders]
20151210-002=Is Simulation=NO~Action=BUY~Product ID=HSIZ5~Price=21700~Quantity=1

[Modify Orders]
003=ID=20151210-002~Price=21740

[Delete Orders]
20151210-002=

Click here for External Order Control details

 

Strategy Control

[Protocol]
Name=External Strategies File
Version=1.00
Description=External Strategies File

[Strategies]
20151509-009=Type=BARRIER~Product ID=HSIZ5~Is Simulation=NO~Is Bullish=NO~Barrier=21800~Stop Loss Adj=40~Not Filled Cancel Seconds=55~Quantity=-1~Open Toler=-40~Close Toler=4~Start Time 1=09:15:00~End Time 1=11:57:00~Force Close Time 1=11:58:00~Start Time 2=15:58:00~End Time 2=16:10:00~Force Close Time 2=16:12:00~Start Time 3=23:25:00~End Time 3=23:30:00~Force Close Time 3=23:40:00~After Loss Wait Seconds=300~After Profit Wait Seconds=60

[Modify Strategies]
001=ID=20151509-009~Barrier=21830
002=ID=20151509-009~Barrier=21840

[Delete Strategies]
20151509-009=

Click here for External Strategies Control details