设为首页收藏本站

 找回密码
 注册
查看: 12133|回复: 45
打印 上一主题 下一主题

【没有】【源码】沪深300股指_日内震荡 [复制链接]

Rank: 3Rank: 3

精华
0
UID
119070
积分
159
帖子
99
主题
15
阅读权限
40
注册时间
2013-7-4
最后登录
2014-8-5
跳转到指定楼层
1#
发表于 2014-5-4 10:20:23 |只看该作者 |倒序浏览
本帖最后由 小平常心 于 2014-5-28 17:26 编辑

沪深300股指_日内震荡_全自动交易系统
5.1后倾情放送学习性代码。
原版弱爆了,哈哈

重要提示:若要实盘,后果自负!



2388        RN1        多头        IF888        2014/04/21 09:27        2205.4        2014/04/21 11:12        2229.4        1        100.00        7100.00        4125780.00        10.73%        5070.69%
2389        RN1        多头        IF888        2014/04/21 14:07        2211.2        2014/04/21 14:21        2206.0        1        100.00        (1660.00)        4124120.00        (2.50%)        5068.18%
2390        RN1        空头        IF888        2014/04/21 14:21        2206.0        2014/04/21 15:10        2179.0        1        100.00        8000.00        4132120.00        12.09%        5080.27%
2391        RN1        多头        IF888        2014/04/22 13:25        2175.8        2014/04/22 13:32        2170.6        1        100.00        (1660.00)        4130460.00        (2.54%)        5077.73%
2392        RN1        空头        IF888        2014/04/22 13:32        2170.6        2014/04/22 13:53        2175.8        1        100.00        (1660.00)        4128800.00        (2.55%)        5075.18%
2393        RN1        多头        IF888        2014/04/22 13:53        2175.8        2014/04/22 15:10        2192.6        1        100.00        4940.00        4133740.00        7.57%        5082.75%
2394        RN1        空头        IF888        2014/04/23 10:30        2191.8        2014/04/23 15:10        2185.2        1        100.00        1880.00        4135620.00        2.86%        5085.61%
2395        RN1        空头        IF888        2014/04/24 10:30        2193.4        2014/04/24 15:10        2179.8        1        100.00        3980.00        4139600.00        6.05%        5091.66%
2396        RN1        空头        IF888        2014/04/25 09:27        2191.8        2014/04/25 15:10        2169.2        1        100.00        6680.00        4146280.00        10.16%        5101.81%
2397        RN1        多头        IF888        2014/04/28 10:02        2153.6        2014/04/28 10:37        2148.4        1        100.00        (1660.00)        4144620.00        (2.57%)        5099.24%
2398        RN1        空头        IF888        2014/04/28 10:37        2148.4        2014/04/28 15:10        2144.4        1        100.00        1100.00        4145720.00        1.71%        5100.95%
2399        RN1        多头        IF888        2014/04/29 13:39        2141.8        2014/04/29 14:42        2154.8        1        100.00        3800.00        4149520.00        5.91%        5106.87%

附件: 你需要登录才可以下载或查看附件。没有帐号?注册

Rank: 3Rank: 3

精华
0
UID
119070
积分
159
帖子
99
主题
15
阅读权限
40
注册时间
2013-7-4
最后登录
2014-8-5
2#
发表于 2014-5-4 10:21:42 |只看该作者
本帖最后由 小平常心 于 2014-5-4 11:04 编辑

说明
应用商品:IF888
使用周期:7分钟K线,
测试区间:2010.4-2014.04.30
手续费:1手手续费100
滑点设置:程序设置为+-1个最小价位

不相信贴图的话,设置以上参数后进行测试即可。
不多说,一切均在源码中!



附件: 你需要登录才可以下载或查看附件。没有帐号?注册

使用道具 举报

Rank: 3Rank: 3

精华
0
UID
119070
积分
159
帖子
99
主题
15
阅读权限
40
注册时间
2013-7-4
最后登录
2014-8-5
3#
发表于 2014-5-4 10:27:26 |只看该作者
本帖最后由 小平常心 于 2014-5-14 10:22 编辑

预留,将在这里贴源码:
            
学习要快, 阅后即焚。   

使用道具 举报

Rank: 3Rank: 3

精华
0
UID
119070
积分
159
帖子
99
主题
15
阅读权限
40
注册时间
2013-7-4
最后登录
2014-8-5
4#
发表于 2014-5-4 10:30:19 |只看该作者
本帖最后由 小平常心 于 2014-5-4 10:36 编辑

感谢 xiaowumm 公布的 “TB屠龙刀股指7分钟趋势交易策略”
以上升级版是在此基础上修改的。说明一下出处。

http://bbs.tb18.net/thread-38521-1-1.html

Params   
        Numeric Lots(0.00);
        Numeric splitrate(0.00);   
        Numeric TradeBegin(9.20);  
        Numeric LastTrade(14.56);
        Numeric TradeClose(15.10);
        Numeric DalayTicks(0.00);
Vars
        NumericSeries a0;
        NumericSeries a1;
        NumericSeries a2;
        NumericSeries a3;
        NumericSeries a4;
        NumericSeries a5;
        NumericSeries a6;
        NumericSeries a7;
        NumericSeries a8;
        NumericSeries a9;
        NumericSeries a10;
        NumericSeries a11;
        NumericSeries a12;
        NumericSeries a13;
        NumericSeries a14;
        NumericSeries a15;
        NumericSeries a16;
        NumericSeries a17;
        NumericSeries a18;
        NumericSeries a19;
        NumericSeries a20;
        NumericSeries a21;
        NumericSeries a22;
        NumericSeries a23;
        NumericSeries a24;
        NumericSeries a25;
        NumericSeries a26;
        NumericSeries a27;
        String s0("a");
        String s1("b");
        String s2("c");
        String s3("d");
        String s4("e");
        String s5("f");
        String s6("g");
        String s7("h");
        String s8("i");
        String s9("j");
        String s10("k");
        String s11("l");
        String s12("m");
        String s13("n");
        String s14("o");
        String s15("p");
        String s16("q");
        String s17("r");
        String s18("s");
        String s19("t");
        String s20("u");
        String s21("v");
        String s22("w");
        String s23("x");
        String s24("y");
        String s25("z");
        String s26("0");
        String s27("1");
        String s28("2");
        String s29("3");
        String s30("4");
        String s31("5");
        String s32("6");
        String s33("7");
        String s34("8");
        String s35("9");
        String s36("10");
        String s37("11");
        String s38("12");
        String s39("13");
        String s40("14");
        String s41("15");
        String s42("16");
        String s43("17");
        String s44("18");
        String s45("19");
        String s46("20");
        String s47("21");
        String s48("22");
        String s49("23");
        String s50("24");
        String s51("25");
        String s52("26");
        String s53("27");
        String s54("28");
        String s55("29");
        String s56("30");
        String s57("31");
        String s58("_");
        Bool Bo_101;
        Numeric xx_1010;
        Numeric xx_1020;
        Bool Bo_102;
        Bool Bo_103;
        Bool Bo_104;
        Numeric xx_1040;
        Numeric xx_1070;
        Numeric xx_1030;


Begin
        if (((Time == 0.0915) or (Time == 0.0916)))         
        {
         SetGlobalVar(20,0);
        }
        if ((CurrentDate >= 20130811) and (GetGlobalVar(20) <> 1) and (H > 0) and (Time >= 0.1455))         
        {
                 PlotString("DQ","",(H * 1.008),Yellow,15);
                 SetGlobalVar(20,1);
        }
        
        Bo_101=(BarsSinceToday() == 0);
        if (Bo_101)         
        {
                a26=0;
        }

        a9=AverageFC(Close[1],6);
        a10=AverageFC(Close[1],23);
        a11=AverageFC(Close[1],6);
        a12=AverageFC(Close[1],25);
        a3=AverageFC(Close[1],17);
        a4=StandardDev(Close[1],17,2);
        a1=((a4 * 1.88) + a3);
        a2=(a3 - (a4 * 1.88));
        a18=Summation(Max(Max((High - Low),Abs((High - Close[1]))),Abs((Low - Close[1]))),23);
        a19=(High - High[1]);
        a20=(Low[1] - Low);
        a21=Summation(IIF((a19 > 0) and (a19 > a20),a19,0),23);
        a22=Summation(IIF((a20 > 0) and (a20 > a19),a20,0),23);
        a23=((a21 * 100) / a18);
        a24=((a22 * 100) / a18);
        a25=Average(((Abs((a24 - a23)) / (a24 + a23)) * 100),12);
        if ((0 == 1))         
        {
                 PlotNumeric("1",a9);
                 PlotNumeric("2",a10);
                 PlotNumeric("3",a11);
                 PlotNumeric("4",a12);
                 PlotNumeric("5",a1);
                 PlotNumeric("6",a2);
        }
        Bo_102=CrossOver(a9,a10);
        Bo_101=CrossUnder(a9,a10);
        Bo_103=CrossOver(a11,a12);
        Bo_104=CrossUnder(a11,a12);
        xx_1040=GetGlobalVar(0);
        xx_1070=GetGlobalVar(1);
        if ((BarStatus == 2) and (xx_1040 <> Time))         
        {
                  xx_1040=Time;  
                  xx_1070=0;  
        }
        if ((Time == (TradeClose / 100)) and (MarketPosition <> 0))         
        {
                 if ((MarketPosition == -1))         
                 {
                        BuyToCover(Abs(CurrentContracts),((PriceScale * (MinMove * splitrate)) + Open));
                 }
                 if ((MarketPosition == 1))         
                 {
                        Sell(Abs(CurrentContracts),(Open - (PriceScale * (MinMove * splitrate))));
                 }
        }
        else
        {
                if ((Time >= (TradeBegin / 100)))         
                {
                        if ((MarketPosition == 0) and (a4 >= 1.9) and (Time <= (LastTrade / 100)) and (a26 < 6))         
                        {
                                if ((High[1] > a1) and (Open > (a1 - 3.8)) and (Open <= High[1]))         
                                {
                                        SellShort(Lots,(Open - (PriceScale * (MinMove * splitrate))));
                                }
                   else
                   {   
                                if ((Low[1] < a2) and (Open < (a2 + 3)) and (a25[1]   < 42))         
                                {
                                        Buy(Lots,((PriceScale * (MinMove * splitrate)) + Open));
                                }
                   }
        }

使用道具 举报

Rank: 3Rank: 3

精华
0
UID
119070
积分
159
帖子
99
主题
15
阅读权限
40
注册时间
2013-7-4
最后登录
2014-8-5
5#
发表于 2014-5-4 10:30:36 |只看该作者
else
        {   
                if ((MarketPosition == 1) and (BarsSinceLastEntry >= 1))         
                {
                        a13=(Open - EntryPrice);  
                        if (Bo_104 or (Close[1] < (AvgEntryPrice - 13.8)))         
                        {      
                                if ((Close[1] < (AvgEntryPrice - 13.8)))         
                                {
                                        Sell(Abs(CurrentContracts),(Open - (PriceScale * (MinMove * splitrate))));         
                                        if ((0 == 5))         
                                        {
                                                Commentary("平多=" + Text(1));         
                                        }
                                        a26=(a26 + 1);
                                        if ((xx_1070 == 0))         
                                        {
                                                xx_1070=1;  
                                        }
                                        else
                                        {      
                                                if ((xx_1070 < DalayTicks))         
                                                {
                                                        xx_1070=(xx_1070 + 1);  
                                                }
                                                else
                                                {        
                                                        if ((Time <= (LastTrade / 100)) and (a26 < 6) and ((a2[1]   - a2) <= 5))         
                                                        {
                                                                SellShort(Lots,(Open - (PriceScale * (MinMove * splitrate))));         
                                                        }
                                                        if ((0 == 5))         
                                                        {
                                                                Commentary("开空=" + Text(2));         
                                                        }
                                                }
                                        }
                                }
                 else
                 {      
                        if ((a13 >= 0))         
                        {
                                Sell(Abs(CurrentContracts),(Open - (PriceScale * (MinMove * splitrate))));         
                                if ((0 == 5))         
                                {
                                        Commentary("平多=" + Text(2));         
                                }
                                a26=0;
                        }
                        else
                        {      
                                if ((a13 < 0))         
                                {
                                        Sell(Abs(CurrentContracts),(Open - (PriceScale * (MinMove * splitrate))));         
                                        if ((0 == 5))         
                                        {
                                                Commentary("平多=" + Text(3));         
                                        }
                                        a26=(a26 + 1);
                                        if ((xx_1070 == 0))         
                                        {
                                                xx_1070=1;  
                                        }
                                        else
                                        {        
                                                if ((xx_1070 < DalayTicks))         
                                                {
                                                        xx_1070=(xx_1070 + 1);  
                                                }
                                        else
                                        {         
                                                if ((Time <= (LastTrade / 100)) and (a26 < 6) and ((a2[1]   - a2) <= 5))         
                                                {
                                                        SellShort(Lots,(Open - (PriceScale * (MinMove * splitrate))));         
                                                }
                                                if ((0 == 5))         
                                                {
                                                        Commentary("开空=" + Text(3));         
                                                }
                                        }
                                }
                   }
                  }
                 }
                }      

使用道具 举报

Rank: 3Rank: 3

精华
0
UID
119070
积分
159
帖子
99
主题
15
阅读权限
40
注册时间
2013-7-4
最后登录
2014-8-5
6#
发表于 2014-5-4 10:30:50 |只看该作者
else
                {        
                 if (Bo_101 and (Close[1] > AvgEntryPrice))         
                 {
                  Sell(Abs(CurrentContracts),(Open - (PriceScale * (MinMove * splitrate))));         
                  if ((0 == 5))         
                  {
                   Commentary("平多=" + Text(4));         
                  }
                  a26=0;

                 }
                }        
           }
           else
           {    if ((MarketPosition == -1) and (BarsSinceLastEntry > 1))         
                {
           
                  a13=(EntryPrice - Open);  
                  if ((Close[1] > (AvgEntryPrice + 13.8)) or Bo_103)         

        {      
                  if ((Close[1] > (AvgEntryPrice + 13.8)))         
                  {  
                   BuyToCover(Abs(CurrentContracts),((PriceScale * (MinMove * splitrate)) + Open));         
                   if ((0 == 5))         
                   {
                        Commentary("平空=" + Text(1));         
                   }
                   a26=(a26 + 1);
                   if ((xx_1070 == 0))         
                   {
                        xx_1070=1;  
                   }
                   else
                   {        if ((xx_1070 < DalayTicks))         
                        {
                         xx_1070=(xx_1070 + 1);  
                        }
                        else
                        {         if ((Time <= (LastTrade / 100)) and (a26 < 6) and ((a1 - a1[1]  ) <= 5.6))         
                         {
                          Buy(Lots,((PriceScale * (MinMove * splitrate)) + Open));         
                         }
                         if ((0 == 5))         
                         {
                          Commentary("开多=" + Text(2));         
                         }
                        }
                   }
                  }
                  else
                  {       if ((a13 >= 1.4))         
                   {
                        BuyToCover(Abs(CurrentContracts),((PriceScale * (MinMove * splitrate)) + Open));         
                        if ((0 == 5))         
                        {
                         Commentary("平空=" + Text(2));         
                        }
                        a26=0;

                   }
                   else
                   {        if ((a13 < 1.4))         
                        {
                         BuyToCover(Abs(CurrentContracts),((PriceScale * (MinMove * splitrate)) + Open));         
                         if ((0 == 5))         
                         {
                          Commentary("平空=" + Text(3));         
                         }
                         a26=(a26 + 1);

                         if ((xx_1070 == 0))         
                         {
                          xx_1070=1;  
                         }
                         else
                         {          if ((xx_1070 < DalayTicks))         
                          {
                           xx_1070=(xx_1070 + 1);  
                          }
                          else
                          {           if ((Time <= (LastTrade / 100)) and (a26 < 6) and ((a1 - a1[1]  ) <= 5.6))         
                           {
                                Buy(Lots,((PriceScale * (MinMove * splitrate)) + Open));         
                           }
                           if ((0 == 5))         
                           {
                                Commentary("开多=" + Text(3));         
                           }
                          }
                         }
                        }
                   }
                  }
                 }      


                 else
                 {        
                  if (Bo_102 and (Close[1] < AvgEntryPrice))         
                  {
                   BuyToCover(Abs(CurrentContracts),((PriceScale * (MinMove * splitrate)) + Open));         
                   if ((0 == 5))         
                   {
                        Commentary("平空=" + Text(4));         
                   }
                   a26=0;
                  }
                 }        
                }
           }
          }
          if ((MarketPosition == 1) and (BarsSinceEntry == 0))         
          {
                a14=High;  

          }
          if ((MarketPosition == 1) and (BarsSinceEntry >= 1))         
          {
                a14=Max(a14,High);  

          }
          if ((MarketPosition == -1) and (BarsSinceEntry == 0))         
          {
                a15=Low;  

          }
          if ((MarketPosition == -1) and (BarsSinceEntry >= 1))         
          {
                a15=Min(a15,Low);  

          }

使用道具 举报

Rank: 3Rank: 3

精华
0
UID
119070
积分
159
帖子
99
主题
15
阅读权限
40
注册时间
2013-7-4
最后登录
2014-8-5
7#
发表于 2014-5-4 10:31:05 |只看该作者

if ((BarsSinceEntry >= 1) and (MarketPosition == 1))         
          {
                 a13=(a14[1]   - EntryPrice);  

           if ((BarsSinceEntry >= 5) and ((Close[5] - Open[5]) < 0) and ((Close[4] - Open[4]) < 0) and ((Close[3] - Open[3]) < 0) and (a13 >= 12))         
           {
                Sell(Abs(CurrentContracts),(Open - (PriceScale * (MinMove * splitrate))));
                if ((0 == 5))         
                {
                 Commentary("平多=" + Text(21));
                }
                a26=0;
           }
           if((BarsSinceEntry >= 2) and (((High[2] - Max(Close[2],Open[2])) / Abs((Close[2] - Open[2]))) > 27) and (Abs((Close[2] - Open[2])) > 0) and (a13 >= 12))
           {
                Sell(Abs(CurrentContracts),(Open - (PriceScale * (MinMove * splitrate))));
                if ((0 == 5))         
                {
                 Commentary("平多=" + Text(22));
                }
                a26=0;
           }
           if ((BarsSinceEntry > 3) and (a13 < 2) and (Close[1] < EntryPrice))         
           {
                Sell(Abs(CurrentContracts),(Open - (PriceScale * (MinMove * splitrate))));
                if ((0 == 5))         
                {
                 Commentary("平多=" + Text(23));
                 Commentary("myopenprofit23=" + Text(a13));
                }
                a26=(a26 + 1);

                if ((xx_1070 == 0))         
                {
                 xx_1070=1;  
                }
                else
                {     if ((xx_1070 < DalayTicks))         
                 {
                  xx_1070=(xx_1070 + 1);  
                 }
                 else
                 {      if ((Time <= (LastTrade / 100)) and (a26 < 6) and ((a2[1]   - a2) <= 5))         
                  {
                   SellShort(Lots,(Open - (PriceScale * (MinMove * splitrate))));
                  }
                  if ((0 == 5))         
                  {
                   Commentary("开空=" + Text(231));
                  }
                 }
                }
           }
           if ((BarsSinceEntry >= 2) and (((High[1] - Low[4]) * 0.25) > 21.6))         
           {
                Sell(Abs(CurrentContracts),(Open - (PriceScale * (MinMove * splitrate))));
                if ((0 == 5))         
                {
                 Commentary("平多=" + Text(24));
                }

                a26=0;
           }
           if((BarsSinceEntry >= 2) and (a13 > 28) and ((Close[2] - Open[2]) > 3.4) and (Open[1] >= Close[2]) and ((Min(Close[2],Open[2]) - Close[1]) > 2.8))
           {

                Sell(Abs(CurrentContracts),(Open - (PriceScale * (MinMove * splitrate))));
                if ((0 == 5))         
                {
                 Commentary("平多=" + Text(25));
                }
         
                a26=0;
           }
           if ((BarsSinceEntry > 4) and (a13 >= 29) and (Low <= (EntryPrice + 19)))         
           {
                  Sell(Abs(CurrentContracts),((EntryPrice + 19) - (PriceScale * (MinMove * splitrate))));
                if ((0 == 5))         
                {
                 Commentary("平多=" + Text(252));
                }

           }
          }
          else
          {   if ((BarsSinceEntry >= 1) and (MarketPosition == -1))         
           {
               
                 a13=(EntryPrice - a15[1]  );  

                if ((BarsSinceEntry >= 3) and ((Close[5] - Open[5]) > 0) and ((Close[4] - Open[4]) > 0) and ((Close[3] - Open[3]) > 0) and (a13 >= 26))         
                {

                 BuyToCover(Abs(CurrentContracts),((PriceScale * (MinMove * splitrate)) + Open));
                 if ((0 == 5))         
                 {
                  Commentary("平空=" + Text(31));
                 }

                 a26=0;
                }
                if((((Min(Close[1],Open[1]) - Low[1]) / Abs((Close[1] - Open[1]))) > 25) and (((Min(Close[1],Open[1]) - Low[1]) / (High[1] - Max(Close[1],Open[1]))) > 2.1) and (Abs((Close[1] - Open[1])) > 0) and (a13 >= 26))
                {

                 BuyToCover(Abs(CurrentContracts),((PriceScale * (MinMove * splitrate)) + Open));
                 if ((0 == 5))         
                 {
                  Commentary("平空=" + Text(32));
                 }
         
                 a26=0;
                }
                if ((BarsSinceEntry >= 5) and (a13 < 0) and ((Close[1] - EntryPrice) > 0))         
                {

                 BuyToCover(Abs(CurrentContracts),((PriceScale * (MinMove * splitrate)) + Open));
                 if ((0 == 5))         
                 {
                  Commentary("平空=" + Text(33));
                  Commentary("myopenprofit33=" + Text(a13));
                 }
                 a26=(a26 + 1);

                 if ((xx_1070 == 0))         
                 {
                  xx_1070=1;  
                 }
                 else
                 {      if ((xx_1070 < DalayTicks))         
                  {
                   xx_1070=(xx_1070 + 1);  
                  }
                  else
                  {       if ((Time <= (LastTrade / 100)) and (a26 < 6) and ((a1 - a1[1]  ) <= 5.6))         
                   {
         
                        Buy(Lots,((PriceScale * (MinMove * splitrate)) + Open));
                   }
                   if ((0 == 5))         
                   {
                        Commentary("开多=" + Text(331));
                   }
                  }
                 }
                }
                if ((BarsSinceEntry > 6) and ((Open[1] + 2.4) < Close[1]) and (((High[4] - Low[2]) / 3) > 15))         
                {
         
                 BuyToCover(Abs(CurrentContracts),((PriceScale * (MinMove * splitrate)) + Open));
                 if ((0 == 5))         
                 {
                  Commentary("平空=" + Text(34));
                 }
           
                 a26=0;
                }
                if ((BarsSinceEntry > 5) and ((High - EntryPrice) > 18) and (a13 >= 9))         
                {
         
                 BuyToCover(Abs(CurrentContracts),((PriceScale * (MinMove * splitrate)) + (EntryPrice + 19)));
                 if ((0 == 5))         
                 {
                  Commentary("平空=" + Text(35));
                 }
                 a26=(a26 + 1);
         
                }
                if ((BarsSinceEntry > 5) and (a13 >= 30) and (High >= (EntryPrice - 16)))         
                {

                 BuyToCover(Abs(CurrentContracts),((PriceScale * (MinMove * splitrate)) + (EntryPrice - 16)));
                 if ((0 == 5))         
                 {
                  Commentary("平空=" + Text(352));
                 }

                 a26=0;
                }
                if ((BarsSinceEntry > 7) and (Close[1] >= EntryPrice) and (a13 >= 23))         
                {
         
                 BuyToCover(Abs(CurrentContracts),((PriceScale * (MinMove * splitrate)) + Open));
                 if ((0 == 5))         
                 {
                  Commentary("平空=" + Text(36));
                 }
                 a26=(a26 + 1);

                }
                if ((BarsSinceEntry >= 3) and ((Close[5] - Open[5]) > 2) and ((Close[4] - Open[4]) > 1.4) and ((Close[3] - Open[3]) > 7) and ((Close[1] - EntryPrice) > 3) and (a13 > 2))         
                {

                 BuyToCover(Abs(CurrentContracts),((PriceScale * (MinMove * splitrate)) + Open));
                 if ((0 == 5))         
                 {
                  Commentary("平空=" + Text(37));
                 }
                a26=0;
                }
           }
          }

         }
        }

使用道具 举报

Rank: 3Rank: 3

精华
0
UID
119070
积分
159
帖子
99
主题
15
阅读权限
40
注册时间
2013-7-4
最后登录
2014-8-5
8#
发表于 2014-5-4 10:31:17 |只看该作者
   xx_1010=AvgEntryPrice;
        if ((BarsSinceEntry >= 1) and (MarketPosition > 0) and (Low < (AvgEntryPrice - 19)) and ((PositionProfit+(Lots * 5700)) < 0) and (Time >= (TradeBegin / 100)) and (Time <= (LastTrade / 100)))         
        {
                  xx_1030=(xx_1010 - 19);  
         Sell(Abs(CurrentContracts),(Min(Open,xx_1030) - (PriceScale * (MinMove * splitrate))));
         if ((0 == 5))         
         {
          Commentary("平多=" + Text(51));
         }
         a26=(a26 + 1);

         a0=(a0 + 1);

         if ((xx_1070 == 0))         
         {
          xx_1070=1;  
         }
         else
         {  if ((xx_1070 < DalayTicks))         
          {
           xx_1070=(xx_1070 + 1);  
          }
          else
          {   if ((a26 < 6) and ((a2[1]   - a2) <= 5))         
           {
                SellShort(Lots,(Min(Open,xx_1030) - (PriceScale * (MinMove * splitrate))));
                if ((0 == 5))         
                {
                 Commentary("开空=" + Text(52));
                }
           }
          }
         }
        }
        else
        { if ((BarsSinceEntry >= 1) and (MarketPosition < 0) and (High > (AvgEntryPrice + 19)) and ((PositionProfit+(Lots * 5700)) < 0) and (Time >= (TradeBegin / 100)) and (Time <= (LastTrade / 100)))         
         {
                   xx_1030=(xx_1010 + 19);      
           BuyToCover(Abs(CurrentContracts),(Max(Open,xx_1030) + (PriceScale * (MinMove * splitrate))));
          if ((0 == 5))         
          {
           Commentary("平空=" + Text(53));
          }
          a26=(a26 + 1);
          a0=(a0 + 1);
          if ((xx_1070 == 0))         
          {
           xx_1070=1;  
          }
          else
          {   if ((xx_1070 < DalayTicks))         
           {
                xx_1070=(xx_1070 + 1);  
           }
           else
           {    if ((a26 < 6) and ((a1 - a1[1]  ) <= 5.6))         
                {
                 Buy(Lots,(Max(Open,xx_1030) + (PriceScale * (MinMove * splitrate))));
                }
                if ((0 == 5))         
                {
                 Commentary("开多=" + Text(54));
                }
           }
          }
         }
        }
        if ((0 == 5))         
        {
         Commentary("FailSafecnt=" + Text(a0));
         Commentary("浮盈=" + Text(ContractProfit));
         Commentary("PositionProfit=" + Text(PositionProfit));
         if (Bo_103)         
         {
          Commentary("金叉a3a4");
         }
         if (Bo_102)         
         {
          Commentary("金叉a1a2");
         }
         if (Bo_104)         
         {
          Commentary("死叉a3a4");
         }
         if (Bo_101)         
         {
          Commentary("死叉a1a2");
         }
         Commentary("Portfolio_TotalProfit=" + Text(Portfolio_TotalProfit));
         Commentary("Portfolio_NetProfit=" + Text(Portfolio_NetProfit));
        }
        SetGlobalVar(0,xx_1040);
        SetGlobalVar(1,xx_1070);

End

使用道具 举报

Rank: 3Rank: 3

精华
0
UID
119070
积分
159
帖子
99
主题
15
阅读权限
40
注册时间
2013-7-4
最后登录
2014-8-5
9#
发表于 2014-5-4 11:03:21 |只看该作者
好东西不要错过,此源码属学习程序化,骗人,居家必备利器!

使用道具 举报

Rank: 6Rank: 6

精华
0
UID
86268
积分
2261
帖子
947
主题
67
阅读权限
70
注册时间
2011-12-13
最后登录
2021-6-6
10#
发表于 2014-5-4 18:39:54 |只看该作者
楼主好样的。

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

bottom

静态版|手机版|联系我们|交易开拓者 ( 粤ICP备07044698   

GMT+8, 2024-5-10 02:42

Powered by Discuz! X2 LicensedChrome插件扩展

© 2011-2012 交易开拓者 Inc.

回顶部