...s==GetGlobalVar(7);
}
//空单开仓
If(BarStatus==2 And A_SellPosition==0 And A_GetOpenOrderCount==0 And Close[1]x)
{
A_SendOrder(Enum_Sell,Enum_Entry,y,Q_BidPrice(1)-py);
kt=Time;
SetGlobalVar(2,kt);
}
}
//多单开仓...
...
PlotNumeric("AA",AA);
PlotNumeric("BB",BB);
If(MarketPosition==0 And Close(4)>EE(4) And Close(3)>EE(3) And Close(2)>EE(2) And Close(1)>EE(1) And (Close-Close(1))/Close(1)>1%)
Buy(1,0);
If(MarketPosition==1 And CloseEE4 And Close(3)>EE3 And Close(2)>EE2 And Close(1)>EE1 And (Close-Clos...
final9
发表时间: 2016-05-29 15:52
浏览 (1762)
回复 (6) VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);MN:=MA(C,180);MM:MA(C,60),COLORCYAN;
VAR2:=REF(VAR1,1) AND CLOSE=REF(CLOSE,2);
VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,1) AND CLOSE
kgy000
发表时间: 2009-12-20 17:11
浏览 (4704)
回复 (17) ...eries DownLine; //下轨
NumericSeries MidLine; //中间线
Numeric Band;
Begin
MidLine = AverageFC(Close,Length);
Band = StandardDev(Close,Length,2);
UpLine = MidLine + Offset * Band;
DownLine = MidLine - Offset * Band;
If( MarketPosition==0 and Close[2] > UpLine[2] and Close[...
If (qyjx)
{//启用均线
If (qyopen)
{//启用开盘价
gao3=CountIf(Close[1]>Close[2] And Open[1]>Open[2] And High[1]>High[2] And Low[1]>Low[2],2)==2 And Close[2]>avghigh[2];
di3=CountIf(Close[1]
sky1977
发表时间: 2019-02-22 11:49
浏览 (1196)
回复 (2) ...//------------ 平空操作 -----------------
BPSHORT = Low[1]-Low[2]>0 And low[2]-low[3]>0; //平空条件If(BPSHORT==True And GetGlobalVar(8)==-1 And BarStatus==2 And QuoteDataExist==True)
{A_SendOrder(Enum_Buy,Enum_Exit,A_SellPosition,Q_BidPrice+2*M...
wide
发表时间: 2011-01-06 12:43
浏览 (8252)
回复 (23) ...eric("slowma",slowma);
bLongCond = fastma[1] > slowma[1]
And Close[1] > High[2]
And Close[1] > Max(fastma[1],slowma[1])
And Close[1] > Open[1];
bShortCond = fastma[1] < slowma[1]
And Close[1] < Low[2]
And Close[1] < Min(fastma[1],slowma[1])
And Clo...
guoer67533
发表时间: 2015-09-08 22:07
浏览 (1337)
回复 (0) ... bLongCond = fastma[1] > slowma[1]
And Close[1] > High[2]
And Close[1] > Max(fastma[1],slowma[1])
And Close[1] > Open[1];
bShortCond = fastma[1] < slowma[1]
...
guoer67533
发表时间: 2015-09-09 05:58
浏览 (1262)
回复 (0) ...tL(-99999.),ATRexitS(99999.),ATRx(0);if entrymethod=1 then begin //random entry//Entry logic
Longshort=random(1); //chose a random number between 0 and 1
BarstoNext=intportion(random(15))+1; //entry should occur at BarsToNext bars after previous exitif (totaltrades=0 or BarsSinceEx...
期货进行中
发表时间: 2012-03-31 11:09
浏览 (5086)
回复 (3) Params
VarsBegin
If( CloseD(2)/CloseD(3)>1.097 And CloseD(3)>CloseD(4)*1.097 and HighD(2)==CloseD(2) and HighD(3)==CloseD(3) and CloseD(1)CloseD(2)*0.8 and Vol
yimatouzi
发表时间: 2018-04-01 23:37
浏览 (1703)
回复 (0) ... )
{
SetGlobalVar( 6, 0 );
Return;
}
If( Q_BidPrice > MA and GetGlobalVar(0) ==1 )
SetGlobalVar( 0, 0 );
If( ( A_BuyPosition >0 or A_BuyPosition ==0 and A_GetLastOpenOrderIndex( Enum_Buy, Enum_Entry ) == InvalidInteger ) and GetGlobalVar(1) ==1 )
{
SetGlobalVar( 1...
i7755_1
发表时间: 2019-01-10 02:42
浏览 (2282)
回复 (7) ...verage(XAverage(XAverage(Close,Length),Length),Length),Length);If(Cha1 and Cha1[1] and Cha1[2] and Close[1]>Ema[1])
{
Buy(lots,Open);
}If(Cha2 and Cha2[1] and Cha2[2] and Close[1]
bingxue
发表时间: 2012-09-08 15:02
浏览 (11656)
回复 (25) ...
{
.......
if(CurrentEntries==2 And CloseMA20 And CurrentContracts>=2) //减多单
{
Sell(1,Close-Offset * MinMove * PriceScale);
}
.......
}If(MarketPosition==-1)
{
......
if(CurrentEntries==2 And Cl...
jwieen
发表时间: 2015-12-14 16:58
浏览 (5414)
回复 (16) ...是加仓不对。代码是:
//空仓进场
If (marketposition==0 And Condition2)
{
FirstEntryPrice = Min(Low[1],Low[2]);
unAddSetPrice = Min(open,FirstEntryPrice);
{
SellShort(lots,unAddSetPrice);
}
}
//空仓加仓
If (marketposition==-1...
marialeng
发表时间: 2017-07-18 16:02
浏览 (2183)
回复 (3) ...= Value(GetTBProfileString(SymbolName(),"duozhisun"));If (BarStatus==2 And Left(ExchangeName,4)=="上海")
{
tradetime = (CurrentTime>0.090000 And CurrentTime0.103000 And CurrentTime0.133000 And CurrentTime0.142000 And CurrentTime0.090000 And CurrentTime0.103000 And CurrentTime0.133000 An...
gbo001
发表时间: 2010-03-23 10:11
浏览 (5513)
回复 (19) ...==================================================开仓买入
if(zgmmm=0 And ff[2] ) //开空
{
A_SendOrder(Enum_Sell,Enum_Entry,scale2);
SetGlobalVar(1,1); //为1
}
}//开仓卖出
If(zgmmm>=5 && A_SellPosition()==0 && GetGlobalVar(1)==0 && BarStatus == 2)
{If(f=5 && A_SellPosition()>=0...
zhuang123
发表时间: 2016-05-26 16:15
浏览 (1587)
回复 (1) ...(1,0);
if(barstatus==2)
{
//多开
if(Q_OutsideVol>GetGlobalVar(0) and (Q_LastVol()>1000 and Q_OpenIntFlag>0) and (Q_Last==GetGlobalVar(2)))
{
A_SendOrder(Enum_Buy,Enum_Entry,1,Q_Last);}//空开
if(Q_InsideVol>GetGlobalVar(1) and (...
... if(barstatus==2)
{
//多开
if(Q_OutsideVol>GetGlobalVar(0) and (Q_LastVol()>1000 and Q_OpenIntFlag>0) and (Q_Last==GetGlobalVar(2)))
{
A_SendOrder(Enum_Buy,Enum_Entry,1,Q_Last);}//空开if(Q_InsideVol>GetGlobalVa...
请教,下面这个语句在盘中会实际发单吗?
if (barstatus!=2)
{If (MarketPosition!=1 and m1[1])
{ buy(0,open+2*minpoint);}}
盼复!
gslizg
发表时间: 2011-11-05 18:43
浏览 (2209)
回复 (2) ...HighD(1);
zc2=piv-HighD(1)*LowD(1);
BBTop=Average(close,length)+stddev*StandardDev(close,length,2);
BBBot=Average(close,length)-stddev*StandardDev(close,length,2);
PlotNumeric("zl1",zl1);
PlotNumeric("zc1",zc1);
PlotNumeric("BBTop",BBTop);
PlotNumeric("BBBot",BBBot);
//交易开仓主体
...
bbqqcc6888
发表时间: 2016-06-08 14:11
浏览 (1890)
回复 (1)