致jinzhe:想问就以此指标你的码 http://www.weistock.com/bbs/dispbbs.asp?BoardID=4&ID=100221&replyID=&skin=1而言,
问题一:你是点選序列计算还是逐K綫计算还是無所谓呢
问题二:因一开始已冩了N:=14,那if barpos>14 then begin...可以用if barpos>N then begin ...代表吗?
问题三:另外就以下各种不同之獨立情况可略註明理論上会发生什么事:(前提是一开始码已冩了N:=14,)
若我冩,
1a) if barpos>0 then begin...
2a)if barpos>1 then begin...
3a)if barpos>12 then begin...
4a)if barpos>16 then begin...
5a)if barpos>N then begin
1b) if barpos>=0 then begin...
2b)if barpos>=1 then begin...
3b)if barpos>=12 then begin...
4b)if barpos>=16 then begin...
5b)if barpos>=N then begin...
1c) if barpos<0 then begin...
2c)if barpos<1 then begin...
3c)if barpos<12 then begin...
4c)if barpos<16 then begin...
5c)if barpos<N then begin...
1d) if barpos<=0 then begin...
2d)if barpos<=1 then begin...
3d)if barpos<=12 then begin...
4d)if barpos<=16 then begin...
5d)if barpos<=N then begin...
问题四:另外if barpos可否負数:-1,-2,-3,-14之类??
谢谢
1.让系统自动分配
2.可以
3.因为n设定为 14,所以sma计算时要超过14个周期的数据才有用,barpos用来判断当前k线是所有k线的第几根,sma里面的参数设定为14,那么就需要至少14根才有计算值
A) 以上问题三之各种不同之獨立情况会產生重绘漂移现象呢
B) 或什么情况下会產生重绘漂移现象呢?
C)若不涉及SMA或其他MA, BARPOS可以>0吗?
[此贴子已经被作者于2016-7-18 9:35:57编辑过]
A) 以上问题三之各种不同之獨立情况那些会產生重绘漂移现象?
B) 或什么情况下会產生重绘漂移现象呢?
C)若不涉及SMA或其他MA, if barpos>0 then begin吗?
D)if barpos>0 then begin...是什么意思和可行吗
if barpos<0 then begin...是什么意思和可行吗
if barpos>=0 then begin...是什么意思和可行吗
if barpos<-0 then begin...是什么意思和可行吗
[此贴子已经被作者于2016-7-18 9:44:07编辑过]
1.不会,信号重回不是这里的原因
2.barpos没有负数,周期要么没有数据要么最小是1
3.要看其他的怎么用了,要看其他函数需不需要一定的周期数据才能有结果
4.就大于0有用
你提到周期要么没有数据要么最小是1
A)若不涉及SMA或其他MA,
是否if barpos>=1 then begin 比If barpos>0 then begin 更合理?
B)若涉及SMA或其他MA, if barpos>N then begin才合理?
C)但if barpos>=N then begin又合理否?
1.这段与其说是不合理,倒不如说是没啥用,这样判断和没判断一样
2.不一定,要看怎么用
3.同2
1.这段与其说是不合理,倒不如说是没啥用,这样判断和没判断一样你的意思是否
A)若不涉及SMA或其他MA,
if barpos>=1 then begin 或If barpos>0 then begin 是可省略不冩呢?