# 在柱 0 上出现错误；数组大小太大，最大大小为 100000

##### 问题描述投票：0回答：0

Pine脚本在柱0上显示错误，数组大小太大；最大尺寸为 100000 我的代码在这里 在这里使用嵌套 for 循环有助于解决嵌套循环

``````   //@version=5
indicator("My script",max_bars_back = 55)
import kaigouthro/into/2 as boof

price=hlc3
srce1=1
srce2=2
srce3=3
srce4=5
srce5=8
srce6=13
srce7=21
srce8=34
srce90=55
srce10=84
srce11=139

basis =ta.sma(price,srce1)
basis2 =ta.sma(price,srce2)
basisA =ta.sma(price,srce3)
basis2A =ta.sma(price,srce4)
basisB =ta.sma(price,srce5)
basis2B =ta.sma(price,srce6)
basisC =ta.sma(price,srce7)
basis2C =ta.sma(price,srce8)
basisD =ta.sma(price,srce90)
basis2D =ta.sma(price,srce10)
basisE =ta.sma(price,srce11)
``````

arrsig=array.from（基础，基础2，基础A，基础2A，基础B，基础2B，基础C，基础2C，基础D，基础2D，基础E） N=array.size(arrsig) - 1 funcml（数据）=>

``````    grarry=array.new_float(0)
rdarry=array.new_float(0)
for i = 0 to N by 1
for j = 0 to N by 1
while i!=j

gchk=auto.isReversalUpTrend(array.get(data,i),array.get(data,j))
grchkv=boof.f(gchk)
array.push(grarry,grchkv)

rchk=auto.isReversalDownTrend(array.get(data,i),array.get(data,j))
rdchkv=boof.f(rchk)
array.push(rdarry,rdchkv)
if j==N
break

[grarry,rdarry]

[smacumgr,smacumrd]=funcml(arrsig)
cumresgr=array.sum(smacumgr)
cumresrd=array.sum(smacumrd)
vuptrnd=cumresgr>math.abs(cumresrd)
vdwntrnd=cumresgr<math.abs(cumresrd)

plotchar(vuptrnd,char="🡩",color=color.green,location = location.top,size = size.tiny)
plotchar(vdwntrnd,char="🡫",color=color.red,location = location.top,size=size.tiny)

//end