- 精华
- 0
- 在线时间
- 19 小时
- UID
- 174396
- 积分
- 31
- 帖子
- 8
- 阅读权限
- 10
- 注册时间
- 2013-10-24
- 最后登录
- 2014-4-23
- 精华
- 0
- UID
- 174396
- 积分
- 31
- 帖子
- 8
- 主题
- 3
- 阅读权限
- 10
- 注册时间
- 2013-10-24
- 最后登录
- 2014-4-23
|
垃圾模型也需要探讨?
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));
}
}
}
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));
}
}
}
}
}
}
} |
|