当前位置:分析家公式网 → 股票公式 → 开拓者公式 → 一键转帖:开拓者盈多亏交易策略源码
软件名称:[B]开拓者盈多亏交易策略源码[/B]
软件类型:国产软件
运行环境:Win2000/WinXP/Win2003/WinVista
软件语言:简体中文
授权方式:共享软件
软件大小:0 Bytes
官方主页:Home Page
更新时间:2013-03-02 03:25:26
软件简介:
// 简称: JY
// 名称:盈多亏少
// 类别: 公式应用
// 类型: 用户应用
//------------------------------------------------------------------------
Params
Bool bInitStatus(false);
Numeric InitMP(0);
Numeric MidLinel(5600);
Numeric MidLineLength(250);
Numeric FirstGrid(3);
Numeric TotalGrids(10);
Numeric GridInterval(3);
Numeric WinGrid(3);
Numeric EveryLots(1);
Numeric MidLineWeieht(1);
Numeric ExitOnCloseMins(14.50);
Vars
Numeric MidLineWeight;
NumericSeries midline;
Numeric MinPoint;
Numeric AvgOfClose;
Numeric AskLine;
Numeric BidLine;
NumericSeries RealMidLine;
Numeric MyRealMp(0);
Numeric TmpGridIndex;
Numeric TmpPrice;
Numeric TmpPriee;
Numeric OpenDPrice;
Begin
OpenDPrice= opend;
if(day<>day[1])
{
midline=OpenDPrice;
}Else
{
midline=midline[1];
}
MinPoint=MinMove*PriceScale;
MyRealMp=GetGlobalvar (0);
AvgOfClose =AverageFC(Close, MidLineLength);
If (BarStatus== O)
{
If(MyRealMp == InvalidNumeric || bInitStatus)
{
MyRealMp=InitMP;
SetGlobalVar(0,MyRealMp);
}Else
If(BarStatus==2&&A_AccountID!="")
{
If(Q_AskPrice <= 0||Q_BidPrice <=0 )
Return;
}
}
If(Q_BidPrice==Q_UpperLimit||Q_AskPrice==Q_LowerLimit)
{
Return;
}
If ((Time==0.0900||Time==0.1030||Time==0.1330)&&(High ==Low))
{
Return;
}
If (CurrentTime<ExitOnCloseMins/100)
{
RealMidLine=MidLine*MidLineWeight+AvgOfClose*(1-MidLineWeight);
AskLine=Q_AskPrice;
BidLine=Q_BidPrice;
Commentary ("中线="+Text (RealMidLine));
Commentary ("叫卖价="+Text (Askline));
Commentary ("叫买价"+Text (BidLine) );
If (MyRealmP<=0 &&BidLine>RealMidLine+FirstGrid*MinPoint)
{
TmpPrice=RealMidLine+FirstGrid*MinPoint+Abs (MyRealMp)* (GridInterval*MinPoint);
TmpPriee=Ceiling (TmpPrice, Minpoint);
Commentary ("开仓价="+text (TmpPrice));
TmpGridIndex=1- IntPart ((BidLine-RealMidLine -FirstGrid*MinPoint)/(GridInterval*MinPoint));
If(TmpGridIndex<MyRealMp&&TmpGridIndex>=-1*TotalGrids)
{
MyRealMp=MyRealMp-1; A_SendOrder (Enum_Buy, Enum_Entry, EveryLots, BidLine);
}//来源: www.cxh99.com
}Else
If(MyRealMp>=0 && AskLine<RealMidLine- FirstGrid*MinPoint)
{
TmpPrice=RealMidLine -FirstGrid*MinPoint -Abs(MyRealMp)*(GridInterval*MinPoint);
TmpPrice= Floor (TmpPrice, MinPoint);
Commentary ("开仓价="+Text (TmpPrice));
TmpGridIndex=1+Intpart ((RealMidLine- FirstGrid*MinPoint- AskLine)/(GridInterval*MinPoint));
If(TmpGridIndex>MyRealMp && TmpGridIndex<=TotalGrids)
[url=http://www.70822.com/soft/sort013/sort083/down-59401.html]开拓者盈多亏交易策略源码[/url]