sirolf2009

ANN Strategy

31404 254 3537
This is the strategy implemenation of my ANN indicator
Remove from Favorite Scripts Add to Favorite Scripts
//@version=2
strategy("ANN Strategy")

threshold = input(title="Threshold", type=float, defval=0.0014, step=0.0001)

getDiff() =>
    yesterday=security(tickerid, 'D', ohlc4[1])
    today=security(tickerid, 'D', ohlc4)
    delta=today-yesterday
    percentage=delta/yesterday

PineActivationFunctionLinear(v) => v
PineActivationFunctionTanh(v) => 
    (exp(v) - exp(-v))/(exp(v) + exp(-v))

l0_0 = PineActivationFunctionLinear(getDiff())
l0_1 = PineActivationFunctionLinear(getDiff())
l0_2 = PineActivationFunctionLinear(getDiff())
l0_3 = PineActivationFunctionLinear(getDiff())
l0_4 = PineActivationFunctionLinear(getDiff())
l0_5 = PineActivationFunctionLinear(getDiff())
l0_6 = PineActivationFunctionLinear(getDiff())
l0_7 = PineActivationFunctionLinear(getDiff())
l0_8 = PineActivationFunctionLinear(getDiff())
l0_9 = PineActivationFunctionLinear(getDiff())
l0_10 = PineActivationFunctionLinear(getDiff())
l0_11 = PineActivationFunctionLinear(getDiff())
l0_12 = PineActivationFunctionLinear(getDiff())
l0_13 = PineActivationFunctionLinear(getDiff())
l0_14 = PineActivationFunctionLinear(getDiff())
 
l1_0 = PineActivationFunctionTanh(l0_0*5.040340774 + l0_1*-1.3025994088 + l0_2*19.4225543981 + l0_3*1.1796960423 + l0_4*2.4299395823 + l0_5*3.159003445 + l0_6*4.6844527551 + l0_7*-6.1079267196 + l0_8*-2.4952869198 + l0_9*-4.0966081154 + l0_10*-2.2432843111 + l0_11*-0.6105764807 + l0_12*-0.0775684605 + l0_13*-0.7984753138 + l0_14*3.4495907342)
l1_1 = PineActivationFunctionTanh(l0_0*5.9559031982 + l0_1*-3.1781960056 + l0_2*-1.6337491061 + l0_3*-4.3623166512 + l0_4*0.9061990402 + l0_5*-0.731285093 + l0_6*-6.2500232251 + l0_7*0.1356087758 + l0_8*-0.8570572885 + l0_9*-4.0161353298 + l0_10*1.5095552083 + l0_11*1.324789197 + l0_12*-0.1011973878 + l0_13*-2.3642090162 + l0_14*-0.7160862442)
l1_2 = PineActivationFunctionTanh(l0_0*4.4350881378 + l0_1*-2.8956461034 + l0_2*1.4199762607 + l0_3*-0.6436844261 + l0_4*1.1124274281 + l0_5*-4.0976954985 + l0_6*2.9317456342 + l0_7*0.0798318393 + l0_8*-5.5718144311 + l0_9*-0.6623352208 +l0_10*3.2405203222 + l0_11*-10.6253384513 + l0_12*4.7132919253 + l0_13*-5.7378151597 + l0_14*0.3164836695)
l1_3 = PineActivationFunctionTanh(l0_0*-6.1194605467 + l0_1*7.7935605604 + l0_2*-0.7587522153 + l0_3*9.8382495905 + l0_4*0.3274314734 + l0_5*1.8424796541 + l0_6*-1.2256355427 + l0_7*-1.5968600758 + l0_8*1.9937700922 + l0_9*5.0417809111 + l0_10*-1.9369944654 + l0_11*6.1013201778 + l0_12*1.5832910747 + l0_13*-2.148403244 + l0_14*1.5449437366)
l1_4 = PineActivationFunctionTanh(l0_0*3.5700040028 + l0_1*-4.4755892733 + l0_2*0.1526702072 + l0_3*-0.3553664401 + l0_4*-2.3777962662 + l0_5*-1.8098849587 + l0_6*-3.5198449134 + l0_7*-0.4369370497 + l0_8*2.3350169623 + l0_9*1.9328960346 + l0_10*1.1824141812 + l0_11*3.0565148049 + l0_12*-9.3253401534 + l0_13*1.6778555498 + l0_14*-3.045794332)
l1_5 = PineActivationFunctionTanh(l0_0*3.6784907623 + l0_1*1.1623683715 + l0_2*7.1366362145 + l0_3*-5.6756546585 + l0_4*12.7019884334 + l0_5*-1.2347823331 + l0_6*2.3656619827 + l0_7*-8.7191778213 + l0_8*-13.8089238753 + l0_9*5.4335943836 + l0_10*-8.1441181338 + l0_11*-10.5688113287 + l0_12*6.3964140758 + l0_13*-8.9714236223 + l0_14*-34.0255456929)
l1_6 = PineActivationFunctionTanh(l0_0*-0.4344517548 + l0_1*-3.8262167437 + l0_2*-0.2051098003 + l0_3*0.6844201221 + l0_4*1.1615893422 + l0_5*-0.404465314 + l0_6*-0.1465747632 + l0_7*-0.006282458 + l0_8*0.1585655487 + l0_9*1.1994484991 + l0_10*-0.9879081404 + l0_11*-0.3564970612 + l0_12*1.5814717823 + l0_13*-0.9614804676 + l0_14*0.9204822346)
l1_7 = PineActivationFunctionTanh(l0_0*-4.2700957175 + l0_1*9.4328591157 + l0_2*-4.3045548 + l0_3*5.0616868842 + l0_4*3.3388781058 + l0_5*-2.1885073225 + l0_6*-6.506301518 + l0_7*3.8429000108 + l0_8*-1.6872237349 + l0_9*2.4107095799 + l0_10*-3.0873985314 + l0_11*-2.8358325447 + l0_12*2.4044366491 + l0_13*0.636779082 + l0_14*-13.2173215035)
l1_8 = PineActivationFunctionTanh(l0_0*-8.3224697492 + l0_1*-9.4825530183 + l0_2*3.5294389835 + l0_3*0.1538618049 + l0_4*-13.5388631898 + l0_5*-0.1187936017 + l0_6*-8.4582741139 + l0_7*5.1566299292 + l0_8*10.345519938 + l0_9*2.9211759333 + l0_10*-5.0471804233 + l0_11*4.9255989983 + l0_12*-9.9626142544 + l0_13*23.0043143258 + l0_14*20.9391809343)
l1_9 = PineActivationFunctionTanh(l0_0*-0.9120518654 + l0_1*0.4991807488 + l0_2*-1.877244586 + l0_3*3.1416466525 + l0_4*1.063709676 + l0_5*0.5210126835 + l0_6*-4.9755780108 + l0_7*2.0336532347 + l0_8*-1.1793121093 + l0_9*-0.730664855 + l0_10*-2.3515987428 + l0_11*-0.1916546514 + l0_12*-2.2530340504 + l0_13*-0.2331829119 + l0_14*0.7216218149)
l1_10 = PineActivationFunctionTanh(l0_0*-5.2139618683 + l0_1*1.0663790028 + l0_2*1.8340834959 + l0_3*1.6248173447 + l0_4*-0.7663740145 + l0_5*0.1062788171 + l0_6*2.5288021501 + l0_7*-3.4066549066 + l0_8*-4.9497988755 + l0_9*-2.3060668143 + l0_10*-1.3962486274 + l0_11*0.6185583427 + l0_12*0.2625299576 + l0_13*2.0270246444 + l0_14*0.6372015811)
l1_11 = PineActivationFunctionTanh(l0_0*0.2020072665 + l0_1*0.3885852709 + l0_2*-0.1830248843 + l0_3*-1.2408598444 + l0_4*-0.6365798088 + l0_5*1.8736534268 + l0_6*0.656206442 + l0_7*-0.2987482678 + l0_8*-0.2017485963 + l0_9*-1.0604095303 + l0_10*0.239793356 + l0_11*-0.3614172938 + l0_12*0.2614678044 + l0_13*1.0083551762 + l0_14*-0.5473833797)
l1_12 = PineActivationFunctionTanh(l0_0*-0.4367517149 + l0_1*-10.0601304934 + l0_2*1.9240604838 + l0_3*-1.3192184047 + l0_4*-0.4564760159 + l0_5*-0.2965270368 + l0_6*-1.1407423613 + l0_7*2.0949647291 + l0_8*-5.8212599297 + l0_9*-1.3393321939 + l0_10*7.6624548265 + l0_11*1.1309391851 + l0_12*-0.141798054 + l0_13*5.1416736187 + l0_14*-1.8142503125)
l1_13 = PineActivationFunctionTanh(l0_0*1.103948336 + l0_1*-1.4592033032 + l0_2*0.6146278432 + l0_3*0.5040966421 + l0_4*-2.4276090772 + l0_5*-0.0432902426 + l0_6*-0.0044259999 + l0_7*-0.5961347308 + l0_8*0.3821026107 + l0_9*0.6169102373 +l0_10*-0.1469847611 + l0_11*-0.0717167683 + l0_12*-0.0352403695 + l0_13*1.2481310788 + l0_14*0.1339628411)
l1_14 = PineActivationFunctionTanh(l0_0*-9.8049980534 + l0_1*13.5481068519 + l0_2*-17.1362809025 + l0_3*0.7142100864 + l0_4*4.4759163422 + l0_5*4.5716161777 + l0_6*1.4290884628 + l0_7*8.3952862712 + l0_8*-7.1613700432 + l0_9*-3.3249489518+ l0_10*-0.7789587912 + l0_11*-1.7987628873 + l0_12*13.364752545 + l0_13*5.3947219678 + l0_14*12.5267547127)
l1_15 = PineActivationFunctionTanh(l0_0*0.9869461803 + l0_1*1.9473351905 + l0_2*2.032925759 + l0_3*7.4092080633 + l0_4*-1.9257741399 + l0_5*1.8153585328 + l0_6*1.1427866392 + l0_7*-0.3723167449 + l0_8*5.0009927384 + l0_9*-0.2275103411 + l0_10*2.8823012914 + l0_11*-3.0633141934 + l0_12*-2.785334815 + l0_13*2.727981E-4 + l0_14*-0.1253009512)
l1_16 = PineActivationFunctionTanh(l0_0*4.9418118585 + l0_1*-2.7538199876 + l0_2*-16.9887588104 + l0_3*8.8734475297 + l0_4*-16.3022734814 + l0_5*-4.562496601 + l0_6*-1.2944373699 + l0_7*-9.6022946986 + l0_8*-1.018393866 + l0_9*-11.4094515429 + l0_10*24.8483091382 + l0_11*-3.0031522277 + l0_12*0.1513114555 + l0_13*-6.7170487021 + l0_14*-14.7759227576)
l1_17 = PineActivationFunctionTanh(l0_0*5.5931454656 + l0_1*2.22272078 + l0_2*2.603416897 + l0_3*1.2661196599 + l0_4*-2.842826446 + l0_5*-7.9386099121 + l0_6*2.8278849111 + l0_7*-1.2289445238 + l0_8*4.571484248 + l0_9*0.9447425595 + l0_10*4.2890688351 + l0_11*-3.3228258483 + l0_12*4.8866215526 + l0_13*1.0693412194 + l0_14*-1.963203112)
l1_18 = PineActivationFunctionTanh(l0_0*0.2705520264 + l0_1*0.4002328199 + l0_2*0.1592515845 + l0_3*0.371893552 + l0_4*-1.6639467871 + l0_5*2.2887318884 + l0_6*-0.148633664 + l0_7*-0.6517792263 + l0_8*-0.0993032992 + l0_9*-0.964940376 + l0_10*0.1286342935 + l0_11*0.4869943595 + l0_12*1.4498648166 + l0_13*-0.3257333384 + l0_14*-1.3496419812)
l1_19 = PineActivationFunctionTanh(l0_0*-1.3223200798 + l0_1*-2.2505204324 + l0_2*0.8142804525 + l0_3*-0.848348177 + l0_4*0.7208860589 + l0_5*1.2033423756 + l0_6*-0.1403005786 + l0_7*0.2995941644 + l0_8*-1.1440473062 + l0_9*1.067752916 + l0_10*-1.2990534679 + l0_11*1.2588583869 + l0_12*0.7670409455 + l0_13*2.7895972983 + l0_14*-0.5376152512)
l1_20 = PineActivationFunctionTanh(l0_0*0.7382351572 + l0_1*-0.8778865631 + l0_2*1.0950766363 + l0_3*0.7312146997 + l0_4*2.844781386 + l0_5*2.4526730903 + l0_6*-1.9175165077 + l0_7*-0.7443755288 + l0_8*-3.1591419438 + l0_9*0.8441602697 + l0_10*1.1979484448 + l0_11*2.138098544 + l0_12*0.9274159536 + l0_13*-2.1573448803 + l0_14*-3.7698356464)
l1_21 = PineActivationFunctionTanh(l0_0*5.187120117 + l0_1*-7.7525670576 + l0_2*1.9008346975 + l0_3*-1.2031603996 + l0_4*5.917669142 + l0_5*-3.1878682719 + l0_6*1.0311747828 + l0_7*-2.7529484612 + l0_8*-1.1165884578 + l0_9*2.5524942323 + l0_10*-0.38623241 + l0_11*3.7961317445 + l0_12*-6.128820883 + l0_13*-2.1470707709 + l0_14*2.0173792965)
l1_22 = PineActivationFunctionTanh(l0_0*-6.0241676562 + l0_1*0.7474455584 + l0_2*1.7435724844 + l0_3*0.8619835076 + l0_4*-0.1138406797 + l0_5*6.5979359352 + l0_6*1.6554154348 + l0_7*-3.7969458806 + l0_8*1.1139097376 + l0_9*-1.9588417 + l0_10*3.5123392221 + l0_11*9.4443103128 + l0_12*-7.4779291395 + l0_13*3.6975940671 + l0_14*8.5134262747)
l1_23 = PineActivationFunctionTanh(l0_0*-7.5486576471 + l0_1*-0.0281420865 + l0_2*-3.8586839454 + l0_3*-0.5648792233 + l0_4*-7.3927282026 + l0_5*-0.3857538046 + l0_6*-2.9779885698 + l0_7*4.0482279965 + l0_8*-1.1522499578 + l0_9*-4.1562500212 + l0_10*0.7813134307 + l0_11*-1.7582667612 + l0_12*1.7071109988 + l0_13*6.9270873208 + l0_14*-4.5871357362)
l1_24 = PineActivationFunctionTanh(l0_0*-5.3603442228 + l0_1*-9.5350611629 + l0_2*1.6749984422 + l0_3*-0.6511065892 + l0_4*-0.8424823239 + l0_5*1.9946675213 + l0_6*-1.1264361638 + l0_7*0.3228676616 + l0_8*5.3562230396 + l0_9*-1.6678168952+ l0_10*1.2612580068 + l0_11*-3.5362671399 + l0_12*-9.3895191366 + l0_13*2.0169228673 + l0_14*-3.3813191557)
l1_25 = PineActivationFunctionTanh(l0_0*1.1362866429 + l0_1*-1.8960071702 + l0_2*5.7047307243 + l0_3*-1.6049785053 + l0_4*-4.8353898931 + l0_5*-1.4865381145 + l0_6*-0.2846893475 + l0_7*2.2322095997 + l0_8*2.0930488668 + l0_9*1.7141411002 + l0_10*-3.4106032176 + l0_11*3.0593289612 + l0_12*-5.0894813904 + l0_13*-0.5316299133 + l0_14*0.4705265416)
l1_26 = PineActivationFunctionTanh(l0_0*-0.9401400975 + l0_1*-0.9136086957 + l0_2*-3.3808688582 + l0_3*4.7200776773 + l0_4*3.686296919 + l0_5*14.2133723935 + l0_6*1.5652940954 + l0_7*-0.2921139433 + l0_8*1.0244504511 + l0_9*-7.6918299134 + l0_10*-0.594936135 + l0_11*-1.4559914156 + l0_12*2.8056435224 + l0_13*2.6103905733 + l0_14*2.3412348872)
l1_27 = PineActivationFunctionTanh(l0_0*1.1573980186 + l0_1*2.9593661909 + l0_2*0.4512594325 + l0_3*-0.9357210858 + l0_4*-1.2445804495 + l0_5*4.2716471631 + l0_6*1.5167912375 + l0_7*1.5026853293 + l0_8*1.3574772038 + l0_9*-1.9754386842 + l0_10*6.727671436 + l0_11*8.0145772889 + l0_12*7.3108970663 + l0_13*-2.5005627841 + l0_14*8.9604502277)
l1_28 = PineActivationFunctionTanh(l0_0*6.3576350212 + l0_1*-2.9731672725 + l0_2*-2.7763558082 + l0_3*-3.7902984555 + l0_4*-1.0065574585 + l0_5*-0.7011836061 + l0_6*-1.0298068578 + l0_7*1.201007784 + l0_8*-0.7835862254 + l0_9*-3.9863597435 + l0_10*6.7851825502 + l0_11*1.1120256721 + l0_12*-2.263287351 + l0_13*1.8314374104 + l0_14*-2.279102097)
l1_29 = PineActivationFunctionTanh(l0_0*-7.8741911036 + l0_1*-5.3370618518 + l0_2*11.9153868964 + l0_3*-4.1237170553 + l0_4*2.9491152758 + l0_5*1.0317132502 + l0_6*2.2992199883 + l0_7*-2.0250502364 + l0_8*-11.0785995839 + l0_9*-6.3615588554 + l0_10*-1.1687644976 + l0_11*6.3323478015 + l0_12*6.0195076962 + l0_13*-2.8972208702 + l0_14*3.6107747183)
 
l2_0 = PineActivationFunctionTanh(l1_0*-0.590546797 + l1_1*0.6608304658 + l1_2*-0.3358268839 + l1_3*-0.748530283 + l1_4*-0.333460383 + l1_5*-0.3409307681 + l1_6*0.1916558198 + l1_7*-0.1200399453 + l1_8*-0.5166151854 + l1_9*-0.8537164676 +l1_10*-0.0214448647 + l1_11*-0.553290271 + l1_12*-1.2333302892 + l1_13*-0.8321813811 + l1_14*-0.4527761741 + l1_15*0.9012545631 + l1_16*0.415853215 + l1_17*0.1270548319 + l1_18*0.2000460279 + l1_19*-0.1741942671 + l1_20*0.419830522 + l1_21*-0.059839291 + l1_22*-0.3383001769 + l1_23*0.1617814073 + l1_24*0.3071848006 + l1_25*-0.3191182045 + l1_26*-0.4981831822 + l1_27*-1.467478375 + l1_28*-0.1676432563 + l1_29*1.2574849126)
l2_1 = PineActivationFunctionTanh(l1_0*-0.5514235841 + l1_1*0.4759190049 + l1_2*0.2103576983 + l1_3*-0.4754377924 + l1_4*-0.2362941295 + l1_5*0.1155082119 + l1_6*0.7424215794 + l1_7*-0.3674198672 + l1_8*0.8401574461 + l1_9*0.6096563193 + l1_10*0.7437935674 + l1_11*-0.4898638101 + l1_12*-0.4168668092 + l1_13*-0.0365111095 + l1_14*-0.342675224 + l1_15*0.1870268765 + l1_16*-0.5843050987 + l1_17*-0.4596547471 + l1_18*0.452188522 + l1_19*-0.6737126684 + l1_20*0.6876072741 + l1_21*-0.8067776704 + l1_22*0.7592979467 + l1_23*-0.0768239468 + l1_24*0.370536097 + l1_25*-0.4363884671 + l1_26*-0.419285676 + l1_27*0.4380251141 + l1_28*0.0822528948 + l1_29*-0.2333910809)
l2_2 = PineActivationFunctionTanh(l1_0*-0.3306539521 + l1_1*-0.9382247194 + l1_2*0.0746711276 + l1_3*-0.3383838985 + l1_4*-0.0683232217 + l1_5*-0.2112358049 + l1_6*-0.9079234054 + l1_7*0.4898595603 + l1_8*-0.2039825863 + l1_9*1.0870698641+ l1_10*-1.1752901237 + l1_11*1.1406403923 + l1_12*-0.6779626786 + l1_13*0.4281048906 + l1_14*-0.6327670055 + l1_15*-0.1477678844 + l1_16*0.2693637584 + l1_17*0.7250738509 + l1_18*0.7905904504 + l1_19*-1.6417250883 + l1_20*-0.2108095534 +l1_21*-0.2698557472 + l1_22*-0.2433656685 + l1_23*-0.6289943273 + l1_24*0.436428207 + l1_25*-0.8243825184 + l1_26*-0.8583496686 + l1_27*0.0983131026 + l1_28*-0.4107462518 + l1_29*0.5641683087)
l2_3 = PineActivationFunctionTanh(l1_0*1.7036869992 + l1_1*-0.6683507666 + l1_2*0.2589197112 + l1_3*0.032841148 + l1_4*-0.4454796342 + l1_5*-0.6196149423 + l1_6*-0.1073622976 + l1_7*-0.1926393101 + l1_8*1.5280232458 + l1_9*-0.6136527036 +l1_10*-1.2722934357 + l1_11*0.2888655811 + l1_12*-1.4338638512 + l1_13*-1.1903556863 + l1_14*-1.7659663905 + l1_15*0.3703086867 + l1_16*1.0409140889 + l1_17*0.0167382209 + l1_18*0.6045646461 + l1_19*4.2388788116 + l1_20*1.4399738234 + l1_21*0.3308571935 + l1_22*1.4501137667 + l1_23*0.0426123724 + l1_24*-0.708479795 + l1_25*-1.2100800732 + l1_26*-0.5536278651 + l1_27*1.3547250573 + l1_28*1.2906250286 + l1_29*0.0596007114)
l2_4 = PineActivationFunctionTanh(l1_0*-0.462165126 + l1_1*-1.0996742176 + l1_2*1.0928262999 + l1_3*1.806407067 + l1_4*0.9289147669 + l1_5*0.8069022793 + l1_6*0.2374237802 + l1_7*-2.7143979019 + l1_8*-2.7779203877 + l1_9*0.214383903 + l1_10*-1.3111536623 + l1_11*-2.3148813568 + l1_12*-2.4755355804 + l1_13*-0.6819733236 + l1_14*0.4425615226 + l1_15*-0.1298218043 + l1_16*-1.1744832824 + l1_17*-0.395194848 + l1_18*-0.2803397703 + l1_19*-0.4505071197 + l1_20*-0.8934956598 + l1_21*3.3232916348 + l1_22*-1.7359534851 + l1_23*3.8540421743 + l1_24*1.4424032523 + l1_25*0.2639823693 + l1_26*0.3597053634 + l1_27*-1.0470693728 + l1_28*1.4133480357 + l1_29*0.6248098695)
l2_5 = PineActivationFunctionTanh(l1_0*0.2215807411 + l1_1*-0.5628295071 + l1_2*-0.8795982905 + l1_3*0.9101585104 + l1_4*-1.0176831976 + l1_5*-0.0728884401 + l1_6*0.6676331658 + l1_7*-0.7342174108 + l1_8*9.4428E-4 + l1_9*0.6439774272 + l1_10*-0.0345236026 + l1_11*0.5830977027 + l1_12*-0.4058921837 + l1_13*-0.3991888077 + l1_14*-1.0090426973 + l1_15*-0.9324780698 + l1_16*-0.0888749165 + l1_17*0.2466351736 + l1_18*0.4993304601 + l1_19*-1.115408696 + l1_20*0.9914246705 + l1_21*0.9687743445 + l1_22*0.1117130875 + l1_23*0.7825109733 + l1_24*0.2217023612 + l1_25*0.3081256411 + l1_26*-0.1778007966 + l1_27*-0.3333287743 + l1_28*1.0156352461 + l1_29*-0.1456257813)
l2_6 = PineActivationFunctionTanh(l1_0*-0.5461783383 + l1_1*0.3246015999 + l1_2*0.1450605434 + l1_3*-1.3179944349 + l1_4*-1.5481775261 + l1_5*-0.679685633 + l1_6*-0.9462335139 + l1_7*-0.6462399371 + l1_8*0.0991658683 + l1_9*0.1612892194 +l1_10*-1.037660602 + l1_11*-0.1044778824 + l1_12*0.8309203243 + l1_13*0.7714766458 + l1_14*0.2566767663 + l1_15*0.8649416329 + l1_16*-0.5847461285 + l1_17*-0.6393969272 + l1_18*0.8014049359 + l1_19*0.2279568228 + l1_20*1.0565217821 + l1_21*0.134738029 + l1_22*0.3420395576 + l1_23*-0.2417397219 + l1_24*0.3083072038 + l1_25*0.6761739059 + l1_26*-0.4653817053 + l1_27*-1.0634057566 + l1_28*-0.5658892281 + l1_29*-0.6947283681)
l2_7 = PineActivationFunctionTanh(l1_0*-0.5450410944 + l1_1*0.3912849372 + l1_2*-0.4118641117 + l1_3*0.7124695074 + l1_4*-0.7510266122 + l1_5*1.4065673913 + l1_6*0.9870731545 + l1_7*-0.2609363107 + l1_8*-0.3583639958 + l1_9*0.5436375706 +l1_10*0.4572450099 + l1_11*-0.4651538878 + l1_12*-0.2180218212 + l1_13*0.5241262959 + l1_14*-0.8529323253 + l1_15*-0.4200378937 + l1_16*0.4997885721 + l1_17*-1.1121528189 + l1_18*0.5992411048 + l1_19*-1.0263270781 + l1_20*-1.725160642 + l1_21*-0.2653995722 + l1_22*0.6996703032 + l1_23*0.348549086 + l1_24*0.6522482482 + l1_25*-0.7931928436 + l1_26*-0.5107994359 + l1_27*0.0509642698 + l1_28*0.8711187423 + l1_29*0.8999449627)
l2_8 = PineActivationFunctionTanh(l1_0*-0.7111081522 + l1_1*0.4296245062 + l1_2*-2.0720732038 + l1_3*-0.4071818684 + l1_4*1.0632721681 + l1_5*0.8463224325 + l1_6*-0.6083948423 + l1_7*1.1827669608 + l1_8*-0.9572307844 + l1_9*-0.9080517673 + l1_10*-0.0479029057 + l1_11*-1.1452853213 + l1_12*0.2884352688 + l1_13*0.1767851586 + l1_14*-1.089314461 + l1_15*1.2991763966 + l1_16*1.6236630806 + l1_17*-0.7720263697 + l1_18*-0.5011541755 + l1_19*-2.3919413568 + l1_20*0.0084018338 + l1_21*0.9975216139 + l1_22*0.4193541029 + l1_23*1.4623834571 + l1_24*-0.6253069691 + l1_25*0.6119677341 + l1_26*0.5423948388 + l1_27*1.0022450377 + l1_28*-1.2392984069 + l1_29*1.5021529822)
 
l3_0 = PineActivationFunctionTanh(l2_0*0.3385061186 + l2_1*0.6218531956 + l2_2*-0.7790340983 + l2_3*0.1413078332 + l2_4*0.1857010624 + l2_5*-0.1769456351 + l2_6*-0.3242337911 + l2_7*-0.503944883 + l2_8*0.1540568869)
 
buying = l3_0 > threshold ? true : l3_0 < -threshold ? false : buying[1]

hline(0, title="base line")
//bgcolor(l3_0 > 0.0014 ? green : l3_0 < -0.0014 ? red : gray, transp=20)
bgcolor(buying ? green : red, transp=20)
plot(l3_0, color=silver, style=area, transp=75)
plot(l3_0, color=aqua, title="prediction")

longCondition = buying
if (longCondition)
    strategy.entry("Long", strategy.long)

shortCondition = buying != true
if (shortCondition)
    strategy.entry("Short", strategy.short)
It is not working.... , does not display indicator when you add to the chart,
+1 Reply
sirolf2009 PRO sudhir.mehta
hmmm, strange. When i create a new chart and add this from the public library it won't compile. But when I press "show source" and "add to chart" from the pine editor it works
Reply
MarxBabu PRO sirolf2009
@sirolf2009, trend can be seen here with this
SUPER SUPERTREND THREE LINE PROFIT STRATEGY

Reply
forexmodi sudhir.mehta
same here,
+1 Reply
MarxBabu PRO sudhir.mehta
IMPORTANT : EACH ONE OF YOUR VOTE bring this most powerful feature come true and be available in Tradingview.This is best indicator and Screener option needed.Please vote your count in this link please
https://getsatisfaction.com/tradingview/topics/supertrend-v1-0-v5-0-most-powerful-and-profitable-indicator?rfm=1
Reply
again it did not work...
Reply
can you send the navigation you followed?
Reply
sirolf2009 PRO sudhir.mehta
I didn't follow a navigation, I added this script to my favorites, created a new chart and added it from my favorites.
I forwarded this to the admin, I don't think this is a fault on my side but rather a bug in trading view
Reply
IvanLabrie PRO sirolf2009
Agreed, can't get any strategy to show up.
+1 Reply
Thanks for sharing, i followed the navigation you sent but did not work. Hope issue will be resolved by TW. Thanks!
+1 Reply
Wow. What a perfomance!
+1 Reply
Very good results...nice coding.
Reply
hi i am not able to run it, i added to my favorites and it disappears when put on a chart. i am running tw on chrome.
Reply
sirolf2009 PRO sudhir.mehta
The admin made this a recommended strategy, so you should be able to find it in the public library now. Could you try and add it from there?
Reply
Please send me navigation to Recommended Strategy, I do not know where it is located? Thanks!
Reply
sirolf2009 PRO sudhir.mehta
When you're looking at a chart, there's a button in the top called "indicators". If you press it, a dialog pops up. There's a search bar in the top left. Type ANN strategy and then click on the item in the list on the right
Reply
It did not work. Thanks for your time.
Reply
Doesnt work,,it shows it's compiling and disappears... odd
Reply
Apparently strategies are still in beta and are only open to a few members. Try again in a day or two
Reply
TASAVANT sirolf2009
Ok good to know hopefully we will get them soon too
Reply
TASAVANT sirolf2009
It works now, see TV made some good chnges again.
Reply
hey, it seems very good strategy. my question, it seems indicator comes one bar late. than we always enter and exit one bar late, isnt it? if answer is yes than we cannot trust backtest results isnt it or is there any other way?
+2 Reply
It recalculates at the end of the daily bar, That's how it was trained and that's how it's being used. I might add some more options later on for different timeframes and input sources etc...
Reply
jackvmk sirolf2009
it still seems good one bar late. i will test it at demo account. any idea for where stop loss? i think 2 atr now.
Reply
Does it work on any currencies?
+11 Reply
Thank you , it really works, thanks once again
Reply
Great Indicator!!! Thanks for sharing and excellent indicator!!!!!!!!!!!!!!
Reply
Looks like a good strategy, but do you use stop loss?
Reply
I'm hacking this to get a nice profit on EURUSD. Thanks for the code! <3
"
yesterday=security(tickerid, 'D', ohlc4)
today=security(tickerid, 'D', ohlc4)
"
+3 Reply
age0110 UrbiGT
Do you mean by just changing yesterday setting? From yesterday=security(tickerid, 'D', ohlc4) to yesterday=security(tickerid, 'D', ohlc4)?
Reply
age0110 age0110
I meant ohlc4 to ohlc4
+1 Reply
age0110 age0110
Ohlc4 to ohlc
Reply
age0110 age0110
Ohlc4 to ohlc4 .. ? Sorry but '[' is removed if I typed normally
Reply
removing the 1 in brackets makes no sense, that would mean the input would be the percentual differences between today and today. Which is and always will be 0
Reply
age0110 sirolf2009
So what do you mean by hacking this to get good profit on EURISD? I'm trying to do the same thing..are you able to share the code that make the strategy work for EURUSD? Thanks!
Reply
UrbiGT age0110
from D in both to 240 http://s17.postimg.org/nb4bwp1q6/fewre.jpg
Reply
jackvmk UrbiGT
what do you mean, could you send your hack code, because indicator repainting?
Reply
UrbiGT jackvmk
Meaby I will leave this like a secret... Muahahaha.
Reply
jackvmk UrbiGT
no way : ) if you change time frame D to 240 only and look H chart, it is still repainting. backtest results great, because signal place are moving after price.
+1 Reply
UrbiGT jackvmk
Change the recalculate on every tick, and test it with real. I have a bot working with it since yesterday. +95 pips ^^
Reply
UrbiGT jackvmk
Also change the timeframe of your chart to something lower
Reply
jackvmk UrbiGT
bro, if you look lower time frame, example 30 minute, and use indicator with setting 4H, what is happening? example, it is giving buy signal, ok, we are entering trade, but suddenly price can go down. we are losing money now and suddenly after 4 hour, indicator recalculates situation and deletes buy signal which we enter with it. it is repainting you know.
+2 Reply
jackvmk jackvmk
snapshot
+5 Reply
UrbiGT jackvmk
Okay, I trust you. But while that, It's working for me. You should think that "repaint signal" like a "breakeven" or something similar, for now I have my bot sending me Telegrams each time that it trade, and from 4 trades it gave me 3 good ones, with a good profit. +100pips vs -5pips. So, while this work with my bot, i will be playing with fire, after all, it's better than any of my other indicators. (Two of my indicators gave me similar signals)
Reply
jackvmk UrbiGT
i tihnk it is crayz nice coding and there must be one way for better use it, but i didnt find way yet.
Reply
It's funny how using different timeframes will also give you different test results
http://i.imgur.com/OLXKTMs.png
+2 Reply
UrbiGT sirolf2009
Yay! I got ***** by todays pump on eurusd by bad US data. Then the script did a repaint in my offine chart, but in the online chart worked fine. Lose a bunch of $ but won also a lot. I changed again the timeframes. 15m for the chart, 240m for todays and 120 for yesterdays. Also threshold at 0.01 ... Now works better, more trades, less winrate but more money and more "responsive"...
+2 Reply
can you share your final working / modified version?

Reply
pcmourao sirolf2009
That's because the backtest doesn't go back as far....look at te number of trades....1 min chart may give you 100% profitability.
Reply
Coinhike sirolf2009
I think different time frame could be use to validate one signal. By the way, could explain what is the logic behind this strategy and what all these numbers mean please ? thx
Reply
Exactly. I use hourly timeframes, Sirolf2009 says it's built for daily! I know for a fact that 45 Mins timeframe won't be a good idea espically with a pair like AUDNZD. That's not a good pair to use.
Reply
Hi, did you say you have a bot on telegram that alert you about this? that bot is public? can we use that bot?
Reply
Hi, did you say you have a bot on telegram that alert you about this? that bot is public? can we use that bot?
Reply
great work.
thank you!
+2 Reply
age0110 metmet
[ num
Reply
Hello!
Why indicator data as it moves smeschayutsya schedule .
that is, initially starting a long position has been identified 09/30/2015 at 9-00 , and then moved to the beginning of Long 09/29/2015 20-30 ???
Reply
sirolf2009 PRO cventarnyh
"smeschayutsya" not even google knows this word :)
I think this is a tradingview thing. It waits for the end of the bar to execute any orders, the orders are then moved the the open of the next bar
+1 Reply
Thanks for the strategy. I'm not sure if I can trust this code. In the 'getDiff' function, there's a part which returns a difference between ohlc4 of today and yesterday. It makes looking good previous orders but passed orders can be removed or added at some point of past in lower time frame than day one.
For example, whole trend is bear and the indicator is red so no buy signal was made but at the end of the day, the price goes up in a big scale and 'getDiff' function will return a positive value or signal so whole day's value of indicator will be turned into a green one. As a result, there'll be a 'looking good buy signal' which we never can take. Like repainting MT4 indicator.

I'm kind of newbie here. So if I know wrong please forgive me and teach me.
Sorry for my bad english anyway.
+5 Reply
jackvmk netproject
you right, it's repainting when look lower time frame.
+4 Reply
jackvmk jackvmk
but, it is very good coding, there must be some potential but not on this way.
Reply
I am testing the strategy on the USDJPY an dother pairs and I have noticed that it generates false signals. Signals appear and after some time they are gone.
Reply
i'm sure this work is great.
thank you a lot.

i use it in 1' tf with 10' data.
the code as it is does repaint.
but i solve the problem mixing first version of ann with version 2.0
;p
Reply
hi metmet

can you share your version?
Reply
can you share your final vesion? please
Reply
it can't be solved by mixing those two versions together. it's a much bigger issue. the whole thing needs to be retrained
Reply
Could you please explain the rationale behind the code?
Reply
woohoo! 100 likes :D
Reply
Thanks for this contentious strategy, any chance you could direct your fellow traders to more education resources to play with the regression model and re-run the regression with other inputs?
Reply
Awesome work amazing stats!! I can't seem to set up an alert, am I missing something?? Thanks
Reply
andreas73 UrbanNiche
its repainting only to use if you need some sort of sentiment of the market but therefore I recommend the murrey math oscillator , if i am wrong, how we can use this ann strategy?
+1 Reply
Thanks for the response, I'm a newbie so learning as I go.
Reply
How to train USDRUB???
Reply
YaroslavG YaroslavG
https://imgur.com/delete/n1ciSykeYvXDowL
Reply
so... how did you manage to do this?
Reply
YaroslavG sirolf2009
http://smart-lab.ru/uploads/images/03/57/73/2015/11/05/006ee1.png
I picked it by trying. If I find a relationship, I'll let you know about it
Reply
UrbanNiche PRO sirolf2009
not sure how the above image was done but I'm finding good results from combining different time frames with different settings using the larger settings for direction and smaller for entries:

1: 5min with 120min yesterday and 240min today
2: 5min with 15min yesterday and 30min today
3: 1min with 5min yesterday and 15min today
Reply
YaroslavG UrbanNiche
like this
//@version=2
strategy("My Strategy", overlay=true)
//src = close, len = 1
//out = sma(src, len)
tim=input('160')
out1 = security(tickerid, tim, open)
out2 = security(tickerid, tim, close)
plot(out1,color=red)
//plot(security(tickerid, 'D', close))
plot(out2,color=green)
//plot(security(tickerid, 'D', close),color=red)
//plot(security(tickerid, 'D', ohlc4), color=red)
//plot(security(tickerid, 'D', ohlc4), color=black)
//longCondition = crossover(security(tickerid, 'D', ohlc4), security(tickerid, 'D', ohlc4))
longCondition = crossover(security(tickerid, tim, close),security(tickerid, tim, open))
if (longCondition)
strategy.entry("long", strategy.long)
shortCondition = crossunder(security(tickerid, tim, close),security(tickerid, tim, open))
//shortCondition = crossunder(security(tickerid, 'D', ohlc4), security(tickerid, 'D', ohlc4))
if (shortCondition)
strategy.entry("short", strategy.short)
;)
+2 Reply
I've copied and pasted the code but not working, please advise??
Reply
YaroslavG UrbanNiche
You have error? write it
Reply
line 17:0 missing BEGIN at '|B|'
Reply
YaroslavG UrbanNiche
I et it ;)
snapshot

remove the smile at the end of the code;)
Reply
I didn't have this in still error

//@version=2
strategy("My Strategy", overlay=true)
//src = close, len = 1
//out = sma(src, len)
tim=input('160')
out1 = security(tickerid, tim, open)
out2 = security(tickerid, tim, close)
plot(out1,color=red)
//plot(security(tickerid, 'D', close))
plot(out2,color=green)
//plot(security(tickerid, 'D', close),color=red)
//plot(security(tickerid, 'D', ohlc4), color=red)
//plot(security(tickerid, 'D', ohlc4), color=black)
//longCondition = crossover(security(tickerid, 'D', ohlc4), security(tickerid, 'D', ohlc4))
longCondition = crossover(security(tickerid, tim, close),security(tickerid, tim, open))
if (longCondition)
strategy.entry("long", strategy.long)
shortCondition = crossunder(security(tickerid, tim, close),security(tickerid, tim, open))
//shortCondition = crossunder(security(tickerid, 'D', ohlc4), security(tickerid, 'D', ohlc4))
if (shortCondition)
strategy.entry("short", strategy.short)
Reply
YaroslavG UrbanNiche
write me in skype: yaroslav_corporation
Reply
YaroslavG UrbanNiche
https://imgur.com/h6ORTqk
Reply
sirolf2009 PRO UrbanNiche
You have to type tabs before
strategy.entry("long", strategy.long)
and
strategy.entry("short", strategy.short)
Reply
UrbanNiche PRO sirolf2009
thanks, it's always a small thing in code ;)
Reply
YaroslavG sirolf2009
What did you mean?
Reply
sebasaspe PRO YaroslavG
i keep getting buy/sell signals on a 160 period, but they arent looking as randomly spaced in time as yours. any suggestions? im using the 5 and 15 minute charts
Reply
Do all strategies on here repaint?
Reply
cristian.d UrbanNiche
Not all.. but have you tried the pinescript that Yaroslav posted? Does it repaint?
Reply
olmodelcaz cristian.d
Yes, it repaints in my charts
Reply
UrbanNiche PRO olmodelcaz
It's very annoying that they repaint. Which ones don't?
Reply
sirolf2009 PRO UrbanNiche
If you guys are really so bothered by it, have a fix!
ANN Strategy v2
Reply
is great, but how can I use it to lower time frame
+1 Reply
Well, please, this is for all, use your minds!!!

If you have included in the strategy script the data of the last 3 years and you are testing last 3 years? logically the script knows that happened during this time.

if the indicator knows the price of a period because is included in the script, then this indicator is lousy...

;)
+1 Reply
Biased indicator that changes with time.
+4 Reply
Hello, please tell me the strategy redraws the past performance?
Reply
Hey sirolf2009, great coding. I'm not to familiar with coding but I would like to send an idea out there. How hard would it be to create a strategy or script that auto identifies patterns in the market that adapts to timeframes which basically draws trendiness on the pattern and gives a signal to buy or sell on the breakout of the pattern and give you the expected price target as well?
Reply
Hello! I commented out almost all strategy. It gives the same results. I realized that she was looking to the future.
see this. It works as a strategy
GetTrendStrategy

//@version=2
strategy("ANN Strategy")

threshold = input(title="Threshold", type=float, defval=0.0014, step=0.0001)

getDiff() =>
yesterday=security(tickerid, 'D', ohlc4)
today=security(tickerid, 'D', ohlc4)
delta=today-yesterday
percentage=delta/yesterday

PineActivationFunctionLinear(v) => v
PineActivationFunctionTanh(v) =>
(exp(v) - exp(-v))/(exp(v) + exp(-v))

l0_0 = PineActivationFunctionLinear(getDiff())
l0_1 = PineActivationFunctionLinear(getDiff())
l0_2 = PineActivationFunctionLinear(getDiff())
l0_3 = PineActivationFunctionLinear(getDiff())
l0_4 = PineActivationFunctionLinear(getDiff())
l0_5 = PineActivationFunctionLinear(getDiff())
l0_6 = PineActivationFunctionLinear(getDiff())
l0_7 = PineActivationFunctionLinear(getDiff())
l0_8 = PineActivationFunctionLinear(getDiff())
l0_9 = PineActivationFunctionLinear(getDiff())
l0_10 = PineActivationFunctionLinear(getDiff())
l0_11 = PineActivationFunctionLinear(getDiff())
l0_12 = PineActivationFunctionLinear(getDiff())
l0_13 = PineActivationFunctionLinear(getDiff())
l0_14 = PineActivationFunctionLinear(getDiff())

l1_0 = PineActivationFunctionTanh(0)
l1_1 = PineActivationFunctionTanh(0)
l1_2 = PineActivationFunctionTanh(0)
l1_3 = PineActivationFunctionTanh(0)
l1_4 = PineActivationFunctionTanh(0)
l1_5 = PineActivationFunctionTanh(0)
l1_6 = PineActivationFunctionTanh(0)
l1_7 = PineActivationFunctionTanh(0)
l1_8 = PineActivationFunctionTanh(0)
l1_9 = PineActivationFunctionTanh(0)
l1_10 = PineActivationFunctionTanh(0)
l1_11 = PineActivationFunctionTanh(0)
l1_12 = PineActivationFunctionTanh(0)
l1_13 = PineActivationFunctionTanh(0)
l1_14 = PineActivationFunctionTanh(0)
l1_15 = PineActivationFunctionTanh(0)
l1_16 = PineActivationFunctionTanh(0)
l1_17 = PineActivationFunctionTanh(0)
l1_18 = PineActivationFunctionTanh(0)
l1_19 = PineActivationFunctionTanh(0)
l1_20 = PineActivationFunctionTanh(0)
l1_21 = PineActivationFunctionTanh(0)
l1_22 = PineActivationFunctionTanh(0)
l1_23 = PineActivationFunctionTanh(0)
l1_24 = PineActivationFunctionTanh(0)
l1_25 = PineActivationFunctionTanh(0)
l1_26 = PineActivationFunctionTanh(0)
l1_27 = PineActivationFunctionTanh(l0_6*1.5167912375 + l0_7*1.5026853293 + l0_8*1.3574772038 + l0_9*-1.9754386842 + l0_10*6.727671436 + l0_11*8.0145772889)
l1_28 = PineActivationFunctionTanh(0)
l1_29 = PineActivationFunctionTanh(0)

l2_0 = PineActivationFunctionTanh(0)
l2_1 = PineActivationFunctionTanh(0)
l2_2 = PineActivationFunctionTanh(0)
l2_3 = PineActivationFunctionTanh(0)
l2_4 = PineActivationFunctionTanh(0)
l2_5 = PineActivationFunctionTanh(0)
l2_6 = PineActivationFunctionTanh(0)
l2_7 = PineActivationFunctionTanh(0)
l2_8 = PineActivationFunctionTanh(l1_27*1.0022450377)

l3_0 = PineActivationFunctionTanh(l2_8*0.1540568869)

buying = l3_0 > threshold ? true : l3_0 < -threshold ? false : buying

hline(0, title="base line")
//bgcolor(l3_0 > 0.0014 ? green : l3_0 < -0.0014 ? red : gray, transp=20)
bgcolor(buying ? green : red, transp=20)
plot(l3_0, color=silver, style=area, transp=75)
plot(l3_0, color=aqua, title="prediction")

longCondition = buying
if (longCondition)
strategy.entry("Long", strategy.long)

shortCondition = buying != true
if (shortCondition)
strategy.entry("Short", strategy.short)
Reply
Error: "line 7: missing BEGIN at '|B|'"
Reply
sirolf2009 PRO IvanLabrie
That error is because when you copy and paste code, all the tabs are removed.
@YaroslavG, could you pastebin the code, or even better, publish it as a tradingview script?
Reply
YaroslavG sirolf2009
here optimize version http://pastebin.com/Wiz7cn2V
Reply
DaggyValvik YaroslavG
^I've compiled this :) Looks great, i'm gonna test it! Wish i could make alerts for when it gives a short or sell signal as i have to manually place the order.
Reply
DaggyValvik YaroslavG
Is this version good for SPX index for example
??
Reply
guy compile this. You'll get the same thing. This strategy looks to the future.
Reply
DaggyValvik YaroslavG
How can i implement this in MT4? is it possible?
Reply
YaroslavG DaggyValvik
no, it just for fun. it no strategy. it indicator
Reply
DaggyValvik YaroslavG
How can i make give signals more than once a day?
Reply
DaggyValvik YaroslavG
Actually, it deletes orders and creates new ones in hindsight. Not very good either for doing it in hindsight
Reply
//@version=2
strategy("ANN Strategy")

threshold = input(title="Threshold", type=float, defval=0.0014, step=0.0001)

getDiff() =>
yesterday=security(tickerid, 'D', ohlc4)
today=security(tickerid, 'D', ohlc4)
delta=today-yesterday
percentage=delta/yesterday

PineActivationFunctionTanh(v) =>
(exp(v) - exp(-v))/(exp(v) + exp(-v))


l3_0 = PineActivationFunctionTanh(getDiff()*1 + getDiff()*2)

buying = l3_0 > threshold ? true : l3_0 < -threshold ? false : buying

hline(0, title="base line")
bgcolor(buying ? green : red, transp=20)
plot(l3_0, color=silver, style=area, transp=75)
plot(l3_0, color=aqua, title="prediction")

longCondition = buying
if (longCondition)
strategy.entry("Long", strategy.long)

shortCondition = buying != true
if (shortCondition)
strategy.entry("Short", strategy.short)
+3 Reply
borisboxer YaroslavG
Hello. Thanks for sharing. I have a few questions that will help me understand what's going on here in general. 1) What is "PineActivationsFunctionTanh"? can you point me to where I can learn about it? 2) where is getDiff documented? Are these part of the Pine scripting language? Thanks
Reply
sirolf2009 PRO borisboxer
1)
http://ufldl.stanford.edu/wiki/index.php/Neural_Networks
Activation functions are part of the Neural Network alghoritm, tanh is a type of an activation function
2)
getDiff() is a function that I wrote, so it's not part of pine. It returns the percentual difference between today and yesterday. This value is fed into the network and the network produces a percentual prediction of the price movement of tomorrow. If this value is more than 0, the indicator is bullish, otherwise it's bearish
Reply
borisboxer sirolf2009
Thanks!
Reply
Is anybody using this startegy? I know it repaints, but is it still useable, or totally not?
+3 Reply
Hi,your strategy is very wery well with my technical analis its realy good thanq))) hello from Russia)))your script is great)
Reply
Do not work in real time, make a signals when the price is gone
Reply
FXTPratico PRO stalkerybr
For real? the signal comes after the candle has been created or when the money is gone?
Reply
sirolf2009 PRO FXTPratico
signals dissapear, if in the morning it paints a buy signal and somewhere during the day it changes bearish, the buy signal disappears. This also affects the backtesting, so in reality it isn't as good as the tests above dictate
Reply
FXTPratico PRO sirolf2009
Ok ok, but my only question was whether the signal arrives late or not :-)
Reply
Is there anyway to get an alert (alarm) when a trade has been placed? Would be amazing if it was connected to twitter somehow, thus, giving notifications. Mind just wondering so take it easy on me lol
Reply
Take the indicator version:
ANN

You can add tradingview alerts to it
+4 Reply
meatman sirolf2009
Could you please explain the logic from your strategy. When generates buy and sell Signals?
Reply
ANN stands for Artificial Neural Network, which is a self changing algorithm. I "trained" this algorithm using 2 years of daily bitcoin data. In short, it takes the percentual change between today and yesterday and makes a prediction of how much the symbol will rise or fall, based on what it has learned from it's bitcoin history
Reply
Hey everybody and Sirolf, I tried making this beautiful strategy into an indicator so it can alert us. I tried my best I haven't tested it yet since the market is closed. I'll post the indicator here, remember to open a "new" script and click "Indicator".

//@version=2
study("ANN Indicator VOL.2.2")

threshold = input(title="Threshold", type=float, defval=0.0014, step=0.0001)

getDiff() =>
yesterday=security(tickerid, 'D', ohlc4)
today=security(tickerid, 'D', ohlc4)
delta=today-yesterday
percentage=delta/yesterday

PineActivationFunctionLinear(v) => v
PineActivationFunctionTanh(v) =>
(exp(v) - exp(-v))/(exp(v) + exp(-v))

l0_0 = PineActivationFunctionLinear(getDiff())
l0_1 = PineActivationFunctionLinear(getDiff())
l0_2 = PineActivationFunctionLinear(getDiff())
l0_3 = PineActivationFunctionLinear(getDiff())
l0_4 = PineActivationFunctionLinear(getDiff())
l0_5 = PineActivationFunctionLinear(getDiff())
l0_6 = PineActivationFunctionLinear(getDiff())
l0_7 = PineActivationFunctionLinear(getDiff())
l0_8 = PineActivationFunctionLinear(getDiff())
l0_9 = PineActivationFunctionLinear(getDiff())
l0_10 = PineActivationFunctionLinear(getDiff())
l0_11 = PineActivationFunctionLinear(getDiff())
l0_12 = PineActivationFunctionLinear(getDiff())
l0_13 = PineActivationFunctionLinear(getDiff())
l0_14 = PineActivationFunctionLinear(getDiff())

l1_0 = PineActivationFunctionTanh(l0_0*5.040340774 + l0_1*-1.3025994088 + l0_2*19.4225543981 + l0_3*1.1796960423 + l0_4*2.4299395823 + l0_5*3.159003445 + l0_6*4.6844527551 + l0_7*-6.1079267196 + l0_8*-2.4952869198 + l0_9*-4.0966081154 + l0_10*-2.2432843111 + l0_11*-0.6105764807 + l0_12*-0.0775684605 + l0_13*-0.7984753138 + l0_14*3.4495907342)
l1_1 = PineActivationFunctionTanh(l0_0*5.9559031982 + l0_1*-3.1781960056 + l0_2*-1.6337491061 + l0_3*-4.3623166512 + l0_4*0.9061990402 + l0_5*-0.731285093 + l0_6*-6.2500232251 + l0_7*0.1356087758 + l0_8*-0.8570572885 + l0_9*-4.0161353298 + l0_10*1.5095552083 + l0_11*1.324789197 + l0_12*-0.1011973878 + l0_13*-2.3642090162 + l0_14*-0.7160862442)
l1_2 = PineActivationFunctionTanh(l0_0*4.4350881378 + l0_1*-2.8956461034 + l0_2*1.4199762607 + l0_3*-0.6436844261 + l0_4*1.1124274281 + l0_5*-4.0976954985 + l0_6*2.9317456342 + l0_7*0.0798318393 + l0_8*-5.5718144311 + l0_9*-0.6623352208 +l0_10*3.2405203222 + l0_11*-10.6253384513 + l0_12*4.7132919253 + l0_13*-5.7378151597 + l0_14*0.3164836695)
l1_3 = PineActivationFunctionTanh(l0_0*-6.1194605467 + l0_1*7.7935605604 + l0_2*-0.7587522153 + l0_3*9.8382495905 + l0_4*0.3274314734 + l0_5*1.8424796541 + l0_6*-1.2256355427 + l0_7*-1.5968600758 + l0_8*1.9937700922 + l0_9*5.0417809111 + l0_10*-1.9369944654 + l0_11*6.1013201778 + l0_12*1.5832910747 + l0_13*-2.148403244 + l0_14*1.5449437366)
l1_4 = PineActivationFunctionTanh(l0_0*3.5700040028 + l0_1*-4.4755892733 + l0_2*0.1526702072 + l0_3*-0.3553664401 + l0_4*-2.3777962662 + l0_5*-1.8098849587 + l0_6*-3.5198449134 + l0_7*-0.4369370497 + l0_8*2.3350169623 + l0_9*1.9328960346 + l0_10*1.1824141812 + l0_11*3.0565148049 + l0_12*-9.3253401534 + l0_13*1.6778555498 + l0_14*-3.045794332)
l1_5 = PineActivationFunctionTanh(l0_0*3.6784907623 + l0_1*1.1623683715 + l0_2*7.1366362145 + l0_3*-5.6756546585 + l0_4*12.7019884334 + l0_5*-1.2347823331 + l0_6*2.3656619827 + l0_7*-8.7191778213 + l0_8*-13.8089238753 + l0_9*5.4335943836 + l0_10*-8.1441181338 + l0_11*-10.5688113287 + l0_12*6.3964140758 + l0_13*-8.9714236223 + l0_14*-34.0255456929)
l1_6 = PineActivationFunctionTanh(l0_0*-0.4344517548 + l0_1*-3.8262167437 + l0_2*-0.2051098003 + l0_3*0.6844201221 + l0_4*1.1615893422 + l0_5*-0.404465314 + l0_6*-0.1465747632 + l0_7*-0.006282458 + l0_8*0.1585655487 + l0_9*1.1994484991 + l0_10*-0.9879081404 + l0_11*-0.3564970612 + l0_12*1.5814717823 + l0_13*-0.9614804676 + l0_14*0.9204822346)
l1_7 = PineActivationFunctionTanh(l0_0*-4.2700957175 + l0_1*9.4328591157 + l0_2*-4.3045548 + l0_3*5.0616868842 + l0_4*3.3388781058 + l0_5*-2.1885073225 + l0_6*-6.506301518 + l0_7*3.8429000108 + l0_8*-1.6872237349 + l0_9*2.4107095799 + l0_10*-3.0873985314 + l0_11*-2.8358325447 + l0_12*2.4044366491 + l0_13*0.636779082 + l0_14*-13.2173215035)
l1_8 = PineActivationFunctionTanh(l0_0*-8.3224697492 + l0_1*-9.4825530183 + l0_2*3.5294389835 + l0_3*0.1538618049 + l0_4*-13.5388631898 + l0_5*-0.1187936017 + l0_6*-8.4582741139 + l0_7*5.1566299292 + l0_8*10.345519938 + l0_9*2.9211759333 + l0_10*-5.0471804233 + l0_11*4.9255989983 + l0_12*-9.9626142544 + l0_13*23.0043143258 + l0_14*20.9391809343)
l1_9 = PineActivationFunctionTanh(l0_0*-0.9120518654 + l0_1*0.4991807488 + l0_2*-1.877244586 + l0_3*3.1416466525 + l0_4*1.063709676 + l0_5*0.5210126835 + l0_6*-4.9755780108 + l0_7*2.0336532347 + l0_8*-1.1793121093 + l0_9*-0.730664855 + l0_10*-2.3515987428 + l0_11*-0.1916546514 + l0_12*-2.2530340504 + l0_13*-0.2331829119 + l0_14*0.7216218149)
l1_10 = PineActivationFunctionTanh(l0_0*-5.2139618683 + l0_1*1.0663790028 + l0_2*1.8340834959 + l0_3*1.6248173447 + l0_4*-0.7663740145 + l0_5*0.1062788171 + l0_6*2.5288021501 + l0_7*-3.4066549066 + l0_8*-4.9497988755 + l0_9*-2.3060668143 + l0_10*-1.3962486274 + l0_11*0.6185583427 + l0_12*0.2625299576 + l0_13*2.0270246444 + l0_14*0.6372015811)
l1_11 = PineActivationFunctionTanh(l0_0*0.2020072665 + l0_1*0.3885852709 + l0_2*-0.1830248843 + l0_3*-1.2408598444 + l0_4*-0.6365798088 + l0_5*1.8736534268 + l0_6*0.656206442 + l0_7*-0.2987482678 + l0_8*-0.2017485963 + l0_9*-1.0604095303 + l0_10*0.239793356 + l0_11*-0.3614172938 + l0_12*0.2614678044 + l0_13*1.0083551762 + l0_14*-0.5473833797)
l1_12 = PineActivationFunctionTanh(l0_0*-0.4367517149 + l0_1*-10.0601304934 + l0_2*1.9240604838 + l0_3*-1.3192184047 + l0_4*-0.4564760159 + l0_5*-0.2965270368 + l0_6*-1.1407423613 + l0_7*2.0949647291 + l0_8*-5.8212599297 + l0_9*-1.3393321939 + l0_10*7.6624548265 + l0_11*1.1309391851 + l0_12*-0.141798054 + l0_13*5.1416736187 + l0_14*-1.8142503125)
l1_13 = PineActivationFunctionTanh(l0_0*1.103948336 + l0_1*-1.4592033032 + l0_2*0.6146278432 + l0_3*0.5040966421 + l0_4*-2.4276090772 + l0_5*-0.0432902426 + l0_6*-0.0044259999 + l0_7*-0.5961347308 + l0_8*0.3821026107 + l0_9*0.6169102373 +l0_10*-0.1469847611 + l0_11*-0.0717167683 + l0_12*-0.0352403695 + l0_13*1.2481310788 + l0_14*0.1339628411)
l1_14 = PineActivationFunctionTanh(l0_0*-9.8049980534 + l0_1*13.5481068519 + l0_2*-17.1362809025 + l0_3*0.7142100864 + l0_4*4.4759163422 + l0_5*4.5716161777 + l0_6*1.4290884628 + l0_7*8.3952862712 + l0_8*-7.1613700432 + l0_9*-3.3249489518+ l0_10*-0.7789587912 + l0_11*-1.7987628873 + l0_12*13.364752545 + l0_13*5.3947219678 + l0_14*12.5267547127)
l1_15 = PineActivationFunctionTanh(l0_0*0.9869461803 + l0_1*1.9473351905 + l0_2*2.032925759 + l0_3*7.4092080633 + l0_4*-1.9257741399 + l0_5*1.8153585328 + l0_6*1.1427866392 + l0_7*-0.3723167449 + l0_8*5.0009927384 + l0_9*-0.2275103411 + l0_10*2.8823012914 + l0_11*-3.0633141934 + l0_12*-2.785334815 + l0_13*2.727981E-4 + l0_14*-0.1253009512)
l1_16 = PineActivationFunctionTanh(l0_0*4.9418118585 + l0_1*-2.7538199876 + l0_2*-16.9887588104 + l0_3*8.8734475297 + l0_4*-16.3022734814 + l0_5*-4.562496601 + l0_6*-1.2944373699 + l0_7*-9.6022946986 + l0_8*-1.018393866 + l0_9*-11.4094515429 + l0_10*24.8483091382 + l0_11*-3.0031522277 + l0_12*0.1513114555 + l0_13*-6.7170487021 + l0_14*-14.7759227576)
l1_17 = PineActivationFunctionTanh(l0_0*5.5931454656 + l0_1*2.22272078 + l0_2*2.603416897 + l0_3*1.2661196599 + l0_4*-2.842826446 + l0_5*-7.9386099121 + l0_6*2.8278849111 + l0_7*-1.2289445238 + l0_8*4.571484248 + l0_9*0.9447425595 + l0_10*4.2890688351 + l0_11*-3.3228258483 + l0_12*4.8866215526 + l0_13*1.0693412194 + l0_14*-1.963203112)
l1_18 = PineActivationFunctionTanh(l0_0*0.2705520264 + l0_1*0.4002328199 + l0_2*0.1592515845 + l0_3*0.371893552 + l0_4*-1.6639467871 + l0_5*2.2887318884 + l0_6*-0.148633664 + l0_7*-0.6517792263 + l0_8*-0.0993032992 + l0_9*-0.964940376 + l0_10*0.1286342935 + l0_11*0.4869943595 + l0_12*1.4498648166 + l0_13*-0.3257333384 + l0_14*-1.3496419812)
l1_19 = PineActivationFunctionTanh(l0_0*-1.3223200798 + l0_1*-2.2505204324 + l0_2*0.8142804525 + l0_3*-0.848348177 + l0_4*0.7208860589 + l0_5*1.2033423756 + l0_6*-0.1403005786 + l0_7*0.2995941644 + l0_8*-1.1440473062 + l0_9*1.067752916 + l0_10*-1.2990534679 + l0_11*1.2588583869 + l0_12*0.7670409455 + l0_13*2.7895972983 + l0_14*-0.5376152512)
l1_20 = PineActivationFunctionTanh(l0_0*0.7382351572 + l0_1*-0.8778865631 + l0_2*1.0950766363 + l0_3*0.7312146997 + l0_4*2.844781386 + l0_5*2.4526730903 + l0_6*-1.9175165077 + l0_7*-0.7443755288 + l0_8*-3.1591419438 + l0_9*0.8441602697 + l0_10*1.1979484448 + l0_11*2.138098544 + l0_12*0.9274159536 + l0_13*-2.1573448803 + l0_14*-3.7698356464)
l1_21 = PineActivationFunctionTanh(l0_0*5.187120117 + l0_1*-7.7525670576 + l0_2*1.9008346975 + l0_3*-1.2031603996 + l0_4*5.917669142 + l0_5*-3.1878682719 + l0_6*1.0311747828 + l0_7*-2.7529484612 + l0_8*-1.1165884578 + l0_9*2.5524942323 + l0_10*-0.38623241 + l0_11*3.7961317445 + l0_12*-6.128820883 + l0_13*-2.1470707709 + l0_14*2.0173792965)
l1_22 = PineActivationFunctionTanh(l0_0*-6.0241676562 + l0_1*0.7474455584 + l0_2*1.7435724844 + l0_3*0.8619835076 + l0_4*-0.1138406797 + l0_5*6.5979359352 + l0_6*1.6554154348 + l0_7*-3.7969458806 + l0_8*1.1139097376 + l0_9*-1.9588417 + l0_10*3.5123392221 + l0_11*9.4443103128 + l0_12*-7.4779291395 + l0_13*3.6975940671 + l0_14*8.5134262747)
l1_23 = PineActivationFunctionTanh(l0_0*-7.5486576471 + l0_1*-0.0281420865 + l0_2*-3.8586839454 + l0_3*-0.5648792233 + l0_4*-7.3927282026 + l0_5*-0.3857538046 + l0_6*-2.9779885698 + l0_7*4.0482279965 + l0_8*-1.1522499578 + l0_9*-4.1562500212 + l0_10*0.7813134307 + l0_11*-1.7582667612 + l0_12*1.7071109988 + l0_13*6.9270873208 + l0_14*-4.5871357362)
l1_24 = PineActivationFunctionTanh(l0_0*-5.3603442228 + l0_1*-9.5350611629 + l0_2*1.6749984422 + l0_3*-0.6511065892 + l0_4*-0.8424823239 + l0_5*1.9946675213 + l0_6*-1.1264361638 + l0_7*0.3228676616 + l0_8*5.3562230396 + l0_9*-1.6678168952+ l0_10*1.2612580068 + l0_11*-3.5362671399 + l0_12*-9.3895191366 + l0_13*2.0169228673 + l0_14*-3.3813191557)
l1_25 = PineActivationFunctionTanh(l0_0*1.1362866429 + l0_1*-1.8960071702 + l0_2*5.7047307243 + l0_3*-1.6049785053 + l0_4*-4.8353898931 + l0_5*-1.4865381145 + l0_6*-0.2846893475 + l0_7*2.2322095997 + l0_8*2.0930488668 + l0_9*1.7141411002 + l0_10*-3.4106032176 + l0_11*3.0593289612 + l0_12*-5.0894813904 + l0_13*-0.5316299133 + l0_14*0.4705265416)
l1_26 = PineActivationFunctionTanh(l0_0*-0.9401400975 + l0_1*-0.9136086957 + l0_2*-3.3808688582 + l0_3*4.7200776773 + l0_4*3.686296919 + l0_5*14.2133723935 + l0_6*1.5652940954 + l0_7*-0.2921139433 + l0_8*1.0244504511 + l0_9*-7.6918299134 + l0_10*-0.594936135 + l0_11*-1.4559914156 + l0_12*2.8056435224 + l0_13*2.6103905733 + l0_14*2.3412348872)
l1_27 = PineActivationFunctionTanh(l0_0*1.1573980186 + l0_1*2.9593661909 + l0_2*0.4512594325 + l0_3*-0.9357210858 + l0_4*-1.2445804495 + l0_5*4.2716471631 + l0_6*1.5167912375 + l0_7*1.5026853293 + l0_8*1.3574772038 + l0_9*-1.9754386842 + l0_10*6.727671436 + l0_11*8.0145772889 + l0_12*7.3108970663 + l0_13*-2.5005627841 + l0_14*8.9604502277)
l1_28 = PineActivationFunctionTanh(l0_0*6.3576350212 + l0_1*-2.9731672725 + l0_2*-2.7763558082 + l0_3*-3.7902984555 + l0_4*-1.0065574585 + l0_5*-0.7011836061 + l0_6*-1.0298068578 + l0_7*1.201007784 + l0_8*-0.7835862254 + l0_9*-3.9863597435 + l0_10*6.7851825502 + l0_11*1.1120256721 + l0_12*-2.263287351 + l0_13*1.8314374104 + l0_14*-2.279102097)
l1_29 = PineActivationFunctionTanh(l0_0*-7.8741911036 + l0_1*-5.3370618518 + l0_2*11.9153868964 + l0_3*-4.1237170553 + l0_4*2.9491152758 + l0_5*1.0317132502 + l0_6*2.2992199883 + l0_7*-2.0250502364 + l0_8*-11.0785995839 + l0_9*-6.3615588554 + l0_10*-1.1687644976 + l0_11*6.3323478015 + l0_12*6.0195076962 + l0_13*-2.8972208702 + l0_14*3.6107747183)

l2_0 = PineActivationFunctionTanh(l1_0*-0.590546797 + l1_1*0.6608304658 + l1_2*-0.3358268839 + l1_3*-0.748530283 + l1_4*-0.333460383 + l1_5*-0.3409307681 + l1_6*0.1916558198 + l1_7*-0.1200399453 + l1_8*-0.5166151854 + l1_9*-0.8537164676 +l1_10*-0.0214448647 + l1_11*-0.553290271 + l1_12*-1.2333302892 + l1_13*-0.8321813811 + l1_14*-0.4527761741 + l1_15*0.9012545631 + l1_16*0.415853215 + l1_17*0.1270548319 + l1_18*0.2000460279 + l1_19*-0.1741942671 + l1_20*0.419830522 + l1_21*-0.059839291 + l1_22*-0.3383001769 + l1_23*0.1617814073 + l1_24*0.3071848006 + l1_25*-0.3191182045 + l1_26*-0.4981831822 + l1_27*-1.467478375 + l1_28*-0.1676432563 + l1_29*1.2574849126)
l2_1 = PineActivationFunctionTanh(l1_0*-0.5514235841 + l1_1*0.4759190049 + l1_2*0.2103576983 + l1_3*-0.4754377924 + l1_4*-0.2362941295 + l1_5*0.1155082119 + l1_6*0.7424215794 + l1_7*-0.3674198672 + l1_8*0.8401574461 + l1_9*0.6096563193 + l1_10*0.7437935674 + l1_11*-0.4898638101 + l1_12*-0.4168668092 + l1_13*-0.0365111095 + l1_14*-0.342675224 + l1_15*0.1870268765 + l1_16*-0.5843050987 + l1_17*-0.4596547471 + l1_18*0.452188522 + l1_19*-0.6737126684 + l1_20*0.6876072741 + l1_21*-0.8067776704 + l1_22*0.7592979467 + l1_23*-0.0768239468 + l1_24*0.370536097 + l1_25*-0.4363884671 + l1_26*-0.419285676 + l1_27*0.4380251141 + l1_28*0.0822528948 + l1_29*-0.2333910809)
l2_2 = PineActivationFunctionTanh(l1_0*-0.3306539521 + l1_1*-0.9382247194 + l1_2*0.0746711276 + l1_3*-0.3383838985 + l1_4*-0.0683232217 + l1_5*-0.2112358049 + l1_6*-0.9079234054 + l1_7*0.4898595603 + l1_8*-0.2039825863 + l1_9*1.0870698641+ l1_10*-1.1752901237 + l1_11*1.1406403923 + l1_12*-0.6779626786 + l1_13*0.4281048906 + l1_14*-0.6327670055 + l1_15*-0.1477678844 + l1_16*0.2693637584 + l1_17*0.7250738509 + l1_18*0.7905904504 + l1_19*-1.6417250883 + l1_20*-0.2108095534 +l1_21*-0.2698557472 + l1_22*-0.2433656685 + l1_23*-0.6289943273 + l1_24*0.436428207 + l1_25*-0.8243825184 + l1_26*-0.8583496686 + l1_27*0.0983131026 + l1_28*-0.4107462518 + l1_29*0.5641683087)
l2_3 = PineActivationFunctionTanh(l1_0*1.7036869992 + l1_1*-0.6683507666 + l1_2*0.2589197112 + l1_3*0.032841148 + l1_4*-0.4454796342 + l1_5*-0.6196149423 + l1_6*-0.1073622976 + l1_7*-0.1926393101 + l1_8*1.5280232458 + l1_9*-0.6136527036 +l1_10*-1.2722934357 + l1_11*0.2888655811 + l1_12*-1.4338638512 + l1_13*-1.1903556863 + l1_14*-1.7659663905 + l1_15*0.3703086867 + l1_16*1.0409140889 + l1_17*0.0167382209 + l1_18*0.6045646461 + l1_19*4.2388788116 + l1_20*1.4399738234 + l1_21*0.3308571935 + l1_22*1.4501137667 + l1_23*0.0426123724 + l1_24*-0.708479795 + l1_25*-1.2100800732 + l1_26*-0.5536278651 + l1_27*1.3547250573 + l1_28*1.2906250286 + l1_29*0.0596007114)
l2_4 = PineActivationFunctionTanh(l1_0*-0.462165126 + l1_1*-1.0996742176 + l1_2*1.0928262999 + l1_3*1.806407067 + l1_4*0.9289147669 + l1_5*0.8069022793 + l1_6*0.2374237802 + l1_7*-2.7143979019 + l1_8*-2.7779203877 + l1_9*0.214383903 + l1_10*-1.3111536623 + l1_11*-2.3148813568 + l1_12*-2.4755355804 + l1_13*-0.6819733236 + l1_14*0.4425615226 + l1_15*-0.1298218043 + l1_16*-1.1744832824 + l1_17*-0.395194848 + l1_18*-0.2803397703 + l1_19*-0.4505071197 + l1_20*-0.8934956598 + l1_21*3.3232916348 + l1_22*-1.7359534851 + l1_23*3.8540421743 + l1_24*1.4424032523 + l1_25*0.2639823693 + l1_26*0.3597053634 + l1_27*-1.0470693728 + l1_28*1.4133480357 + l1_29*0.6248098695)
l2_5 = PineActivationFunctionTanh(l1_0*0.2215807411 + l1_1*-0.5628295071 + l1_2*-0.8795982905 + l1_3*0.9101585104 + l1_4*-1.0176831976 + l1_5*-0.0728884401 + l1_6*0.6676331658 + l1_7*-0.7342174108 + l1_8*9.4428E-4 + l1_9*0.6439774272 + l1_10*-0.0345236026 + l1_11*0.5830977027 + l1_12*-0.4058921837 + l1_13*-0.3991888077 + l1_14*-1.0090426973 + l1_15*-0.9324780698 + l1_16*-0.0888749165 + l1_17*0.2466351736 + l1_18*0.4993304601 + l1_19*-1.115408696 + l1_20*0.9914246705 + l1_21*0.9687743445 + l1_22*0.1117130875 + l1_23*0.7825109733 + l1_24*0.2217023612 + l1_25*0.3081256411 + l1_26*-0.1778007966 + l1_27*-0.3333287743 + l1_28*1.0156352461 + l1_29*-0.1456257813)
l2_6 = PineActivationFunctionTanh(l1_0*-0.5461783383 + l1_1*0.3246015999 + l1_2*0.1450605434 + l1_3*-1.3179944349 + l1_4*-1.5481775261 + l1_5*-0.679685633 + l1_6*-0.9462335139 + l1_7*-0.6462399371 + l1_8*0.0991658683 + l1_9*0.1612892194 +l1_10*-1.037660602 + l1_11*-0.1044778824 + l1_12*0.8309203243 + l1_13*0.7714766458 + l1_14*0.2566767663 + l1_15*0.8649416329 + l1_16*-0.5847461285 + l1_17*-0.6393969272 + l1_18*0.8014049359 + l1_19*0.2279568228 + l1_20*1.0565217821 + l1_21*0.134738029 + l1_22*0.3420395576 + l1_23*-0.2417397219 + l1_24*0.3083072038 + l1_25*0.6761739059 + l1_26*-0.4653817053 + l1_27*-1.0634057566 + l1_28*-0.5658892281 + l1_29*-0.6947283681)
l2_7 = PineActivationFunctionTanh(l1_0*-0.5450410944 + l1_1*0.3912849372 + l1_2*-0.4118641117 + l1_3*0.7124695074 + l1_4*-0.7510266122 + l1_5*1.4065673913 + l1_6*0.9870731545 + l1_7*-0.2609363107 + l1_8*-0.3583639958 + l1_9*0.5436375706 +l1_10*0.4572450099 + l1_11*-0.4651538878 + l1_12*-0.2180218212 + l1_13*0.5241262959 + l1_14*-0.8529323253 + l1_15*-0.4200378937 + l1_16*0.4997885721 + l1_17*-1.1121528189 + l1_18*0.5992411048 + l1_19*-1.0263270781 + l1_20*-1.725160642 + l1_21*-0.2653995722 + l1_22*0.6996703032 + l1_23*0.348549086 + l1_24*0.6522482482 + l1_25*-0.7931928436 + l1_26*-0.5107994359 + l1_27*0.0509642698 + l1_28*0.8711187423 + l1_29*0.8999449627)
l2_8 = PineActivationFunctionTanh(l1_0*-0.7111081522 + l1_1*0.4296245062 + l1_2*-2.0720732038 + l1_3*-0.4071818684 + l1_4*1.0632721681 + l1_5*0.8463224325 + l1_6*-0.6083948423 + l1_7*1.1827669608 + l1_8*-0.9572307844 + l1_9*-0.9080517673 + l1_10*-0.0479029057 + l1_11*-1.1452853213 + l1_12*0.2884352688 + l1_13*0.1767851586 + l1_14*-1.089314461 + l1_15*1.2991763966 + l1_16*1.6236630806 + l1_17*-0.7720263697 + l1_18*-0.5011541755 + l1_19*-2.3919413568 + l1_20*0.0084018338 + l1_21*0.9975216139 + l1_22*0.4193541029 + l1_23*1.4623834571 + l1_24*-0.6253069691 + l1_25*0.6119677341 + l1_26*0.5423948388 + l1_27*1.0022450377 + l1_28*-1.2392984069 + l1_29*1.5021529822)

l3_0 = PineActivationFunctionTanh(l2_0*0.3385061186 + l2_1*0.6218531956 + l2_2*-0.7790340983 + l2_3*0.1413078332 + l2_4*0.1857010624 + l2_5*-0.1769456351 + l2_6*-0.3242337911 + l2_7*-0.503944883 + l2_8*0.1540568869)

buying = l3_0 > threshold ? true : l3_0 < -threshold ? false : buying

//bgcolor(l3_0 > 0.0014 ? green : l3_0 < -0.0014 ? red : gray, transp=20)
//bgcolor(buying ? green : red, transp=20)
//plot(l3_0, color=aqua, style=line, title="prediction")
//plot(0, color=black, title="BaseLine")

vol_spike1 = l3_0
vol_spike2 = 0

plot(vol_spike1, color=aqua, style=line, title="prediction")
plot(vol_spike2, color=black, title="BaseLine" )


Once added to your chart, make an alert from "prediction" > Greater Then / Less Then > 0.0000.
Please, everyone, give me and everyone a review. Were all here to help as a community, so it you fixed the script or modified it for the better please post it up!
We're all here to be successful!

Thanks !
+6 Reply
ChartArt TradeWithConfidence
What do you think of his original indicator which uses the same code as this ANN ?

ANN
Reply
The first ANN? Well last time I spoke with him he uses that indicator with the "ANN strategy". So if the "ANN Strategy" is green/red and you have the "ANN Indicator" and it turns the same color from the "ANN Strategy" then it's an extra insurance that it will go down.

But the New Indicator I put up just gives you alerts once it crosses the base line.
Reply
TradeWithConfidence TradeWithConfidence
I want people to take the script and try and fix it for the better. Because sometimes it repaints itself, I need to test it and see how long you need to wait before entering a trade in case of a faulty trade.
Reply
sirolf2009 PRO TradeWithConfidence
The difference between the indicator and the strategy is that you can use the indicator on every timeframe and the strategy only on daily (anything below will cause repainting). The logic behind it however, is exactly the same
Reply
I don't think you guys understand what I did exactly. The strategy version I made it to an indicator, so you will receive alerts, since the strategy has a higher profit! I use it on 1H charts. It works amazing.
Reply
ifty78692 TradeWithConfidence
Can you please share my friend.
Reply
I already did, check on top.
Reply
ifty78692 TradeWithConfidence
I have implemented the alert but is it 'greater than' or 'less than' 0.000 as i've only chosen 'greater than'. Does this mean each time the strategy is implemented, I will recieve a text mesage to say the trade has started?
Reply
if you select crossing up, you get bullish alerts
if you select crossing down, you get bearish alerts
if you select crossing, you get both

I wouldn't recommend using greater than or less than
Reply
ifty78692 sirolf2009
Thank you so much. BTW does the value remain 0.000?
Reply
yeah
+1 Reply
ifty78692 sirolf2009
You're a star bro, thanks.
Reply
You can use "Greater Than/ Less Than" But it has to be value in the negative (-) for sell and (+) for buy. You can't put 0.0000 because then you won't know at all.
Reply
Germaine_Mills TradeWithConfidence
Script 'ANN Indicator VOL.2.2' has been saved
Processing script...
line 7: missing BEGIN at '|B|'
Reply
sirolf2009 PRO Germaine_Mills