原文地址:解除公式时间限制的一个技巧作者:大鹅解除公式时间限制的一个技巧 解除公式时间限制的方法无非就二个: 1:删除公式时间限制的代码. 2:延长公式的使用期5-80年. 方法大家都懂,我就不多说. 短公式凭着肉眼就能解决,但是200多句的代码,让人眼花缭乱,不光容易出错,浪费大量时间. 我的小技巧: 1:找出时间限制的代码如 ( )2008年5月31日. date(时间) = (2009年10月25日) 例:a1:=(if((date = ),1,0)) * (if((currentdate{返回计算的日期} = ),1,0)); (有的是 按公式中的算数) 例: {决策线主图} inp t:n(5,1,111),n1(10,1,111),p(3,0.1,30),m(21,0,100); drawgbk((close  0),strip(rgb(4,1,28),rgb(4,1,35),0)); {drawgbk((close  0), 5 );} a1:=(if((date = ),1,0)) * (if((currentdate = ),1,0));{date = 时间限制} a2:=if((close  800),((amount  vol)  100),(close * 2) + high) + low)  4)); a3:=((hhv(high,15)) + (llv(low,30  2; a4:=ema((ma(a2,5)),10); a5:=ema((ma(a2,15)),10); a6:=ema((ma(a2,13)),21); a7:=((a4 + a5) + a6)  3; a8:=ref(a7,1)) + a7) + (ref(a7,2  3; 决策线:ema((ma(close,5)),3),colorgreen; partline(决策线,决策线  (ref(决策线,3)),rgb(255,0,0)),linethick1,colorred; {upr:决策线 + (3 * (std(决策线,10,color; dwn:决策线 - (3 * (std(决策线,10,colora;} 多空价:a8 * a1,linethick2,color008e00;{引用了a1的时间限制} 半年线:ma(close,120),pointdot,linethick4,colorgray; 年线:ma(close,250),crossdot,color; bbi:(ma(close,3)+ma(close,6)+ma(close,12)+ma(close,24))4; stickline((close  open),high,low,0.0001,1),colorred; stickline((close  open),open,close,8,1),color5050ff; stickline((close  open),open,close,8,0),colorffff85; stickline((close  open),high,low,0.0001,0),colorcyan; a9:=((ema((ma(a2,3)),3)) + (wma(a2,5  2; a10:=ref(a9,1); a11:=barscount(close); a12:=if((a11 = 1),0,a9 - a10)  a10) * 100)); a13:=ref(close,1); a14:=if((a11 = 1),0,close - a13)  a13) * 100)); a15:=if((a11 = 1),((close + open)  2),a10); a16:=ref(a9,2); a17:=((a9 + a10) + a16)  3; a18:=((abs((a9 - a17)) + abs((a10 - a17 + abs((a16 - a17  3; a19:=if((a11  3),0,((a18  a9) * 100)); a20:=if(a12  0.5) and ((a19  0.215) or (low  a15 and (close = open)),1,0); a21:=if(a12  (0 - 0.3)) and ((a19  0.2) or (high  a15 and ((open = close) or (a14  -1,1,0); b:((count(a20,barslast(a21 = 1) and a20,linethick0; d:((count(a21,barslast(a20 = 1) and a21,linethick0; {a22:=barslast(b); a23:=((sum(d,a22)) = 0) * a22; a24:=a23  0; a25:=a23 = 0; stickline(a24,close,open,8,0),colormagenta; stickline(a24,close,open,7,0),colorff28ff; stickline(a24,close,open,6,0),colorff3dff; stickline(a24,close,open,5,0),colorff51ff; stickline(a24,close,open,4,0),colorff65ff; stickline(a24,close,open,3,0),colorff7aff; stickline(a24,close,open,2,0),colorff8eff; stickline(a24,close,open,1,0),colorffa2ff; stickline(a25,close,open,8,0),colorfffd02; stickline(a25,close,open,7,0),colorf8ff24; stickline(a25,close,open,6,0),colorfdff4a; stickline(a25,close,open,5,0),colorfcff69; stickline(a25,close,open,4,0),colorfdfd97; stickline(a25,close,open,3,0),colorffffa2; stickline(a25,close,open,2,0),colorffffb6; stickline(a25,close,open,1,0),colorffffcc;} stickline(b,close,open,8,0),coloryellow; stickline(d,close,open,8,0),color00be00; drawtext(b,(low * 0.98), 买 ),linethick2,align1,colorwhite; drawtext(d,(high * 1.035), 卖 ),linethick2,align1,colorgreen; partline(决策线,决策线  (ref(决策线,3)),rgb(255,0,0)),linethick1,colorred; a26:=close  a13) - 1) * 100) = (7 * a1); a27:=high - ((high - low)  3); a28:=low + ((high - low)  3); partline(多空价,多空价  (ref(多空价,3)),rgb(255,0,0)),linethick2,colorred; drawtextrel(10,900, *qq群:* ),linethick1,color00eeff;{添加了qq号} drawgbk((close  0),strip(rgb(4,1,28),rgb(4,1,35),0)); - 修改时间限制修改后: inp t:n(5,1,111),n1(10,1,111),p(3,0.1,30),m(21,0,100); drawgbk((close  0),strip(rgb(4,1,28),rgb(4,1,35),0)); {drawgbk((close  0), 5 );} a1:=(if((date = ),1,0)) * (if((currentdate = ),1,0));{延长了时间限制} a2:=if((close  800),((amount  vol)  100),(close * 2) + high) + low)  4)); a3:=((hhv(high,15)) + (llv(low,30  2; a4:=ema((ma(a2,5)),10); a5:=ema((ma(a2,15)),10); a6:=ema((ma(a2,13)),21); a7:=((a4 + a5) + a6)  3; a8:=ref(a7,1)) + a7) + (ref(a7,2  3; 决策线:ema((ma(close,5)),3),colorgreen; partline(决策线,决策线  (ref(决策线,3)),rgb(255,0,0)),linethick1,colorred; upr:决策线 + (3 * (std(决策线,10,color; dwn:决策线 - (3 * (std(决策线,10,colora; 多空价:a8 * a1,linethick2,color008e00;{引用了a1时间限制} 半年线:ma(close,120),pointdot,linethick4,colorgray; 年线:ma(close,250),crossdot,color; bbi:(ma(close,3)+ma(close,6)+ma(close,12)+ma(close,24))4; stickline((close  open),high,low,0.0001,1),colorred; stickline((close  open),open,close,8,1),color5050ff; stickline((close  open),open,close,8,0),colorffff85; stickline((close  open),high,low,0.0001,0),colorcyan; a9:=((ema((ma(a2,3)),3)) + (wma(a2,5  2; a10:=ref(a9,1); a11:=barscount(close); a12:=if((a11 = 1),0,a9 - a10)  a10) * 100)); a13:=ref(close,1); a14:=if((a11 = 1),0,close - a13)  a13) * 100)); a15:=if((a11 = 1),((close + open)  2),a10); a16:=ref(a9,2); a17:=((a9 + a10) + a16)  3; a18:=((abs((a9 - a17)) + abs((a10 - a17 + abs((a16 - a17  3; a19:=if((a11  3),0,((a18  a9) * 100)); a20:=if(a12  0.5) and ((a19  0.215) or (low  a15 and (close = open)),1,0); a21:=if(a12  (0 - 0.3)) and ((a19  0.2) or (high  a15 and ((open = close) or (a14  -1,1,0); b:((count(a20,barslast(a21 = 1) and a20,linethick0; d:((count(a21,barslast(a20 = 1) and a21,linethick0; {a22:=barslast(b); a23:=((sum(d,a22)) = 0) * a22; a24:=a23  0; a25:=a23 = 0; stickline(a24,close,open,8,0),colormagenta; stickline(a24,close,open,7,0),colorff28ff; stickline(a24,close,open,6,0),colorff3dff; stickline(a24,close,open,5,0),colorff51ff; stickline(a24,close,open,4,0),colorff65ff; stickline(a24,close,open,3,0),colorff7aff; stickline(a24,close,open,2,0),colorff8eff; stickline(a24,close,open,1,0),colorffa2ff; stickline(a25,close,open,8,0),colorfffd02; stickline(a25,close,open,7,0),colorf8ff24; stickline(a25,close,open,6,0),colorfdff4a; stickline(a25,close,open,5,0),colorfcff69; stickline(a25,close,open,4,0),colorfdfd97; stickline(a25,close,open,3,0),colorffffa2; stickline(a25,close,open,2,0),colorffffb6; stickline(a25,close,open,1,0),colorffffcc;} stickline(b,close,open,8,0),coloryellow; stickline(d,close,open,8,0),color00be00; drawtext(b,(low * 0.98), 买 ),linethick2,align1,colorwhite; drawtext(d,(high * 1.035), 卖 ),linethick2,align1,colorgreen; partline(决策线,决策线  (ref(决策线,3)),rgb(255,0,0)),linethick1,colorred; a26:=close  a13) - 1) * 100) = (7 * a1); a27:=high - ((high - low)  3); a28:=low + ((high - low)  3); partline(多空价,多空价  (ref(多空价,3)),rgb(255,0,0)),linethick2,colorred; {drawtextrel(10,900, 哥们姐妹一家亲qq群: ),linethick1,color00eeff;加花括号去掉多余的qq广告} 2:打开 检测未来函数的工具 添加date 和 成 未来函数. 3:把你要修改的全部代码复制放过去检测. 结果会检出在 第多少行发现date 和. 指明了在多少多少行,你还不好找出来删或是来修改吗? 搞好后重新检测一次,定型.