commit
c18b8f6236
1
vn.archive/vn.cs/test/cslog/20170411.log
Normal file
1
vn.archive/vn.cs/test/cslog/20170411.log
Normal file
@ -0,0 +1 @@
|
||||
[114.251.228.136:20008 h0302ce38/t2818]22:52:07.954 -10099.03ms [-11] !Connect HSAR Server [-11] 同步连接超时或发生错误。......
|
@ -13,3 +13,5 @@
|
||||
20150401 13:48:50.439 1: [h04557720/t3530] the Connection has been disconnected.
|
||||
20150401 13:49:13.822 1: [h045f7720/t317c] the Connection has been disconnected.
|
||||
20150401 14:34:59.175 1: [h045a7720/t2f80] the Connection has been disconnected.
|
||||
2017-04-11 22:51:57.843: --The license infomation is error. This machine ID is:[16ec65f21e6068d6e3d4de7a6ce6979b] and you can find this ID code in 'cserror.log' file!
|
||||
2017-04-11 22:51:57.844: --'CITICs_HsT2Hlp.dll' Moudle is not licensed. The date of license to:[2017-06-11] , The all functions is not limited on the trail period!
|
Binary file not shown.
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<SubscriptionDataContainer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.Authentication.CacheManagement">
|
||||
<Items />
|
||||
<TokenCache>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA25n/ahjWHUaDiThcqA7VUAAAAAACAAAAAAAQZgAAAAEAACAAAACp8rAE6Rs+eDDGKoeibA0/oqMmdaA7onKWWZ9vNCMEegAAAAAOgAAAAAIAACAAAAArczqvArBQ6ZrDcryIUkYKHoCnxCFdBrwI86J8FMUqgxAAAADeYX9RIZdGPQWXXdIuo+DqQAAAAJVN3ajzOqDwXdZ1xR01lsdwXOYV0Tmyho0kIwaDp6GC5AH0RbotPHV7hgmKRkWjOR/bALilvW6H6V42wNTqvb8=</TokenCache>
|
||||
</SubscriptionDataContainer>
|
Binary file not shown.
@ -1,16 +0,0 @@
|
||||
[auth_info]
|
||||
ProfileCode=af2ebd99da3c6636171ea72747a5e32d
|
||||
LimitDate=20300101
|
||||
AllowPushTransation=0
|
||||
AllowWbp=0
|
||||
AuthCode=AQAAAABo23AyYmI1MWQ2ZGFhN2ExMjI1OTQyODgzZjA2OWFhNDBmOQAAAAAAAAAAAAAAAA==
|
||||
[functions]
|
||||
func=
|
||||
;[ProcessInfo_0]
|
||||
;ProcessName=HsT2Hlp_Demo.exe,Hs.exe
|
||||
;NetIP=172.23.123.9
|
||||
;NetMask=255.255.255.0
|
||||
;[ProcessInfo_0]
|
||||
;ProcessName=Option_Demo.exe
|
||||
;NetIP=10.0.0.0
|
||||
;NetMask=255.0.0.0
|
Binary file not shown.
22
vn.archive/vn.cs/vncshshlp/vncshshlp.sln
Normal file
22
vn.archive/vn.cs/vncshshlp/vncshshlp.sln
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.40629.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vncshshlp", "vncshshlp\vncshshlp.vcxproj", "{982DF24C-BCD1-4F25-BDE8-84ADB719588B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{982DF24C-BCD1-4F25-BDE8-84ADB719588B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{982DF24C-BCD1-4F25-BDE8-84ADB719588B}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{982DF24C-BCD1-4F25-BDE8-84ADB719588B}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{982DF24C-BCD1-4F25-BDE8-84ADB719588B}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
117
vn.archive/vn.cs/vncshshlp/vncshshlp/vncshshlp.vcxproj
Normal file
117
vn.archive/vn.cs/vncshshlp/vncshshlp/vncshshlp.vcxproj
Normal file
@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{982DF24C-BCD1-4F25-BDE8-84ADB719588B}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>vncshshlp</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>X:\GithubProject\vnpy\vn.archive\vn.cs\hshlp;D:\Anaconda2\include;D:\boost_1_57_0;$(IncludePath)</IncludePath>
|
||||
<ReferencePath>D:\boost_1_57_0\libs;D:\Anaconda2\libs;X:\GithubProject\vnpy\vn.archive\vn.cs\hshlp;$(ReferencePath)</ReferencePath>
|
||||
<TargetExt>.pyd</TargetExt>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;VNCSHSHLP_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;VNCSHSHLP_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalLibraryDirectories>X:\GithubProject\vnpy\vn.archive\vn.cs\hshlp;D:\Anaconda2\libs;D:\boost_1_57_0\stage\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\hshlp\CITICs_HsT2Hlp.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="targetver.h" />
|
||||
<ClInclude Include="vncshshlp.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="dllmain.cpp">
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
</PrecompiledHeader>
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="vncshshlp.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\hshlp\CITICs_HsT2Hlp.dll" />
|
||||
<None Include="..\..\hshlp\t2sdk.dll" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Library Include="..\..\hshlp\CITICs_HsT2Hlp.lib" />
|
||||
<Library Include="..\..\hshlp\t2sdk.lib" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="targetver.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="vncshshlp.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\hshlp\CITICs_HsT2Hlp.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="vncshshlp.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dllmain.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\hshlp\CITICs_HsT2Hlp.dll">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="..\..\hshlp\t2sdk.dll">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Library Include="..\..\hshlp\CITICs_HsT2Hlp.lib">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Library>
|
||||
<Library Include="..\..\hshlp\t2sdk.lib">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Library>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -10,13 +10,12 @@
|
||||
|
||||
"""
|
||||
|
||||
import talib
|
||||
import numpy as np
|
||||
|
||||
from ctaBase import *
|
||||
from ctaTemplate import CtaTemplate
|
||||
|
||||
import talib
|
||||
import numpy as np
|
||||
|
||||
|
||||
########################################################################
|
||||
class AtrRsiStrategy(CtaTemplate):
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"brokerID": "9999",
|
||||
"tdAddress": "tcp://180.168.146.187:10000",
|
||||
"password": "19890624",
|
||||
"mdAddress": "tcp://180.168.146.187:10010",
|
||||
"userID": "000300"
|
||||
"password": "simnow申请",
|
||||
"mdAddress": "tcp://180.168.212.228:41213",
|
||||
"userID": "simnow申请"
|
||||
}
|
@ -48,6 +48,7 @@ exchangeMap[EXCHANGE_SHFE] = 'SHFE'
|
||||
exchangeMap[EXCHANGE_CZCE] = 'CZCE'
|
||||
exchangeMap[EXCHANGE_DCE] = 'DCE'
|
||||
exchangeMap[EXCHANGE_SSE] = 'SSE'
|
||||
exchangeMap[EXCHANGE_INE] = 'INE'
|
||||
exchangeMap[EXCHANGE_UNKNOWN] = ''
|
||||
exchangeMapReverse = {v:k for k,v in exchangeMap.items()}
|
||||
|
||||
@ -683,7 +684,10 @@ class CtpTdApi(TdApi):
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
def onRspQryInvestorPosition(self, data, error, n, last):
|
||||
"""持仓查询回报"""
|
||||
"""持仓查询回报"""
|
||||
if not data['InstrumentID']:
|
||||
return
|
||||
|
||||
# 获取持仓缓存对象
|
||||
posName = '.'.join([data['InstrumentID'], data['PosiDirection']])
|
||||
if posName in self.posDict:
|
||||
|
@ -60,6 +60,7 @@ EXCHANGE_SHFE = 'SHFE' # 上期所
|
||||
EXCHANGE_CZCE = 'CZCE' # 郑商所
|
||||
EXCHANGE_DCE = 'DCE' # 大商所
|
||||
EXCHANGE_SGE = 'SGE' # 上金所
|
||||
EXCHANGE_INE = 'INE' # 国际能源交易中心
|
||||
EXCHANGE_UNKNOWN = 'UNKNOWN'# 未知交易所
|
||||
EXCHANGE_NONE = '' # 空交易所
|
||||
EXCHANGE_HKEX = 'HKEX' # 港交所
|
||||
|
@ -60,6 +60,7 @@ EXCHANGE_SHFE = 'SHFE' # 上期所
|
||||
EXCHANGE_CZCE = 'CZCE' # 郑商所
|
||||
EXCHANGE_DCE = 'DCE' # 大商所
|
||||
EXCHANGE_SGE = 'SGE' # 上金所
|
||||
EXCHANGE_INE = 'INE' # 国际能源交易中心
|
||||
EXCHANGE_UNKNOWN = 'UNKNOWN'# 未知交易所
|
||||
EXCHANGE_NONE = '' # 空交易所
|
||||
EXCHANGE_HKEX = 'HKEX' # 港交所
|
||||
|
Loading…
Reference in New Issue
Block a user