... if(A_TotalPosition()==0)
{
if(buycondition and GetGlobalVar(2) == 0)
{
SetGlobalVar(0,2);
A_SendOrder(Enum_Buy,Enum_Entry,1,Q_AskPrice);
SetGlobalVar(2,1);
SetGlobalVar(1,CurrentTime...
hxh989898
发表时间: 2016-05-30 21:46
浏览 (2395)
回复 (4) ... 。。。。。。。。。。。。。。。。
if(CrossOver(M,M[1])and c[1]>o[1]AND Open>=High[1])
{
Buy(1,O);
}
If(CrossOver(M,M[1])and c[1]>o[1]AND High>=High[1])
{
BuyToCover(0,High[1]);
}
If(CrossOver(M,M[1])AND C[1]>O[1]AND High>=High[1])
{
Buy(1,H...
xkzr
发表时间: 2011-08-19 15:02
浏览 (4978)
回复 (14) ...
{
condition1 = Close[length3]Close[length1];
if (condition2 and A_SellPosition==A_BuyPosition and A_SellPosition>0 and A_GetOpenOrderCount()==0)
{
A_SendOrder(Enum_Sell,Enum_Exit,5,Q_BidPrice);
SetGlobalVar(0,0);
}
if (condition1 and A_BuyPosition==A_SellPosition An...
bcsongby
发表时间: 2019-12-03 15:02
浏览 (1090)
回复 (7) ...c("long2",long2,0,Red);
if(MarketPosition1&&short1[1] > short2[1] and short2[1] > media1[1] and media1[1] > media2[1] and media2[1] > long1[1] and long1[1] > long2[1])
{
D1=1;
}
if(MarketPosition1&&short1[1] < short2[1] and short2[1] < media1[1] and media1[1] < media2[1] and med...
...e-LowestValue,SlowLengthKD)*100;
isBuying = (MACDValue < AvgMACD) And (oParCl oParCl) And (MTMValue=Close)and (oParCl[1] < oParCl) And (MTMValue>100) And (KValue>60);
If(isBuying)
{
Buy(1,Close);
}
If(isSelling)
{
...
ssj918918
发表时间: 2014-01-01 14:10
浏览 (6033)
回复 (2) ...tboLength(10);
Numeric bolLength(20);
Numeric callbolBandTrig(2.2);
Numeric putbolBandTrig(1.8);
Numeric atrLength(10);
Numeric upconstt(2.8);
Numeric downconstt(3);
Numeric Lots(0);
Vars
NumericSeries buyPoint(0); ...
.../Close[NthCon(CrossOver(e,b),1)];//多头开仓
if(crossover(b,e) and MarketPosition!=1 and ktdfdata2.v and CurrentTime>=0.145955)
{
entryLots= (A_CurrentEquity *0.1)/(data1.C*ContractUnit*MarginRatio);
entryLots ...
notherask
发表时间: 2013-04-25 21:55
浏览 (3261)
回复 (7) PlotBool("sad", close < ama and close[1]30) and close < ama and close[1]
yd111070
发表时间: 2011-09-15 22:52
浏览 (2548)
回复 (5) ...什么意思请老师讲解
}//开仓条件如下:if (ma1>ma2 and ma2>ma3){
If(rocvalueXb1 and MarketPosition1)
buy(1,close);if(rocvalue>0 and rocvaluema3 and ma3>ma2){
If(rocvalueXb2 and MarketPosition1)
Buy(1,close);if(rocvalue>0 and rocvaluema1 and ma1>ma3)......
qqboy1978
发表时间: 2009-09-22 23:20
浏览 (3576)
回复 (7) ...分形,如何实现啊,写了代码有点问题if(High[3]>high[4] and high[3]>high[5] and high[3]>high[2] and h[3]>h[1] and h[3]>Value2[1] )// and //and{myn1=h[3]; CurrentBar1=CurrentBar-2 ; PlotString("a",Text(CurrentBar1),h[3]+15,red,4); PlotString("myn1",Text(myn1),h[3]+5,...
...e[Length]*100;//不同均线排列的建仓如下:
if (ma1>ma2 and ma2>ma3)
{
myEntryPrice=1;
If(rocvalueXb1 and MarketPosition1)
buy(1,close);
if(rocvalue>0 and rocvaluema3 and ma3>ma2)
{
myEntryPrice=2;
If(rocvalueXb2 and MarketPosition1)
buy(1,close);
...
qqboy1978
发表时间: 2009-09-20 15:51
浏览 (4349)
回复 (6) ...)+(c[3]+o[3]))/2;
VAR2=ABS(VAR1-VAR1[1])>=N;
If(VAR1>VAR1[1] and var2 and MarketPosition1) buy (1,C);
if(VAR1VAR1[1] and var2) BuyToCover(CurrentContracts(),c);
if(VAR1
shensiwen
发表时间: 2010-03-18 10:23
浏览 (2339)
回复 (2) .../Close[NthCon(CrossOver(e,b),1)];//多头开仓
if(crossover(b,e) and MarketPosition!=1 and ktdfdata2.v and CurrentTime>=0.145955)
{
entryLots= (A_CurrentEquity *0.1)/(data1.C*ContractUnit*MarginRatio);
entryLots ...
notherask
发表时间: 2013-04-25 22:13
浏览 (1872)
回复 (0) ...2手多仓的情况?是什么原因导致的?
问题2:If(BKcond and TemB==0&&barstatus==2 && KC==True) //此处加上HasBK==0的限制条件,就一直不开仓了,去掉HasBK==0的限制就能正常开仓了,这是为何?错在哪里?
问题3:初始化全局变量if ( BarSt...
masterhdd
发表时间: 2018-05-02 16:05
浏览 (1460)
回复 (2) ...astBarTime = Time;
TickCounter = 0;
}
If(MarketPosition 1 && bLongCond And CurrentTime-Time >= 0.000050)
{
If(MarketPosition == 0 || BarStatus != 2)
{
Buy(Qty,Close+PY*MinPoint);
}
Else
{
BuyToCover(Qty,Close+PY*MinPoint);
If(TickCounter == 0)
{
TickCounter = 1;
}
Else If(TickCount...
guoer67533
发表时间: 2015-09-18 06:35
浏览 (1906)
回复 (1) ... 于 2018-10-20 22:10 编辑if(MarketPosition==0)
{
if(High>high[1] and high>junxian ) buy(2,max(open,high[1]));//junxian为均线;
if(Lowhigh[1] and CurrentEntries2000 and abs(currentcontracts)==2 )Buy(2,open);//zdfy为最大浮盈;
if(zdfy>4000 and abs(currentcont...
ad434005
发表时间: 2018-10-20 22:03
浏览 (2073)
回复 (5) ...);
B5:=REF(L,5);
B6:=REF(L,6);
B7:=REF(L,7);
B8:=REF(L,8);
HF1:=A2>A1 AND A2>A AND A2>A3 AND A2>A4;HF2:=A3=A2 AND A2>A1 AND A2>A AND A2>A4 AND A2>A5;HF3:=A2=A4 AND A2>A1 AND A2>A AND A2>A3 AND A2>A5 AND A2>A6;HF4:=A4=A3 AND A3=A2 AND A2>A1 AND A2>A AND A2>A5 AND A2>A6;HF5:=A2=A4...
greedy
发表时间: 2011-02-12 01:12
浏览 (1765)
回复 (2) 比如10分钟周期:
1、请教连续两个阳线的写法是否这样?
Close[1]-Open[1]>0 And Close[2]-Open[2]>0
有无简单的写法?
2、连续两个阳线在同一天如何写法?
是否:Date==Date[1] And Date[1]==Date[2]
有无简单的写法?
谢谢!
tsdaquan
发表时间: 2011-07-02 14:46
浏览 (3418)
回复 (6) ...始化全局变量
IF( A>B)开多仓信号
{
if(GetGlobarvar(0)=0 and GetGlobarvar(1)=0) \\无持仓
{
Buy(Lots,Open); 开多一手
setGlobalvar(0,1);
} else if (GetGlobarvar(0)=0 and GetGlobarvar(1)=1) 空仓持仓
{
...
xiaosong
发表时间: 2013-07-20 22:25
浏览 (1723)
回复 (0) ...低价低于前一根阴线-2平仓,用的是Else If(Close[1] < Open[1] and Low < LOW[1]-2),但因为LOW是不断变化的,所以感觉价可会有闪烁,有没有什么函数能够表达同样的意思,但不会有价格闪烁问题呢。另外,由于设置了Close[1] < Open[1] AND Clos...