没有搜到相关内容,请选择我要提问。 我要提问 产品建议
第 11-30 条, 共 280 条.

请问下这个Q函数、A函数和全局变量的策略哪里有误

...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); } } //多单开仓...
boli389944241 发表时间: 2018-02-13 13:57 浏览 (2214) 回复 (1)

请教老师程序的问题如何解决。

... 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[...
veronica5477 发表时间: 2016-05-30 13:50 浏览 (1112) 回复 (1)

如何将countif运用到if语句里面

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)

关于控制开仓手数的问题(A_SendOrder)

...//------------ 平空操作 ----------------- 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)

在日K线的情况下如何实现收盘前开平仓

...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)

在日K线的情况下如何实现收盘前开平仓

... 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)

哪位好心人把这段TradeStation code变成TB,谢谢啦!

...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)

为什么不能在tick图里面止损

...(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 (...
kingofdragon1 发表时间: 2018-11-19 10:35 浏览 (1288) 回复 (0)

为什么不能在tick图里面止损

... 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...
kingofdragon1 发表时间: 2018-11-19 10:36 浏览 (864) 回复 (0)

请教If(barstatus!=2 and con成立)buy会有实际发单运作吗?

请教,下面这个语句在盘中会实际发单吗? 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)