... NumericSeries LLValue(0);
Begin
If (CurrentBar == 0)
{
Position = 1 ;
oTransition = 1 ;
Af = AfStep ;
HHValue = High ;
LLValue = Low ;
oParClose = LLValue ;
ParOpen = oParClose + Af * ( HHValue - oParClose) ;
If (ParOpen > Low)
{
ParOpen = Low ;
}
}Else
{ ...
loafertb
发表时间: 2014-09-04 12:00
浏览 (1975)
回复 (2) Params
Numeric notbef(9.00);
Numeric notaft(14.55);
Numeric f1(0.01);
Numeric f2(1);
Numeric f3(0.01);
Numeric reverse(1.00);
Numeric rangemin(0.1);
Numeric xdiv(3);
Numeric offset(5);Vars
NumericSeries ssetup(0);
NumericSeries bsetup(0);
NumericSeries senter(0);
NumericSeries ben...
renchaohui
发表时间: 2013-01-28 16:23
浏览 (5368)
回复 (12) 本帖最后由 research 于 2013-10-18 13:15 编辑以下是网友穿堂风在本论坛发过的一个策略(链接为;)其中的一部分,因为没有基础,看不明白,贴上来请教;
params
... ...
Numeric f1(0.35);
Numeric f2(0.07);
Numeric f3(0.25);
... ...
Vars
Nu...
research
发表时间: 2013-10-18 13:11
浏览 (1909)
回复 (4) ...印结果。
模型如下:
Vars
Numeric kai(-350);
Numeric fan(100000000);
Numeric ying(30);
Numeric sun(30);
NumericSeries xx;
Bool bk1;
Bool sk1;
Bool sp1;
Bool sp2;
Bool sp3;
Bool bp1;
Bool bp2;
Bool bp3;Beginbk1 = c[1]-Data1.c[1]kai-50 && time>0.0905 && t...
ohyear741
发表时间: 2011-11-18 12:48
浏览 (1904)
回复 (3) 在8点59到900点钟之间,用函数OpenD(0), HighD(1),LowD(1),是否一定能正确取到数据,是否有可能取到错误的数据?
tjlinjie
发表时间: 2011-11-17 19:57
浏览 (2704)
回复 (2) 新手学习tb中,找了个最简单的编程,发现小括号 无法匹配
If(MarketPosition -1 && AvgValue1[1] < AvgValue2[1] && AvgValue2[1] < AvgValue3[1] &&< AvgValue3[1] < AvgValue4[1])
或者If(MarketPosition -1 && AvgValue1[1] < AvgValue2[1] < AvgValue3[1] < AvgValue4[1])
124361579
发表时间: 2013-03-14 13:35
浏览 (2181)
回复 (7) Params
Numeric callboLength(15);
Numeric putboLength(10);
Numeric bolLength(20);
Numeric callbolBandTrig(2.2);
Numeric putbolBandTrig(1.8);
Numeric atrLength(10);
Numeric upconstt(2.8);
Numeric downc...
...、rb000、ru000、zc000等商品指数期货Params
Numeric Length1(20); //均价线长度20
Numeric S1(2); //开仓确认周期数
Numeric S2(2); //平仓确认周期数
Numeric Lots(1); //交易手数1手
Numeric StartPer1(10); //1级跟踪止盈,盈利10%启动
Nu...
Params
Numeric notbef(9.00);
Numeric notaft(14.55);
Numeric f1(0.35);
Numeric f2(0.07);
Numeric f3(0.25);
Numeric reverse(1.00);
Numeric rangemin(0.2);
Numeric xdiv(3);Vars
NumericSeries ssetup(0);
NumericSeries bsetup(0);
NumericSeries senter(0);
NumericSeries benter(0);
NumericSer...
sj193286
发表时间: 2019-03-18 16:51
浏览 (1473)
回复 (0) ...tPosition!=0?进一步,我想表示如果有多仓时MarketPosition==1,空仓是MarketPosition==-1。如果有多仓,如果1+1=2,满足显示sell;如果有空仓,并且1-1=0,显示buy。我是这样写的,但是输出是错误的,就不知道是什么问题了。请帮忙解决...
wxqwyl
发表时间: 2013-12-05 15:00
浏览 (2236)
回复 (4) ma1=Average(Close,10);\\短期均线1
ma2=Average(Close,20);\\短期均线2
ma5=Average(Close,50); \\中期均线
ma7=Average(Close,70); \\长期均线if(ma2>ma5 and ma5>ma7 and CrossOver(ma1,ma2) and MarketPosition==0)
{
Buy(1,Open+5*MinMove);
SetGlobalVar(1,0);
...
longlong88
发表时间: 2011-04-28 12:03
浏览 (1818)
回复 (1) 本帖最后由 rlqh81332065 于 2016-9-29 21:44 编辑请问老师,1、以下代码的第二部分能否起到开仓后信号消失的处理作用(即信号消失后平掉已建立的仓位)?如何不能,该如何编写代码?2、MarketPosition是否必须使用?第一...
Params
Vars
Numeric Sets(1); //下单组数,每组包含Lots0\Lots1\Lots2
Numeric Threshold(125); //Threshold
Numeric Threshold_ping(100);
Numeric FastEMA(2); //快线参数
Numeric SlowEMA(11); //慢线参数NumericSeries FastValue; //快线
NumericSe...
Joysurf
发表时间: 2015-12-07 14:55
浏览 (1272)
回复 (1) Params
Numeric ma_a(5);
Numeric ma_b(10);
Numeric ma_c(20);Vars
Numeric e;
Numeric r;
Numeric i;
Numeric j;
Numeric z;
Numeric m;
Numeric Sum_A;
Numeric Sum_A1;
Numeric Sum_A2;
Numeric Sum_B;
Numeric Sum_B1;
Numeric Su...
onser
发表时间: 2011-04-23 08:22
浏览 (3068)
回复 (4) RT day != day[1] 和 Date!=Date[1] 区别 ?
shshtiger
发表时间: 2012-02-12 12:40
浏览 (2753)
回复 (2) 本帖最后由 hbxtxq77 于 2017-10-4 19:19 编辑本帖最后由 hbxtxq77 于 2017-10-2 21:14 编辑通达信源码
上1:SMA(C,20,1)+6.18*SMA(MAX(MAX(H-L,ABS(H-REF(C,1))),ABS(REF(C,1)-L)),17,1),COLORMAGENTA;
上2:SMA(C,20,1)+3.82*SMA(MAX(MAX(H-L,ABS(H-REF(C,1))),ABS(REF(C,1)-L)),17,1),...
hbxtxq77
发表时间: 2017-10-02 21:20
浏览 (1555)
回复 (0) ...---
// 简称: R_BreakerParams
Numeric notbef(9.00);
Numeric notaft(14.55);
Numeric f1(0.35);
Numeric f2(0.07);
Numeric f3(0.25);
Numeric reverse(1.00);
Numeric rangemin(0.2);
Numeric xdiv(3);Vars
NumericSeries ssetup(0);
NumericSeries bsetup(0);
NumericSeries senter(0);
Numeric...
Begin
Commentary("HighD(1):"+text(HighD(1)));
If(date != date[1])
{
Commentary("HighD(1):"+text(HighD(1)));
}
end
请问老师:
为什么HighD(1)这个值在5分钟线上,两个打出的值是不一样的?没有条件的HighD(1)打出来时对的。但在条件里的就错了...
6481830
发表时间: 2012-03-01 09:28
浏览 (2624)
回复 (3) ...sition==0 || BarStatus!=2)
{
Buy(1,Open);
}
其中的BarStatus!=2这句有什么意义?是为了什么?请指教。Params
Numeric FastLength(5);
Numeric SlowLength(20);
Numeric DelayTicks(5...
masterhdd
发表时间: 2018-05-07 18:40
浏览 (2682)
回复 (14) 我用6.0.1.1 FileAppend写不了文件, 消息中心会报很多黄色叹号标志, 但是实际没写文件, 应该怎么解决?