voce consegue implementar um indicador para mt5 com essas funcionalidade desse script…
- User
voce consegue implementar um indicador para mt5 com essas funcionalidade desse script pine?
//@version=4
study("REVERSÃO POR ZONA DE RSI- INICIA CRYPTO ", overlay=false)
//functions xrf(values, length) => r_val = float(na) if length >= 1 for i = 0 to length by 1 if na(r_val) or not na(values[i]) r_val := values[i] r_val r_val xsa(src,len,wei) => sumf = 0.0 ma = 0.0 out = 0.0 sumf := nz(sumf[1]) - nz(src[len]) + src ma := na(src[len]) ? na : sumf/len out := na(out[1]) ? ma : (srcwei+out[1](len-wei))/len out
// inputs n1 = input(30, title="n1", type=input.integer, minval = 1)
//threshold lines h1 = hline(50,color=color.red, linestyle=hline.style_dotted) h2 = hline(50, color=color.green, linestyle=hline.style_dotted) h3 = hline(10,color=color.lime, linestyle=hline.style_dotted) h4 = hline(90, color=color.red, linestyle=hline.style_dotted) fill(h2,h3,color=color.green,transp=70) fill(h1,h4,color=color.red,transp=70)
//KDJ indicator rsv = (close-lowest(low,n1))/(highest(high,n1)-lowest(low,n1))*100 k = xsa(rsv,3,1) d = xsa(k,3,1) buysig = iff(d<25 and crossover(k,d) ,30,0) selsig = iff(d>75 and crossunder(d,k) ,70,100)
//plot buy and sell signal ple = plot(buysig,color=color.green, linewidth=1,style=plot.style_area, transp=0) pse = plot(selsig,color=color.red, linewidth=2,style=plot.style_line, transp=0)
//plot KD candles plotcandle(k, d, k, d, color=k>=d?color.green:na) plotcandle(k, d, k, d, color=d>k?color.red:na)
// KDJ leading line var1 = (close-sma(close,13))/sma(close,13)*100 var2 = (close-sma(close,26))/sma(close,21)100 var3 = (close-sma(close,90))/sma(close,34)100 var4 = (var1+3var2+9var3)/13 var5 = (100-abs(var4)) var10 = lowest(low,10) var13 = highest(high,25) leadingline = ema((close-var10)/(var13-var10)*4,4)*25 pbias = plot(leadingline,color=k>=d?color.green:color.red, linewidth=4,style=plot.style_line, transp=10)
- Assistant
- User
deu esses erros:
'RSI_Wendel_01.mq5' RSI_Wendel_01.mq5 1 1 'buffer' - arrays are passed by reference only RSI_Wendel_01.mq5 105 25 'low' - invalid array access RSI_Wendel_01.mq5 58 41 built-in: int iLowest(const string,ENUM_TIMEFRAMES,ENUM_SERIESMODE,int,int) RSI_Wendel_01.mq5 58 41 'high' - invalid array access RSI_Wendel_01.mq5 59 45 built-in: int iHighest(const string,ENUM_TIMEFRAMES,ENUM_SERIESMODE,int,int) RSI_Wendel_01.mq5 59 45 'abs' - undeclared identifier RSI_Wendel_01.mq5 79 29 'var4' - some operator expected RSI_Wendel_01.mq5 79 33 'low' - invalid array access RSI_Wendel_01.mq5 80 36 built-in: int iLowest(const string,ENUM_TIMEFRAMES,ENUM_SERIESMODE,int,int) RSI_Wendel_01.mq5 80 36 'high' - invalid array access RSI_Wendel_01.mq5 81 38 built-in: int iHighest(const string,ENUM_TIMEFRAMES,ENUM_SERIESMODE,int,int) RSI_Wendel_01.mq5 81 38 '*' - parameter passed as reference, variable expected RSI_Wendel_01.mq5 83 77 double EMA(int,double&[],int,double) RSI_Wendel_01.mq5 89 8 'i–' - undeclared identifier RSI_Wendel_01.mq5 111 49 9 errors, 0 warnings 10 1
- Assistant
- User
- Assistant
- User
agora tem apenas 6 erros:
'RSI_Wendel_01.mq5' RSI_Wendel_01.mq5 1 1 'buffer' - arrays are passed by reference only RSI_Wendel_01.mq5 104 25 'buffer' - arrays are passed by reference only RSI_Wendel_01.mq5 118 29 'buffer' - arrays are passed by reference only RSI_Wendel_01.mq5 129 29 'i–' - undeclared identifier RSI_Wendel_01.mq5 110 49 'i–' - undeclared identifier RSI_Wendel_01.mq5 121 59 'i–' - undeclared identifier RSI_Wendel_01.mq5 132 59 6 errors, 0 warnings 7 1
- Assistant
- User
'RSI_Wendel_01.mq5' RSI_Wendel_01.mq5 1 1 'buffer' - arrays are passed by reference only RSI_Wendel_01.mq5 104 25 'buffer' - arrays are passed by reference only RSI_Wendel_01.mq5 118 29 'buffer' - arrays are passed by reference only RSI_Wendel_01.mq5 129 29 'i–' - undeclared identifier RSI_Wendel_01.mq5 110 49 'i–' - undeclared identifier RSI_Wendel_01.mq5 121 59 'i–' - undeclared identifier RSI_Wendel_01.mq5 132 59 6 errors, 0 warnings 7 1
- Assistant