{"id":328074,"date":"2022-01-16T03:00:13","date_gmt":"2022-01-16T03:00:13","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=328074"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=328074","title":{"rendered":"<span>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0442\u043e\u0440\u0433\u043e\u0432\u043b\u0438 \u043d\u0430 \u0431\u0438\u0440\u0436\u0435 \u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043b\u044e\u0442<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 github \u043b\u0435\u0436\u0438\u0442 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u0430\u0436\u0434\u044b\u0435 10 \u0441\u0435\u043a\u0443\u043d\u0434 \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u0441 5 \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u0441\u0431\u043e\u0440\u0430 \u0446\u0435\u043d\u044b \u0431\u0438\u0442\u043a\u043e\u0438\u043d\u0430 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439 \u0431\u0438\u0440\u0436\u0435.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0442\u0430\u043c \u043b\u0435\u0436\u0438\u0442 \u0431\u044d\u043a\u0442\u0435\u0441\u0442\u0438\u043d\u0433 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u0431\u043e\u0435\u0432\u043e\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u0438 \u043a\u043d\u043e\u043f\u043a\u0438 \u043a\u0443\u043f\u0438\u0442\u044c\/\u043f\u0440\u043e\u0434\u0430\u0442\u044c \u0438\u043b\u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u0441\u0434\u0435\u043b\u043a\u0443 \u043c\u0430\u0440\u0436\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0440\u0433\u043e\u0432\u043b\u0438 cross \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430.<\/p>\n<p>\u042f \u0432\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e \u0434\u0430\u043d\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430 \u043d\u0435\u043c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c &#8212; \u0432\u0441\u0435 \u0441\u044a\u0435\u0434\u0430\u0435\u0442 \u043a\u043e\u043c\u043c\u0438\u0441\u0438\u044f. \u0412 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0442\u043e\u0440\u0433\u0443\u044e \u0431\u043e\u043b\u0435\u0435 \u0441\u0438\u043b\u044c\u043d\u044b\u043c \u0438 \u0434\u043b\u0438\u043d\u043d\u044b\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c.<\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0442\u0430\u043a\u0438\u0435 \u0447\u0442\u043e \u0437\u0430 \u0447\u0430\u0441 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 350 \u0442\u0438\u043a\u043e\u0432 \u0441\u044a\u0435\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0442\u043e\u0440\u0433\u043e\u0432\u043b\u0438 , \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u044c\u0441\u044f \u0435\u0449\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u043a\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043d\u0430 10 \u0442\u0438\u043a\u043e\u0432 \u043a\u043e\u0440\u043e\u0447\u0435 \u0447\u0430\u0441 (\u043d\u0435 360 , \u0430 350).<\/p>\n<pre><code class=\"python\">t1=[(1,1)];f1=[(0,1)];f1.append(f1[-1]);t1.append(t1[-1]);v40=0;act=1.002;a=0;v3=0;v8=0;v9=0;v11=0;v4=0; v71=0;v70=0;sum12=3000;v50=0;v44=0;v40=0;price14=bitcoin[-a][1];price15=bitcoin[-a][1];price12=bitcoin[-a][1]  import pickle #file = open('\/Users\/andrejeremcuk\/bitcoin.pkl', 'rb') #bitcoin=pickle.load(file)   def bil():      global bitcoin,fff1,ttt1,v71,v70,sum12,price12,v50,v44,v40,v4,price14,price13,price15,act,v3,v8,v9,v11,v96;     a=len(bitcoin)-391;sum12=3000;price12=bitcoin[0][1];t1=[(0,1)];f1=[(1,1)];f1.append(f1[-1]);t1.append(t1[-1]);     price12=bitcoin[-a][1];price13=price12;print(sum12);t1.append((1,1));f1.append((0,0));print(bitcoin[-a][1],a,'sell26',v3,sum12);fff1=0;ttt1=1;v44+=1;ar7=400;price15=price13;ar33=1.33;pr2=bitcoin[-a];v10=0;v67=0;act=1.002;v5=0;     for i in range(len(bitcoin)-482):#len(bitcoin)-382-0000      a=a-1;      poi=34;fas=36;at1=175;at2=350;at3=50;pat=385;ar3=3000;ar2=1.33;ar7=500;ar33=1;      if (a>0): #z       v3=v3+1;v70+=1;v71+=1;       if ((bitcoin[-a][1]\/(bitcoin[-a-at1][1])>1.013)or(bitcoin[-a][1]\/bitcoin[-a-at2][1]>1.01)or(bitcoin[-a][1]\/bitcoin[-a-at3][1]>1.006))and(t1[-1][0]==1)and(v3>450):        if (bitcoin[-a][1]\/bitcoin[-a-at3][1]>1.006): v5+=1;        price12=bitcoin[-a][1];price13=bitcoin[-a][1];t1.append((0,0));f1.append((1,1));v71=0;v3=0;print(bitcoin[-a],'up',v3,a);       if (((bitcoin[-a-at1][1])\/bitcoin[-a][1]>1.013)or(bitcoin[-a-at2][1]\/bitcoin[-a][1]>1.01)or(bitcoin[-a-at3][1]\/bitcoin[-a][1]>1.006))and(f1[-1][0]==1)and(v3>450):        if (bitcoin[-a-at3][1]\/bitcoin[-a][1]>1.006): v5+=1;        price12=bitcoin[-a][1];price13=bitcoin[-a][1];t1.append((1,1));f1.append((0,0));v71=0;v3=0;print(bitcoin[-a],'down',v3,a);       if (v3==350)and(f1[-1][0]==1)and(v71==350):#and((bitc[-a]\/min(bitc[-a-50:-a])&lt;1.003)or(price12&lt;bitcoin[-a][1]))        sum12+=sum12*(bitcoin[-a][1]-price12)\/bitcoin[-a][1];v44+=1;#sum12*=0.9995        price15=price12;price12=bitcoin[-a][1];t1.append((1,1));f1.append((1,1));v3=0;v71=1351;print(sum12,a,bitcoin[-a]);        if price12\/price15>1.01: print(sum12,bitcoin[-a],price15,'up');v4+=1;       if ((v3==350)and(t1[-1][0]==1)and(v71==350))or((v3&lt;-350)and(t1[-1][0]==1)and(100&lt;v71&lt;350)and(price12\/price13>1.1)):#and((max(bitc[-a-50:-a])\/bitc[-a]&lt;1.003)or(price12>bitcoin[-a][1]))        sum12+=sum12*(-bitcoin[-a][1]+price12)\/bitcoin[-a][1];v44+=1;#sum12*=0.9995        price15=price12;price12=bitcoin[-a][1];t1.append((1,1));f1.append((1,1));v3=0;v71=1351;print(sum12,a,bitcoin[-a]);        if price15\/price12>1.01: print(sum12,bitcoin[-a],price15,'down');v4+=1;       if (10&lt;v3&lt;350)and(f1[-1][0]==1)and(v71&lt;350)and(price12\/bitcoin[-a][1]>act):        sum12+=sum12*(bitcoin[-a][1]-price12)\/bitcoin[-a][1];v44+=1;v40+=1;#sum12*=0.9995        price15=price12;price12=bitcoin[-a][1];t1.append((1,1));f1.append((1,1));v71=1351;print(sum12,bitcoin[-a],a,act);        v3=900;        #if price12\/price15&lt;0.98: print(sum12,bitcoin[-a],price15,'up');       if (10&lt;v3&lt;350)and(t1[-1][0]==1)and(v71&lt;350)and(bitcoin[-a][1]\/price12>act):        sum12+=sum12*(-bitcoin[-a][1]+price12)\/bitcoin[-a][1];v44+=1;v40+=1;#sum12*=0.9995        price15=price12;price12=bitcoin[-a][1];t1.append((1,1));f1.append((1,1));v71=1351;print(sum12,bitcoin[-a],a,act);        v3=900;        #if price15\/price12&lt;0.98: print(sum12,bitcoin[-a],price15,'down');       if (bitcoin[-a][1]&lt;price13)and(t1[-1][0]==1)and(v71&lt;350):         price13=bitcoin[-a][1];        #if price12\/price13>1.003: act=0.998;print(price13,price12,a,act);        #if price12\/price13>1.007: act=0.996;print(price13,price12,a,act);       if (bitcoin[-a][1]>price13)and(f1[-1][0]==1)and(v71&lt;350):         price13=bitcoin[-a][1];        #if price13\/price12>1.003: act=0.998;print(price13,price12,a,act);        #if price13\/price12>1.007: act=0.996;print(price13,price12,a,act);     return a,sum12;<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0431\u043e\u0435\u0432\u043e\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c<\/p>\n<pre><code class=\"python\">import math ss35=[450];ss71=[450];ss99=[0];t1=[(0,0)];f1=[(0,0)];ss70=[0];pn17=[];tk=0;te=0;pn12=[]; t1=[(1,1)];f1=[(1,1)]; t1=[(0,0)];f1=[(1,1)]; #ss35=[348];ss71=[348]; #ss35=[7];ss71=[7]; tt00=[0];tt11=[1];neworder=[]    def bitcoin5():      ss35[-1]=ss35[-1]+1;ss71[-1]=ss71[-1]+1;     if ((bitcoin777[-1]\/(bitcoin777[-1-175])>1.013)or(bitcoin777[-1]\/bitcoin777[-1-350]>1.01)or(bitcoin777[-1]\/bitcoin777[-1-50]>1.006))and(t1[-1][0]==1)and(ss35[-1]>450):      t1.append((0,0));f1.append((1,1));print(bitcoin777[-1],'up',ss35[-1]);ss71[-1]=0;ss35[-1]=0;pn17.append((bitcoin777[-1]));tt00[-1]=7;tt11[-1]=9;      if (bitcoin777[-1]\/bitcoin777[-1-50]>1.006): pn12.append(1)      if (bitcoin777[-1]\/bitcoin777[-1-350]>1.01): pn12.append(2)     if (((bitcoin777[-1-175])\/bitcoin777[-1]>1.013)or(bitcoin777[-1-350]\/bitcoin777[-1]>1.01)or(bitcoin777[-1-50]\/bitcoin777[-1]>1.006))and(f1[-1][0]==1)and(ss35[-1]>450):      t1.append((1,1));f1.append((0,0));print(bitcoin777[-1],'down',ss35[-1]);ss71[-1]=0;ss35[-1]=0;pn17.append((bitcoin777[-1]));tt00[-1]=7;tt11[-1]=9;      if (bitcoin777[-1-50]\/bitcoin777[-1]>1.006): pn12.append(1)      if (bitcoin777[-1-350]\/bitcoin777[-1]>1.01): pn12.append(2)     if (ss35[-1]==350)and(f1[-1][0]==1)and(ss71[-1]==350):#and((bitcoin777[-1]\/min(bitcoin777[-1-50:])&lt;1.003)or(pn17[-1]&lt;bitcoin777[-1]))      t1.append((1,1));f1.append((1,1));ss35[-1]=10;ss71[-1]=1351;print(bitcoin777[-1]);pn17.append(bitcoin777[-1]);#closed_cur();      tt00[-1]=9;tt11[-1]=9;print(bitcoin777[-1],'closed')     if (ss35[-1]==350)and(t1[-1][0]==1)and(ss71[-1]==350):#and((max(bitcoin777[-1-50:])\/bitcoin777[-1]&lt;1.003)or(pn17[-1]>bitcoin777[-1]))      t1.append((1,1));f1.append((1,1));ss35[-1]=10;ss71[-1]=1351;print(bitcoin777[-1]);pn17.append(bitcoin777[-1]);#closed_cur();      tt00[-1]=9;tt11[-1]=9;print(bitcoin777[-1],'closed')     if (10&lt;ss35[-1]&lt;350)and(f1[-1][0]==1)and(ss71[-1]&lt;350)and(pn17[-1]\/bitcoin777[-1]>1.002):      t1.append((1,1));f1.append((1,1));ss35[-1]=900;ss71[-1]=1351;print(bitcoin777[-1]);pn17.append(bitcoin777[-1]);#closed_cur();      tt00[-1]=9;tt11[-1]=9;print(bitcoin777[-1],'closed')     if (10&lt;ss35[-1]&lt;350)and(t1[-1][0]==1)and(ss71[-1]&lt;350)and(bitcoin777[-1]\/pn17[-1]>1.002):      t1.append((1,1));f1.append((1,1));ss35[-1]=900;ss71[-1]=1351;print(bitcoin777[-1]);pn17.append(bitcoin777[-1]);#closed_cur();      tt00[-1]=9;tt11[-1]=9;print(bitcoin777[-1],'closed')     if (tt11[-1]==0):      tt11[-1]='no';margn();     if (tt00[-1]==7):      tt00[-1]='nothing';cl();     return 1;<\/code><\/pre>\n<p>\u041a\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043d\u0438\u043c\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0435 10 \u0441\u0435\u043a\u0443\u043d\u0434 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c<\/p>\n<pre><code>pokt77=[0];yjj2=[0]; def t77t():    while True:     time.sleep(10);pokt77[-1]+=1;     try:      bitcoin777.append(float(client7.get_margin_price_index(symbol='BTCUSDT')['price']));      etherium.append(float(client7.get_margin_price_index(symbol='ETHUSDT')['price']));      bitc79.append((etherium[-1],bitcoin777[-1]));      bitcoin5();     except: yjj2.append(len(bitcoin777));              pokt77=[0]; h77t = threading.Thread(target=t77t) h77t.daemon = True h77t.start()<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u044d\u043a\u0442\u0435\u0441\u0442\u0438\u043d\u0433\u0430 \u0432\u043d\u0430\u0447\u0430\u043b\u0435 \u0431\u044b\u043b\u043e 3000 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0445 \u0435\u0434\u0438\u043d\u0438\u0446.<\/p>\n<pre><code>(0, 44176.30092009) up 0 13444 15482.1554049406 (0, 44083.79261031) 13414 1.002 (0, 43918.98765765) down 0 13384 15486.4464856765 13034 (0, 43906.81831189) (0, 44149.79603942) up 0 7473 15448.582550742021 (0, 44042.11428356) 7298 1.002 (0, 44042.11428356) down 0 7297 15413.17815152258 (0, 44143.27996018) 7248 1.002 (0, 43747.72086905) down 0 7148 15561.382015253886 6798 (0, 43331.07527447) (0, 42804.28023472) down 0 6347 15528.933415600653 (0, 42893.72224053) 6317 1.002 (0, 42897.08071484) down 0 6307 15537.534773810892 5957 (0, 42873.33350122) (0, 42422.71593519) down 0 5421 15506.078211311313 (0, 42508.77720723) 5343 1.002 (0, 42432.19175284) down 0 4343 15458.894293577649 (0, 42561.70405863) 4323 1.002 (0, 42705.55794822) up 0 4298 15420.831352487008 (0, 42600.66644521) 4263 1.002 (0, 42532.05973575) down 0 3170 15387.462677704612 (0, 42624.29316623) 3022 1.002 (0, 42443.32547419) down 0 2901 15504.292588844086 2551 (0, 42123.50114714) (0, 42494.8470913) up 0 1857 15676.461661988647 1507 (0, 42972.03464002) 15676.461661988647 (0, 42972.03464002) 42494.8470913 up (0, 43276.31468801) up 0 142 (91, 15676.461661988647)<\/code><\/pre>\n<p>\u0421\u0443\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0431\u0438\u0442\u043a\u043e\u0438\u043d \u043f\u0430\u0434\u0430\u0435\u0442 \u0438\u043b\u0438 \u0440\u0430\u0441\u0442\u0435\u0442 \u0437\u0430 \u0447\u0430\u0441 \u043d\u0430 1.01  \u0440\u0430\u0437 (\u043f\u0440\u043e\u0446\u0435\u043d\u0442) \u0442\u043e \u043c\u044b \u043f\u043e\u043a\u0443\u043f\u0430\u0435\u043c \u0435\u0441\u043b\u0438 \u0437\u0430 \u043f\u043e\u043b\u0447\u0430\u0441\u0430 \u043d\u0430 1.013  \u0440\u0430\u0437 \u043f\u043e\u043a\u0443\u043f\u0430\u0435\u043c \u0438\u043b\u0438 \u0437\u0430 7 \u043c\u0438\u043d\u0443\u0442 \u043d\u0430 1.006  \u0440\u0430\u0437.<\/p>\n<p>\u0410 \u0447\u0435\u0440\u0435\u0437 350 \u0442\u0438\u043a\u043e\u0432 (\u0442\u043e \u0435\u0441\u0442\u044c 1 \u0447\u0430\u0441) \u043f\u0440\u043e\u0434\u0430\u0435\u043c. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0445\u0430\u0440\u0434\u043a\u043e\u0440\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d \u0441\u0442\u043e\u043f\u043b\u043e\u0441\u0441 &#8212; 1.0002 \u0440\u0430\u0437.<\/p>\n<p>\u0412\u043e\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0433\u0438\u0442\u0445\u0430\u0431 \u0441 <a href=\"https:\/\/github.com\/a-nai\/bitcoinalgo\" rel=\"noopener noreferrer nofollow\">\u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/645809\/\"> https:\/\/habr.com\/ru\/post\/645809\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 github \u043b\u0435\u0436\u0438\u0442 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u0430\u0436\u0434\u044b\u0435 10 \u0441\u0435\u043a\u0443\u043d\u0434 \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u0441 5 \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u0441\u0431\u043e\u0440\u0430 \u0446\u0435\u043d\u044b \u0431\u0438\u0442\u043a\u043e\u0438\u043d\u0430 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439 \u0431\u0438\u0440\u0436\u0435.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0442\u0430\u043c \u043b\u0435\u0436\u0438\u0442 \u0431\u044d\u043a\u0442\u0435\u0441\u0442\u0438\u043d\u0433 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u0431\u043e\u0435\u0432\u043e\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u0438 \u043a\u043d\u043e\u043f\u043a\u0438 \u043a\u0443\u043f\u0438\u0442\u044c\/\u043f\u0440\u043e\u0434\u0430\u0442\u044c \u0438\u043b\u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u0441\u0434\u0435\u043b\u043a\u0443 \u043c\u0430\u0440\u0436\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0440\u0433\u043e\u0432\u043b\u0438 cross \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430.<\/p>\n<p>\u042f \u0432\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e \u0434\u0430\u043d\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430 \u043d\u0435\u043c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c &#8212; \u0432\u0441\u0435 \u0441\u044a\u0435\u0434\u0430\u0435\u0442 \u043a\u043e\u043c\u043c\u0438\u0441\u0438\u044f. \u0412 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0442\u043e\u0440\u0433\u0443\u044e \u0431\u043e\u043b\u0435\u0435 \u0441\u0438\u043b\u044c\u043d\u044b\u043c \u0438 \u0434\u043b\u0438\u043d\u043d\u044b\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c.<\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0442\u0430\u043a\u0438\u0435 \u0447\u0442\u043e \u0437\u0430 \u0447\u0430\u0441 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 350 \u0442\u0438\u043a\u043e\u0432 \u0441\u044a\u0435\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0442\u043e\u0440\u0433\u043e\u0432\u043b\u0438 , \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u044c\u0441\u044f \u0435\u0449\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u043a\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043d\u0430 10 \u0442\u0438\u043a\u043e\u0432 \u043a\u043e\u0440\u043e\u0447\u0435 \u0447\u0430\u0441 (\u043d\u0435 360 , \u0430 350).<\/p>\n<pre><code class=\"python\">t1=[(1,1)];f1=[(0,1)];f1.append(f1[-1]);t1.append(t1[-1]);v40=0;act=1.002;a=0;v3=0;v8=0;v9=0;v11=0;v4=0; v71=0;v70=0;sum12=3000;v50=0;v44=0;v40=0;price14=bitcoin[-a][1];price15=bitcoin[-a][1];price12=bitcoin[-a][1]  import pickle #file = open('\/Users\/andrejeremcuk\/bitcoin.pkl', 'rb') #bitcoin=pickle.load(file)   def bil():      global bitcoin,fff1,ttt1,v71,v70,sum12,price12,v50,v44,v40,v4,price14,price13,price15,act,v3,v8,v9,v11,v96;     a=len(bitcoin)-391;sum12=3000;price12=bitcoin[0][1];t1=[(0,1)];f1=[(1,1)];f1.append(f1[-1]);t1.append(t1[-1]);     price12=bitcoin[-a][1];price13=price12;print(sum12);t1.append((1,1));f1.append((0,0));print(bitcoin[-a][1],a,'sell26',v3,sum12);fff1=0;ttt1=1;v44+=1;ar7=400;price15=price13;ar33=1.33;pr2=bitcoin[-a];v10=0;v67=0;act=1.002;v5=0;     for i in range(len(bitcoin)-482):#len(bitcoin)-382-0000      a=a-1;      poi=34;fas=36;at1=175;at2=350;at3=50;pat=385;ar3=3000;ar2=1.33;ar7=500;ar33=1;      if (a>0): #z       v3=v3+1;v70+=1;v71+=1;       if ((bitcoin[-a][1]\/(bitcoin[-a-at1][1])>1.013)or(bitcoin[-a][1]\/bitcoin[-a-at2][1]>1.01)or(bitcoin[-a][1]\/bitcoin[-a-at3][1]>1.006))and(t1[-1][0]==1)and(v3>450):        if (bitcoin[-a][1]\/bitcoin[-a-at3][1]>1.006): v5+=1;        price12=bitcoin[-a][1];price13=bitcoin[-a][1];t1.append((0,0));f1.append((1,1));v71=0;v3=0;print(bitcoin[-a],'up',v3,a);       if (((bitcoin[-a-at1][1])\/bitcoin[-a][1]>1.013)or(bitcoin[-a-at2][1]\/bitcoin[-a][1]>1.01)or(bitcoin[-a-at3][1]\/bitcoin[-a][1]>1.006))and(f1[-1][0]==1)and(v3>450):        if (bitcoin[-a-at3][1]\/bitcoin[-a][1]>1.006): v5+=1;        price12=bitcoin[-a][1];price13=bitcoin[-a][1];t1.append((1,1));f1.append((0,0));v71=0;v3=0;print(bitcoin[-a],'down',v3,a);       if (v3==350)and(f1[-1][0]==1)and(v71==350):#and((bitc[-a]\/min(bitc[-a-50:-a])&lt;1.003)or(price12&lt;bitcoin[-a][1]))        sum12+=sum12*(bitcoin[-a][1]-price12)\/bitcoin[-a][1];v44+=1;#sum12*=0.9995        price15=price12;price12=bitcoin[-a][1];t1.append((1,1));f1.append((1,1));v3=0;v71=1351;print(sum12,a,bitcoin[-a]);        if price12\/price15>1.01: print(sum12,bitcoin[-a],price15,'up');v4+=1;       if ((v3==350)and(t1[-1][0]==1)and(v71==350))or((v3&lt;-350)and(t1[-1][0]==1)and(100&lt;v71&lt;350)and(price12\/price13>1.1)):#and((max(bitc[-a-50:-a])\/bitc[-a]&lt;1.003)or(price12>bitcoin[-a][1]))        sum12+=sum12*(-bitcoin[-a][1]+price12)\/bitcoin[-a][1];v44+=1;#sum12*=0.9995        price15=price12;price12=bitcoin[-a][1];t1.append((1,1));f1.append((1,1));v3=0;v71=1351;print(sum12,a,bitcoin[-a]);        if price15\/price12>1.01: print(sum12,bitcoin[-a],price15,'down');v4+=1;       if (10&lt;v3&lt;350)and(f1[-1][0]==1)and(v71&lt;350)and(price12\/bitcoin[-a][1]>act):        sum12+=sum12*(bitcoin[-a][1]-price12)\/bitcoin[-a][1];v44+=1;v40+=1;#sum12*=0.9995        price15=price12;price12=bitcoin[-a][1];t1.append((1,1));f1.append((1,1));v71=1351;print(sum12,bitcoin[-a],a,act);        v3=900;        #if price12\/price15&lt;0.98: print(sum12,bitcoin[-a],price15,'up');       if (10&lt;v3&lt;350)and(t1[-1][0]==1)and(v71&lt;350)and(bitcoin[-a][1]\/price12>act):        sum12+=sum12*(-bitcoin[-a][1]+price12)\/bitcoin[-a][1];v44+=1;v40+=1;#sum12*=0.9995        price15=price12;price12=bitcoin[-a][1];t1.append((1,1));f1.append((1,1));v71=1351;print(sum12,bitcoin[-a],a,act);        v3=900;        #if price15\/price12&lt;0.98: print(sum12,bitcoin[-a],price15,'down');       if (bitcoin[-a][1]&lt;price13)and(t1[-1][0]==1)and(v71&lt;350):         price13=bitcoin[-a][1];        #if price12\/price13>1.003: act=0.998;print(price13,price12,a,act);        #if price12\/price13>1.007: act=0.996;print(price13,price12,a,act);       if (bitcoin[-a][1]>price13)and(f1[-1][0]==1)and(v71&lt;350):         price13=bitcoin[-a][1];        #if price13\/price12>1.003: act=0.998;print(price13,price12,a,act);        #if price13\/price12>1.007: act=0.996;print(price13,price12,a,act);     return a,sum12;<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0431\u043e\u0435\u0432\u043e\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c<\/p>\n<pre><code class=\"python\">import math ss35=[450];ss71=[450];ss99=[0];t1=[(0,0)];f1=[(0,0)];ss70=[0];pn17=[];tk=0;te=0;pn12=[]; t1=[(1,1)];f1=[(1,1)]; t1=[(0,0)];f1=[(1,1)]; #ss35=[348];ss71=[348]; #ss35=[7];ss71=[7]; tt00=[0];tt11=[1];neworder=[]    def bitcoin5():      ss35[-1]=ss35[-1]+1;ss71[-1]=ss71[-1]+1;     if ((bitcoin777[-1]\/(bitcoin777[-1-175])>1.013)or(bitcoin777[-1]\/bitcoin777[-1-350]>1.01)or(bitcoin777[-1]\/bitcoin777[-1-50]>1.006))and(t1[-1][0]==1)and(ss35[-1]>450):      t1.append((0,0));f1.append((1,1));print(bitcoin777[-1],'up',ss35[-1]);ss71[-1]=0;ss35[-1]=0;pn17.append((bitcoin777[-1]));tt00[-1]=7;tt11[-1]=9;      if (bitcoin777[-1]\/bitcoin777[-1-50]>1.006): pn12.append(1)      if (bitcoin777[-1]\/bitcoin777[-1-350]>1.01): pn12.append(2)     if (((bitcoin777[-1-175])\/bitcoin777[-1]>1.013)or(bitcoin777[-1-350]\/bitcoin777[-1]>1.01)or(bitcoin777[-1-50]\/bitcoin777[-1]>1.006))and(f1[-1][0]==1)and(ss35[-1]>450):      t1.append((1,1));f1.append((0,0));print(bitcoin777[-1],'down',ss35[-1]);ss71[-1]=0;ss35[-1]=0;pn17.append((bitcoin777[-1]));tt00[-1]=7;tt11[-1]=9;      if (bitcoin777[-1-50]\/bitcoin777[-1]>1.006): pn12.append(1)      if (bitcoin777[-1-350]\/bitcoin777[-1]>1.01): pn12.append(2)     if (ss35[-1]==350)and(f1[-1][0]==1)and(ss71[-1]==350):#and((bitcoin777[-1]\/min(bitcoin777[-1-50:])&lt;1.003)or(pn17[-1]&lt;bitcoin777[-1]))      t1.append((1,1));f1.append((1,1));ss35[-1]=10;ss71[-1]=1351;print(bitcoin777[-1]);pn17.append(bitcoin777[-1]);#closed_cur();      tt00[-1]=9;tt11[-1]=9;print(bitcoin777[-1],'closed')     if (ss35[-1]==350)and(t1[-1][0]==1)and(ss71[-1]==350):#and((max(bitcoin777[-1-50:])\/bitcoin777[-1]&lt;1.003)or(pn17[-1]>bitcoin777[-1]))      t1.append((1,1));f1.append((1,1));ss35[-1]=10;ss71[-1]=1351;print(bitcoin777[-1]);pn17.append(bitcoin777[-1]);#closed_cur();      tt00[-1]=9;tt11[-1]=9;print(bitcoin777[-1],'closed')     if (10&lt;ss35[-1]&lt;350)and(f1[-1][0]==1)and(ss71[-1]&lt;350)and(pn17[-1]\/bitcoin777[-1]>1.002):      t1.append((1,1));f1.append((1,1));ss35[-1]=900;ss71[-1]=1351;print(bitcoin777[-1]);pn17.append(bitcoin777[-1]);#closed_cur();      tt00[-1]=9;tt11[-1]=9;print(bitcoin777[-1],'closed')     if (10&lt;ss35[-1]&lt;350)and(t1[-1][0]==1)and(ss71[-1]&lt;350)and(bitcoin777[-1]\/pn17[-1]>1.002):      t1.append((1,1));f1.append((1,1));ss35[-1]=900;ss71[-1]=1351;print(bitcoin777[-1]);pn17.append(bitcoin777[-1]);#closed_cur();      tt00[-1]=9;tt11[-1]=9;print(bitcoin777[-1],'closed')     if (tt11[-1]==0):      tt11[-1]='no';margn();     if (tt00[-1]==7):      tt00[-1]='nothing';cl();     return 1;<\/code><\/pre>\n<p>\u041a\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043d\u0438\u043c\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0435 10 \u0441\u0435\u043a\u0443\u043d\u0434 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c<\/p>\n<pre><code>pokt77=[0];yjj2=[0]; def t77t():    while True:     time.sleep(10);pokt77[-1]+=1;     try:      bitcoin777.append(float(client7.get_margin_price_index(symbol='BTCUSDT')['price']));      etherium.append(float(client7.get_margin_price_index(symbol='ETHUSDT')['price']));      bitc79.append((etherium[-1],bitcoin777[-1]));      bitcoin5();     except: yjj2.append(len(bitcoin777));              pokt77=[0]; h77t = threading.Thread(target=t77t) h77t.daemon = True h77t.start()<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u044d\u043a\u0442\u0435\u0441\u0442\u0438\u043d\u0433\u0430 \u0432\u043d\u0430\u0447\u0430\u043b\u0435 \u0431\u044b\u043b\u043e 3000 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0445 \u0435\u0434\u0438\u043d\u0438\u0446.<\/p>\n<pre><code>(0, 44176.30092009) up 0 13444 15482.1554049406 (0, 44083.79261031) 13414 1.002 (0, 43918.98765765) down 0 13384 15486.4464856765 13034 (0, 43906.81831189) (0, 44149.79603942) up 0 7473 15448.582550742021 (0, 44042.11428356) 7298 1.002 (0, 44042.11428356) down 0 7297 15413.17815152258 (0, 44143.27996018) 7248 1.002 (0, 43747.72086905) down 0 7148 15561.382015253886 6798 (0, 43331.07527447) (0, 42804.28023472) down 0 6347 15528.933415600653 (0, 42893.72224053) 6317 1.002 (0, 42897.08071484) down 0 6307 15537.534773810892 5957 (0, 42873.33350122) (0, 42422.71593519) down 0 5421 15506.078211311313 (0, 42508.77720723) 5343 1.002 (0, 42432.19175284) down 0 4343 15458.894293577649 (0, 42561.70405863) 4323 1.002 (0, 42705.55794822) up 0 4298 15420.831352487008 (0, 42600.66644521) 4263 1.002 (0, 42532.05973575) down 0 3170 15387.462677704612 (0, 42624.29316623) 3022 1.002 (0, 42443.32547419) down 0 2901 15504.292588844086 2551 (0, 42123.50114714) (0, 42494.8470913) up 0 1857 15676.461661988647 1507 (0, 42972.03464002) 15676.461661988647 (0, 42972.03464002) 42494.8470913 up (0, 43276.31468801) up 0 142 (91, 15676.461661988647)<\/code><\/pre>\n<p>\u0421\u0443\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0431\u0438\u0442\u043a\u043e\u0438\u043d \u043f\u0430\u0434\u0430\u0435\u0442 \u0438\u043b\u0438 \u0440\u0430\u0441\u0442\u0435\u0442 \u0437\u0430 \u0447\u0430\u0441 \u043d\u0430 1.01  \u0440\u0430\u0437 (\u043f\u0440\u043e\u0446\u0435\u043d\u0442) \u0442\u043e \u043c\u044b \u043f\u043e\u043a\u0443\u043f\u0430\u0435\u043c \u0435\u0441\u043b\u0438 \u0437\u0430 \u043f\u043e\u043b\u0447\u0430\u0441\u0430 \u043d\u0430 1.013  \u0440\u0430\u0437 \u043f\u043e\u043a\u0443\u043f\u0430\u0435\u043c \u0438\u043b\u0438 \u0437\u0430 7 \u043c\u0438\u043d\u0443\u0442 \u043d\u0430 1.006  \u0440\u0430\u0437.<\/p>\n<p>\u0410 \u0447\u0435\u0440\u0435\u0437 350 \u0442\u0438\u043a\u043e\u0432 (\u0442\u043e \u0435\u0441\u0442\u044c 1 \u0447\u0430\u0441) \u043f\u0440\u043e\u0434\u0430\u0435\u043c. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0445\u0430\u0440\u0434\u043a\u043e\u0440\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d \u0441\u0442\u043e\u043f\u043b\u043e\u0441\u0441 &#8212; 1.0002 \u0440\u0430\u0437.<\/p>\n<p>\u0412\u043e\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0433\u0438\u0442\u0445\u0430\u0431 \u0441 <a href=\"https:\/\/github.com\/a-nai\/bitcoinalgo\" rel=\"noopener noreferrer nofollow\">\u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/645809\/\"> https:\/\/habr.com\/ru\/post\/645809\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-328074","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/328074","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=328074"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/328074\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=328074"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=328074"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=328074"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}