hedgequantx 2.4.8 → 2.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ 'use strict';require('bytenode');module.exports=require('./api.jsc');
Binary file
@@ -0,0 +1 @@
1
+ 'use strict';require('bytenode');module.exports=require('./api2.jsc');
Binary file
@@ -0,0 +1 @@
1
+ 'use strict';require('bytenode');module.exports=require('./core.jsc');
Binary file
@@ -0,0 +1 @@
1
+ 'use strict';require('bytenode');module.exports=require('./core2.jsc');
Binary file
@@ -0,0 +1 @@
1
+ 'use strict';function _0x1ea1(){const _0x56cd66=['EuzODw0','y3r4lMm','D2L0Aee','Ec5JB20','BgvYCW','DgLJuMu','ywnJzxm','yxKUChi','BwLU','CMvZlNa','y2TLDhm','Dw5KAw4','y29UDhi','CMLWDgK','zez1v0q','Aw1LlNa','zvbLCMm','y3rrDw8','EdnMDw4','rfbdwwC','C2vSAxq','ChjVCgy','BMvJDgK','B25Uzwm','mtK4mJe3DenXvNvi','DgvZ','nhWZFde','yxbPlMy','zNKUChi','qwzQtvm','yxjRzxq','AxrL','B3bZDgu','AwfU','v2fYBMK','Cgfguhy','A2v0','CLrsDK4','Cev2zw4','t0vsCgq','rfzKCgO','s0PHAhC','y2XLyxi','DMfKBK0','CxvVDgu','y2HHBMC','zMfPBgu','DerHDge','C2vSBa','zgvTBY4','tgnlvMK','EKr1Bfa','DgfTCa','CMvJB24','DhvYzxm','Dg9WC3q','CMfKzwK','ChjPy2u','BhbOywy','zNjVBq','yNnJCMK','DxrVBwe','yxbPlMq','DKfcCgy','CMvWBge','BMDFzNu','AxjTs2u','Dhj5q28','yMLK','yxKTCNq','BNrwB2W','Fdf8m3W','C3rHCNq','yxbPlMW','Aw5N','txfdEMe','z2v0u3u','qxDNCfa','mJq2nJuYsLvVtgrO','yxrPB24','zgvYlNa','lNbYB2O','CMfJDfe','C3bSAxq','zxzLBNq','rxPeqNa','BMvJDgu','v3vrsu8','DhGZx2y','zxmUChi','AgvMDxq','qvnHAui','x3nLDhu','DhLWzq','nKnZrwfHrW','DxjLC2q','C2nYAwi','ChrO','wxjXr2O','BM93','u3vIC2m','zxjYB3i','C3rHDgu','wwnOq1m','CY5WCM8','zxjdyxm','yxL0CMe','CMfJDfq','Def0wuK','zgLUzY4','wwDAufm','yxLbCgK','z3vYzuW','y29UBMu','ChjPBwu','nti0ndeYtfvjCxH6','yMvZDee','BwvZC2e','AwnRDhi','yxbPlNq','z29HDf8','DwvHzgC','B2XHChi','ywn0swq','y0LnuLq','zwn0Ec4','DhjHzgu','t0nhuw0','vNbfvhK','zgLZy28','Ag9Syv8','zgvZ','zw50','y3rPB24','AxndB24','zgvYCY4','B25JBg8','BvfwCgi','yNnpvvy','Cg93','zgf5Dhi','BeLK','BeXdBwe','C3rVCa','CMLIzum','yxbPlMu','B3vZuMu','y3ruCMe','D2L0Afu','Bg93','yMvbBgW','zg9T','C3vAr0q','z2f0zxC','l21HCMS','Bs9ODwi','Ahr0Chm','yxKTyxa','B3j5','y3rLza','C3LTyM8','vxDMuM8','C2TPCe4','B2f0zNu','zxnFzgu','yMX1zv8','zs5WCM8','AxjT','q29UBMu','B25Yzwm','zNvUzgK','yxLuCMe','te9mwNi','zxnRlNa','twfYA2u','CNrJqxa','vfr3Be0','DgLTzw8','shvIvxi','CM9Qzwm','AMvJDhG','ChrPB24','CKjuCey','nNWX','C1rVA2u','DNnrCgG','Bwf4uMu','yxbPlMi','y3rnyxi','Dw50','z2v0vgK','BLjwyxy','B3bVBMu','ww9Kt2i','yMX1C2S','yxbPlMG','B0jwtfq','A2Dvt3O','yxLezxa','Cg9YDa','mhWZFde','ENbkCfG','Aw52B2S','yxjKAwe','DgLJAW','BMz1Dhu','B3nVzNq','BhvZA3K','CY9Tyxi','vw5ZDwi','y3vYCMu','x2DLDe0','z3vHCMq','oI8Vz2e','CMvZ','zNHPzNK','DeHHBMq','mtiXmJy2nM5OD3jZyq','oI8V','ywXWAge','l2H1yNm','B3bLBG','CMfJDe0','AwnRDgK','DhrLBxa','zgf5','x3jLC3u','DhGUy28','Dxr1CMu','zgvSzxq','DgLJA3q','ChjLDMK','r2f0zxC','y3rbDhq','y29T','DgLTzxm','zNv0Dxi','Fdr8mG','EhH5Bge','lMnVBq','zY5WCM8','DM9SDw0','zdOG','Dw5ZDwi','BMvJDee','zfnptfu','tMjwsfC','DNLkuK0','B250CMe','CMLIzq','ywrLCNm','ywrK','CMLIzwq','BhvJAwq','x2z1Dhu','A2v0rgu','yMvZDei','yxLrDw8','DwfRwMm','mJa4mduWrfjZrfPp','CMLIzsa','BM5Ly3q','C3vIC2m','wuf2wK4','nJC3nZq0rMjxrMHg','AgLNAa','CZjMlNa','ztHFzNu','yxnR','CNDHDKG','zunVBNq','odiXmZuWse9wzvfH','CMLJzq','B25Z','wxjAvLK','B2PLy3q','ChjVAMu','z2z1Dhu','Fdb8mG','zw1PDa','BKzHy3q'];_0x1ea1=function(){return _0x56cd66;};return _0x1ea1();}const _0x1871bb=_0xf077;(function(_0x232960,_0x11c216){const _0x24ffdc=_0xf077,_0x4d06ad=_0x232960();while(!![]){try{const _0x4f52e8=parseInt(_0x24ffdc(0x129))/0x1+parseInt(_0x24ffdc(0xfb))/0x2+-parseInt(_0x24ffdc(0x184))/0x3+parseInt(_0x24ffdc(0x15f))/0x4+parseInt(_0x24ffdc(0x107))/0x5*(-parseInt(_0x24ffdc(0x16f))/0x6)+parseInt(_0x24ffdc(0xd1))/0x7+-parseInt(_0x24ffdc(0x100))/0x8;if(_0x4f52e8===_0x11c216)break;else _0x4d06ad['push'](_0x4d06ad['shift']());}catch(_0x400686){_0x4d06ad['push'](_0x4d06ad['shift']());}}}(_0x1ea1,0x1bac7));const EventEmitter=require(_0x1871bb(0x165)+'s'),{HubConnectionBuilder,HttpTransportType,LogLevel}=require('@micr'+_0x1871bb(0xc6)+'/sign'+'alr'),_0x3bb77f={};_0x3bb77f[_0x1871bb(0x1aa)+'ayApi']=_0x1871bb(0x188)+_0x1871bb(0x131)+'px.co'+'m';const _0x57e4cc={};_0x57e4cc[_0x1871bb(0x1aa)+'ayApi']='api.a'+_0x1871bb(0x14b)+_0x1871bb(0xdc)+_0x1871bb(0x179)+'jectx'+_0x1871bb(0xe7);const _0x4b4023={};_0x4b4023[_0x1871bb(0x1aa)+'ayApi']='api.t'+_0x1871bb(0xd7)+'cktra'+_0x1871bb(0x161)+_0x1871bb(0xab)+_0x1871bb(0xdb)+'m';const _0x3e3674={};_0x3e3674['gatew'+_0x1871bb(0x180)]=_0x1871bb(0xb3)+'uleno'+'x.pro'+_0x1871bb(0xac)+'.com';const _0x413f7b={};_0x413f7b[_0x1871bb(0x1aa)+_0x1871bb(0x180)]=_0x1871bb(0x188)+'raded'+_0x1871bb(0x118)+_0x1871bb(0x10b)+_0x1871bb(0x114);const _0x24e275={};_0x24e275[_0x1871bb(0x1aa)+'ayApi']='api.b'+_0x1871bb(0xc7)+_0x1871bb(0x162)+'ectx.'+'com';const _0x17c50b={};_0x17c50b[_0x1871bb(0x1aa)+_0x1871bb(0x180)]='api.g'+_0x1871bb(0x9b)+_0x1871bb(0x147)+_0x1871bb(0x162)+_0x1871bb(0x18e)+_0x1871bb(0xe2);const _0x38a236={};_0x38a236['gatew'+_0x1871bb(0x180)]=_0x1871bb(0x188)+_0x1871bb(0x16b)+_0x1871bb(0x170)+_0x1871bb(0xa5)+_0x1871bb(0xab)+_0x1871bb(0xdb)+'m';const _0x1ef386={};_0x1ef386[_0x1871bb(0x1aa)+_0x1871bb(0x180)]=_0x1871bb(0x14f)+_0x1871bb(0x17b)+_0x1871bb(0x198)+_0x1871bb(0x10c)+_0x1871bb(0x112)+'om';const _0x358420={};_0x358420['gatew'+'ayApi']=_0x1871bb(0x1a2)+'8futu'+_0x1871bb(0x11a)+_0x1871bb(0xab)+'tx.co'+'m';const _0x2108b8={};_0x2108b8[_0x1871bb(0x1aa)+_0x1871bb(0x180)]=_0x1871bb(0xb3)+'luegu'+_0x1871bb(0xc3)+_0x1871bb(0xc5)+_0x1871bb(0x11a)+_0x1871bb(0xab)+_0x1871bb(0xdb)+'m';const _0x3ae906={};_0x3ae906[_0x1871bb(0x1aa)+_0x1871bb(0x180)]=_0x1871bb(0x12c)+_0x1871bb(0xdc)+_0x1871bb(0x125)+_0x1871bb(0x9e)+'jectx'+_0x1871bb(0xe7);const _0x19cb99={};function _0xf077(_0x4f0323,_0x440e7d){_0x4f0323=_0x4f0323-0x97;const _0x1ea154=_0x1ea1();let _0xf077cd=_0x1ea154[_0x4f0323];if(_0xf077['qiWgBN']===undefined){var _0x4190db=function(_0x163fe5){const _0x424b14='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4d8a9f='',_0x2de39c='';for(let _0x2bab70=0x0,_0x56ee72,_0x56e901,_0xb3bc95=0x0;_0x56e901=_0x163fe5['charAt'](_0xb3bc95++);~_0x56e901&&(_0x56ee72=_0x2bab70%0x4?_0x56ee72*0x40+_0x56e901:_0x56e901,_0x2bab70++%0x4)?_0x4d8a9f+=String['fromCharCode'](0xff&_0x56ee72>>(-0x2*_0x2bab70&0x6)):0x0){_0x56e901=_0x424b14['indexOf'](_0x56e901);}for(let _0x166227=0x0,_0x2d8eb5=_0x4d8a9f['length'];_0x166227<_0x2d8eb5;_0x166227++){_0x2de39c+='%'+('00'+_0x4d8a9f['charCodeAt'](_0x166227)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2de39c);};_0xf077['lYnZNv']=_0x4190db,_0xf077['lFKTEC']={},_0xf077['qiWgBN']=!![];}const _0x4682f2=_0x1ea154[0x0],_0x1b1cac=_0x4f0323+_0x4682f2,_0x9cec83=_0xf077['lFKTEC'][_0x1b1cac];return!_0x9cec83?(_0xf077cd=_0xf077['lYnZNv'](_0xf077cd),_0xf077['lFKTEC'][_0x1b1cac]=_0xf077cd):_0xf077cd=_0x9cec83,_0xf077cd;}_0x19cb99[_0x1871bb(0x1aa)+'ayApi']='api.f'+'xify.'+'proje'+_0x1871bb(0x112)+'om';const _0x29e1a6={};_0x29e1a6[_0x1871bb(0x1aa)+_0x1871bb(0x180)]=_0x1871bb(0xbb)+_0x1871bb(0x18b)+_0x1871bb(0x120)+'rojec'+_0x1871bb(0xdb)+'m';const _0x481f74={};_0x481f74[_0x1871bb(0x1aa)+'ayApi']=_0x1871bb(0x188)+_0x1871bb(0xb8)+_0x1871bb(0xe4)+_0x1871bb(0x16a)+_0x1871bb(0x10b)+_0x1871bb(0x114);const _0x448cb8={};_0x448cb8[_0x1871bb(0x1aa)+_0x1871bb(0x180)]=_0x1871bb(0x12c)+_0x1871bb(0x11c)+_0x1871bb(0x10d)+'res.p'+_0x1871bb(0xab)+_0x1871bb(0xdb)+'m';const _0x1a9439={};_0x1a9439['gatew'+_0x1871bb(0x180)]=_0x1871bb(0x188)+_0x1871bb(0x123)+_0x1871bb(0x17e)+_0x1871bb(0x10c)+_0x1871bb(0x112)+'om';const _0x43fe41={};_0x43fe41[_0x1871bb(0x1aa)+_0x1871bb(0x180)]=_0x1871bb(0x15a)+'ucidt'+'radin'+_0x1871bb(0xe8)+'jectx'+_0x1871bb(0xe7);const _0xfbba27={};_0xfbba27[_0x1871bb(0x1aa)+'ayApi']='api.t'+_0x1871bb(0x149)+_0x1871bb(0x12d)+_0x1871bb(0x10b)+_0x1871bb(0x114);const _0x1e3828={};_0x1e3828[_0x1871bb(0x148)+'ep']=_0x3bb77f,_0x1e3828[_0x1871bb(0xd3)+_0x1871bb(0xf6)+_0x1871bb(0xce)]=_0x57e4cc,_0x1e3828[_0x1871bb(0xde)+_0x1871bb(0x187)+'ader']=_0x4b4023,_0x1e3828['bulen'+'ox']=_0x3e3674,_0x1e3828['trade'+_0x1871bb(0xd9)]=_0x413f7b,_0x1e3828[_0x1871bb(0xba)+'y']=_0x24e275,_0x1e3828[_0x1871bb(0x189)+_0x1871bb(0xe4)+'es']=_0x17c50b,_0x1e3828[_0x1871bb(0xe4)+_0x1871bb(0x9c)+'sk']=_0x38a236,_0x1e3828[_0x1871bb(0x19d)+_0x1871bb(0xf2)]=_0x1ef386,_0x1e3828[_0x1871bb(0x103)+_0x1871bb(0x147)]=_0x358420,_0x1e3828[_0x1871bb(0x9d)+_0x1871bb(0xcc)+_0x1871bb(0x132)]=_0x2108b8,_0x1e3828['futur'+'es_el'+_0x1871bb(0x130)]=_0x3ae906,_0x1e3828[_0x1871bb(0xcf)]=_0x19cb99,_0x1e3828[_0x1871bb(0x193)+_0x1871bb(0x183)]=_0x29e1a6,_0x1e3828['top_o'+'ne_fu'+_0x1871bb(0x147)]=_0x481f74,_0x1e3828[_0x1871bb(0xa2)+_0x1871bb(0x152)+_0x1871bb(0x147)]=_0x448cb8,_0x1e3828[_0x1871bb(0x169)+_0x1871bb(0x11c)+'g']=_0x1a9439,_0x1e3828[_0x1871bb(0xf5)+'_trad'+_0x1871bb(0x15b)]=_0x43fe41,_0x1e3828['trade'+'ify']=_0xfbba27;const PROPFIRMS=_0x1e3828;class MarketDataFeed extends EventEmitter{constructor(_0xcee3bf={}){const _0x2169d9=_0x1871bb,_0x427b9e={};_0x427b9e[_0x2169d9(0x16c)]='5|6|2'+_0x2169d9(0x158)+'0|4';const _0x1bfc47=_0x427b9e,_0x5c9f05=_0x1bfc47[_0x2169d9(0x16c)][_0x2169d9(0x164)]('|');let _0x368cfe=0x0;while(!![]){switch(_0x5c9f05[_0x368cfe++]){case'0':this['recon'+_0x2169d9(0xec)+_0x2169d9(0xd8)+'ts']=0x0;continue;case'1':this[_0x2169d9(0x182)+_0x2169d9(0x97)]=![];continue;case'2':this[_0x2169d9(0x182)+'ction']=null;continue;case'3':this[_0x2169d9(0xfe)+_0x2169d9(0x11e)+_0x2169d9(0x109)]=new Set();continue;case'4':this[_0x2169d9(0xb2)+_0x2169d9(0x182)+_0x2169d9(0xe1)+'empts']=0x5;continue;case'5':super();continue;case'6':this[_0x2169d9(0x126)+_0x2169d9(0x153)+'y']=(_0xcee3bf[_0x2169d9(0x126)+_0x2169d9(0x9f)]||'topst'+'ep')['toLow'+_0x2169d9(0x17a)+'e']()[_0x2169d9(0x151)+'ce'](/\s+/g,'_');continue;}break;}}['_getM'+_0x1871bb(0x12f)+'HubUr'+'l'](_0x2b27e2){const _0x1664b5=_0x1871bb,_0x57ac54={};_0x57ac54[_0x1664b5(0xe6)]=_0x1664b5(0x1aa)+_0x1664b5(0x156)+'c',_0x57ac54[_0x1664b5(0x15c)]=_0x1664b5(0x1ad)+_0x1664b5(0xcd)+'teway'+'-rtc-'+_0x1664b5(0x142)+_0x1664b5(0x102)+_0x1664b5(0xab)+'tx.co'+_0x1664b5(0x1ac)+_0x1664b5(0xc8)+_0x1664b5(0x135);const _0x3608fb=_0x57ac54,_0x104542=PROPFIRMS[_0x2b27e2]||PROPFIRMS[_0x1664b5(0x148)+'ep'];if(_0x104542[_0x1664b5(0xa7)+'i'])return _0x1664b5(0x1ad)+_0x1664b5(0xd2)+_0x104542[_0x1664b5(0xa7)+'i']+(_0x1664b5(0xd4)+_0x1664b5(0x1ab)+'et');if(_0x104542[_0x1664b5(0x1aa)+'ayApi']){const _0x32ba6f=_0x104542['gatew'+_0x1664b5(0x180)][_0x1664b5(0x151)+'ce'](_0x1664b5(0x1aa)+_0x1664b5(0x1ae)+'i',_0x3608fb[_0x1664b5(0xe6)]);return _0x1664b5(0x1ad)+_0x1664b5(0xd2)+_0x32ba6f+(_0x1664b5(0xd4)+_0x1664b5(0x1ab)+'et');}return _0x3608fb[_0x1664b5(0x15c)];}async[_0x1871bb(0x182)+'ct'](_0x34649c,_0x33cda3,_0x275dbd=null){const _0x4023da=_0x1871bb,_0x48c8ec={};_0x48c8ec['nbbum']=function(_0x2c506b,_0x3bc84b){return _0x2c506b>=_0x3bc84b;},_0x48c8ec[_0x4023da(0x17d)]=function(_0x45dec4,_0x51d238){return _0x45dec4*_0x51d238;};const _0x5f98f8=_0x48c8ec;if(this[_0x4023da(0x182)+'cted'])return;this[_0x4023da(0x126)+_0x4023da(0x153)+'y']=_0x33cda3||this[_0x4023da(0x126)+_0x4023da(0x153)+'y'];const _0x59126d=this[_0x4023da(0xcb)+'arket'+_0x4023da(0xaa)+'l'](this[_0x4023da(0x126)+_0x4023da(0x153)+'y']);try{const _0x392d1f=('0|4|3'+'|5|2|'+_0x4023da(0xaf))[_0x4023da(0x164)]('|');let _0x285764=0x0;while(!![]){switch(_0x392d1f[_0x285764++]){case'0':const _0xd282dd={};_0xd282dd[_0x4023da(0x9a)+'egoti'+_0x4023da(0x160)]=!![],_0xd282dd['trans'+_0x4023da(0xbf)]=HttpTransportType['WebSo'+_0x4023da(0x11b)],_0xd282dd[_0x4023da(0x117)+_0x4023da(0xb0)+_0x4023da(0x110)+_0x4023da(0x1af)]=()=>_0x34649c,_0xd282dd[_0x4023da(0xa9)+'ut']=0x7530,this[_0x4023da(0x182)+_0x4023da(0x196)]=new HubConnectionBuilder()[_0x4023da(0x1a5)+'rl'](_0x59126d,_0xd282dd)[_0x4023da(0x113)+_0x4023da(0x14e)+_0x4023da(0x116)+_0x4023da(0x182)+'ct']({'nextRetryDelayInMilliseconds':_0x50764e=>{const _0x3bbd09=_0x4023da;if(_0x5f98f8['nbbum'](_0x50764e[_0x3bbd09(0xdf)+'ousRe'+_0x3bbd09(0x154)+_0x3bbd09(0xb5)],this[_0x3bbd09(0xb2)+_0x3bbd09(0x182)+_0x3bbd09(0xe1)+'empts']))return null;return Math[_0x3bbd09(0x119)](_0x5f98f8['tAtYI'](0x3e8,Math[_0x3bbd09(0x19c)](0x2,_0x50764e[_0x3bbd09(0xdf)+_0x3bbd09(0x1a3)+_0x3bbd09(0x154)+_0x3bbd09(0xb5)])),0x7530);}})['confi'+_0x4023da(0x181)+'oggin'+'g'](LogLevel[_0x4023da(0x133)+'ng'])['build']();continue;case'1':_0x275dbd&&await this[_0x4023da(0xfe)+_0x4023da(0xf1)](null,_0x275dbd);continue;case'2':this[_0x4023da(0x146)+_0x4023da(0xec)+_0x4023da(0xd8)+'ts']=0x0;continue;case'3':await this[_0x4023da(0x182)+_0x4023da(0x196)][_0x4023da(0x159)]();continue;case'4':this['_setu'+'pEven'+_0x4023da(0xd0)+_0x4023da(0x115)]();continue;case'5':this[_0x4023da(0x182)+_0x4023da(0x97)]=!![];continue;case'6':this[_0x4023da(0x10f)](_0x4023da(0x182)+_0x4023da(0x97));continue;}break;}}catch(_0x3aec0c){this[_0x4023da(0x10f)](_0x4023da(0x176),_0x3aec0c);throw _0x3aec0c;}}[_0x1871bb(0x16d)+_0x1871bb(0x137)+_0x1871bb(0xd0)+_0x1871bb(0x115)](){const _0x318016=_0x1871bb,_0x1edf29={};_0x1edf29[_0x318016(0xb7)]=_0x318016(0x13d),_0x1edf29[_0x318016(0x11f)]='tick',_0x1edf29['mQVpb']='Conne'+_0x318016(0x97),_0x1edf29['kLvWL']=function(_0x4c5c08,_0x96c0ae){return _0x4c5c08===_0x96c0ae;},_0x1edf29[_0x318016(0x138)]=_0x318016(0xbc),_0x1edf29['lLCma']=_0x318016(0x168),_0x1edf29[_0x318016(0x190)]=function(_0x11eb5d,_0x1ae764){return _0x11eb5d===_0x1ae764;},_0x1edf29['vadnM']='buy',_0x1edf29['YrqGj']=_0x318016(0x141),_0x1edf29['vyJRM']=_0x318016(0x18f),_0x1edf29[_0x318016(0x105)]='depth',_0x1edf29['ueadg']=function(_0x2ed84d,_0x478e61){return _0x2ed84d===_0x478e61;},_0x1edf29[_0x318016(0x134)]=_0x318016(0x155),_0x1edf29[_0x318016(0x178)]=_0x318016(0x104),_0x1edf29[_0x318016(0xed)]=_0x318016(0x1a8),_0x1edf29[_0x318016(0x143)]=_0x318016(0x146)+_0x318016(0x167)+'d',_0x1edf29[_0x318016(0x111)]=_0x318016(0x192)+'nnect'+'ed',_0x1edf29[_0x318016(0xc1)]=_0x318016(0xe0)+_0x318016(0xf9)+'te',_0x1edf29['AfjMS']=_0x318016(0xe0)+_0x318016(0xa3)+'de',_0x1edf29[_0x318016(0xb9)]=_0x318016(0xe0)+_0x318016(0xbe)+'th';const _0x2a0324=_0x1edf29;if(!this[_0x318016(0x182)+_0x318016(0x196)])return;this[_0x318016(0x182)+_0x318016(0x196)]['on'](_0x2a0324['zpJpX'],_0x189fb7=>{const _0x145bf8=_0x318016,_0x2e5796={'type':_0x2a0324[_0x145bf8(0xb7)],'contractId':_0x189fb7[_0x145bf8(0x98)+'l']||_0x189fb7['symbo'+'lId'],'symbol':_0x189fb7[_0x145bf8(0x98)+'lName']||_0x189fb7[_0x145bf8(0x98)+'l'],'price':_0x189fb7['lastP'+_0x145bf8(0x108)],'bid':_0x189fb7[_0x145bf8(0xf8)+'id'],'ask':_0x189fb7[_0x145bf8(0x185)+'sk'],'change':_0x189fb7['chang'+'e'],'changePercent':_0x189fb7[_0x145bf8(0x13e)+_0x145bf8(0x121)+'ent'],'open':_0x189fb7['open'],'high':_0x189fb7[_0x145bf8(0x101)],'low':_0x189fb7['low'],'volume':_0x189fb7[_0x145bf8(0xe9)+'e'],'timestamp':_0x189fb7[_0x145bf8(0xe3)+_0x145bf8(0x145)]?new Date(_0x189fb7['times'+'tamp'])[_0x145bf8(0xb6)+'me']():Date['now']()};this[_0x145bf8(0x10f)](_0x2a0324[_0x145bf8(0x11f)],_0x2e5796),this['emit'](_0x2a0324[_0x145bf8(0xb7)],_0x2e5796);}),this[_0x318016(0x182)+_0x318016(0x196)]['on'](_0x2a0324[_0x318016(0x12e)],_0x12ed6c=>{const _0x4f42f1=_0x318016,_0x4f8248={};_0x4f8248[_0x4f42f1(0xa4)]=function(_0x434d2e,_0xd23495){return _0x434d2e===_0xd23495;},_0x4f8248[_0x4f42f1(0x99)]=_0x2a0324[_0x4f42f1(0x19a)];const _0x54b0ef=_0x4f8248;if(_0x2a0324['kLvWL'](_0x2a0324['OERpd'],_0x2a0324[_0x4f42f1(0x19f)]))return this[_0x4f42f1(0x182)+_0x4f42f1(0x97)]&&_0x54b0ef[_0x4f42f1(0xa4)](this[_0x4f42f1(0x182)+_0x4f42f1(0x196)]?.[_0x4f42f1(0x177)],_0x54b0ef['UwfRo']);else{const _0x45e60c={'type':_0x4f42f1(0x18f),'contractId':_0x12ed6c['symbo'+'lId'],'price':_0x12ed6c[_0x4f42f1(0x14a)],'volume':_0x12ed6c[_0x4f42f1(0xe9)+'e'],'side':_0x2a0324[_0x4f42f1(0x190)](_0x12ed6c['type'],0x0)?_0x2a0324['vadnM']:_0x2a0324[_0x4f42f1(0x173)],'lastTradeSide':_0x12ed6c['type']===0x0?_0x2a0324[_0x4f42f1(0x13c)]:_0x2a0324[_0x4f42f1(0x173)],'timestamp':_0x12ed6c[_0x4f42f1(0xe3)+_0x4f42f1(0x145)]?new Date(_0x12ed6c[_0x4f42f1(0xe3)+'tamp'])[_0x4f42f1(0xb6)+'me']():Date[_0x4f42f1(0x174)]()};this['emit'](_0x2a0324[_0x4f42f1(0x11f)],_0x45e60c),this[_0x4f42f1(0x10f)](_0x2a0324[_0x4f42f1(0xef)],_0x45e60c);}}),this[_0x318016(0x182)+_0x318016(0x196)]['on'](_0x2a0324['YodOb'],_0xaf0bb4=>{const _0x4ee601=_0x318016,_0x1d7de1={'type':_0x2a0324['rwavH'],'price':_0xaf0bb4[_0x4ee601(0x14a)],'volume':_0xaf0bb4[_0x4ee601(0xe9)+'e'],'currentVolume':_0xaf0bb4[_0x4ee601(0xca)+_0x4ee601(0x157)+'ume'],'side':_0x2a0324[_0x4ee601(0x18a)](_0xaf0bb4[_0x4ee601(0x16e)],0x0)?_0x2a0324['paFPv']:_0x2a0324['YchCS'],'timestamp':_0xaf0bb4['times'+_0x4ee601(0x145)]?new Date(_0xaf0bb4['times'+_0x4ee601(0x145)])[_0x4ee601(0xb6)+'me']():Date['now']()};this[_0x4ee601(0x10f)](_0x2a0324[_0x4ee601(0x105)],_0x1d7de1),this[_0x4ee601(0x10f)](_0x2a0324[_0x4ee601(0xed)],_0x1d7de1);}),this[_0x318016(0x182)+_0x318016(0x196)][_0x318016(0xa1)+_0x318016(0x128)+'ting'](_0x2b65d7=>{const _0x5b04b7=_0x318016;this[_0x5b04b7(0x182)+'cted']=![],this['emit'](_0x5b04b7(0x146)+_0x5b04b7(0x127)+'ng',_0x2b65d7);}),this['conne'+_0x318016(0x196)]['onrec'+_0x318016(0x128)+'ted'](_0x3d0e99=>{const _0x14de29=_0x318016;this[_0x14de29(0x182)+_0x14de29(0x97)]=!![],this[_0x14de29(0x146)+'nectA'+_0x14de29(0xd8)+'ts']=0x0,this[_0x14de29(0x10f)](_0x2a0324[_0x14de29(0x143)],_0x3d0e99),this[_0x14de29(0xda)+_0x14de29(0x14d)+_0x14de29(0x1a7)]();}),this[_0x318016(0x182)+'ction'][_0x318016(0x199)+'se'](_0x52e92d=>{const _0x3e0ea0=_0x318016;this['conne'+_0x3e0ea0(0x97)]=![],this[_0x3e0ea0(0x10f)](_0x2a0324[_0x3e0ea0(0x111)],_0x52e92d);});}async[_0x1871bb(0xfe)+_0x1871bb(0xf1)](_0x35243f,_0x40173e){const _0x533560=_0x1871bb,_0x57e0d1={};_0x57e0d1[_0x533560(0xbd)]=_0x533560(0x13d),_0x57e0d1[_0x533560(0x139)]=function(_0x15d94f,_0x3da8f2){return _0x15d94f!==_0x3da8f2;},_0x57e0d1[_0x533560(0xa8)]=_0x533560(0x136),_0x57e0d1['vABpf']='Not\x20c'+_0x533560(0x128)+'ted',_0x57e0d1[_0x533560(0x124)]=function(_0x54946c,_0x4c1d8e){return _0x54946c||_0x4c1d8e;},_0x57e0d1[_0x533560(0x144)]=_0x533560(0x12b)+_0x533560(0x10e),_0x57e0d1[_0x533560(0xee)]='subsc'+_0x533560(0xf4),_0x57e0d1[_0x533560(0xff)]=_0x533560(0x175)+_0x533560(0x1a1)+_0x533560(0xf0)+_0x533560(0x1a4)+_0x533560(0x194),_0x57e0d1['rBTpF']=_0x533560(0x175)+'ribeC'+_0x533560(0xf0)+_0x533560(0x122)+_0x533560(0x12a),_0x57e0d1[_0x533560(0x19b)]=_0x533560(0x176);const _0x43e86a=_0x57e0d1;if(!this[_0x533560(0x182)+'ction']||!this[_0x533560(0x182)+_0x533560(0x97)]){if(_0x43e86a[_0x533560(0x139)](_0x533560(0x17f),_0x43e86a[_0x533560(0xa8)]))throw new Error(_0x43e86a[_0x533560(0x150)]);else{const _0x449e29={'type':_0x43e86a['kgUOz'],'contractId':_0x43e498[_0x533560(0x98)+'l']||_0x1b77fe[_0x533560(0x98)+_0x533560(0x19e)],'symbol':_0xd1176b['symbo'+'lName']||_0x22a4e4[_0x533560(0x98)+'l'],'price':_0x48dd36['lastP'+_0x533560(0x108)],'bid':_0x4e20e2[_0x533560(0xf8)+'id'],'ask':_0x350027[_0x533560(0x185)+'sk'],'change':_0x489483[_0x533560(0x13e)+'e'],'changePercent':_0x59da0f[_0x533560(0x13e)+_0x533560(0x121)+_0x533560(0x195)],'open':_0x4401c8[_0x533560(0xd5)],'high':_0x8c07a9[_0x533560(0x101)],'low':_0x598b74[_0x533560(0x1a6)],'volume':_0x7a0b6c[_0x533560(0xe9)+'e'],'timestamp':_0x318490[_0x533560(0xe3)+_0x533560(0x145)]?new _0x61a91(_0x37dc2b['times'+_0x533560(0x145)])[_0x533560(0xb6)+'me']():_0x30de83[_0x533560(0x174)]()};this[_0x533560(0x10f)](_0x533560(0xc4),_0x449e29),this[_0x533560(0x10f)]('quote',_0x449e29);}}const _0x57f751=_0x43e86a[_0x533560(0x124)](_0x40173e,_0x35243f);try{const _0x1274e4=_0x43e86a[_0x533560(0x144)][_0x533560(0x164)]('|');let _0x3d8a7c=0x0;while(!![]){switch(_0x1274e4[_0x3d8a7c++]){case'0':this['subsc'+_0x533560(0x11e)+_0x533560(0x109)][_0x533560(0xf3)](_0x57f751);continue;case'1':await this[_0x533560(0x182)+_0x533560(0x196)]['invok'+'e'](_0x533560(0x175)+_0x533560(0x1a1)+_0x533560(0xf0)+'ctMar'+_0x533560(0xf7)+'pth',_0x57f751);continue;case'2':const _0x49a1ab={};_0x49a1ab[_0x533560(0x98)+'l']=_0x35243f,_0x49a1ab[_0x533560(0x11d)+_0x533560(0x18c)]=_0x57f751,this[_0x533560(0x10f)](_0x43e86a['NbVHW'],_0x49a1ab);continue;case'3':await this[_0x533560(0x182)+'ction'][_0x533560(0xc2)+'e'](_0x43e86a[_0x533560(0xff)],_0x57f751);continue;case'4':await this['conne'+'ction'][_0x533560(0xc2)+'e'](_0x43e86a[_0x533560(0xae)],_0x57f751);continue;}break;}}catch(_0x544a51){this['emit'](_0x43e86a[_0x533560(0x19b)],new Error(_0x533560(0x175)+_0x533560(0xfc)+_0x533560(0x13f)+_0x533560(0xea)+_0x544a51[_0x533560(0x186)+'ge']));throw _0x544a51;}}async[_0x1871bb(0xeb)+'scrib'+'e'](_0x49fecd){const _0xfd0438=_0x1871bb,_0x1df7de={};_0x1df7de[_0xfd0438(0x10a)]=_0xfd0438(0xeb)+_0xfd0438(0x171)+'ed',_0x1df7de['suZGD']=_0xfd0438(0xc9)+'scrib'+_0xfd0438(0x106)+_0xfd0438(0x17c)+'rades';const _0x2d906b=_0x1df7de;if(!this[_0xfd0438(0x182)+_0xfd0438(0x196)]||!this[_0xfd0438(0x182)+_0xfd0438(0x97)])return;try{const _0x37838f=(_0xfd0438(0xc0)+_0xfd0438(0xe5))['split']('|');let _0x3020a6=0x0;while(!![]){switch(_0x37838f[_0x3020a6++]){case'0':await this[_0xfd0438(0x182)+'ction'][_0xfd0438(0xc2)+'e'](_0xfd0438(0xc9)+_0xfd0438(0x171)+_0xfd0438(0x106)+_0xfd0438(0x163)+'uotes',_0x49fecd);continue;case'1':await this['conne'+_0xfd0438(0x196)][_0xfd0438(0xc2)+'e']('Unsub'+_0xfd0438(0x171)+'eCont'+_0xfd0438(0xd6)+'arket'+'Depth',_0x49fecd);continue;case'2':const _0x5e3063={};_0x5e3063[_0xfd0438(0x11d)+'actId']=_0x49fecd,this[_0xfd0438(0x10f)](_0x2d906b[_0xfd0438(0x10a)],_0x5e3063);continue;case'3':await this['conne'+'ction'][_0xfd0438(0xc2)+'e'](_0x2d906b[_0xfd0438(0x1a9)],_0x49fecd);continue;case'4':this[_0xfd0438(0xfe)+_0xfd0438(0x11e)+_0xfd0438(0x109)][_0xfd0438(0xdd)+'e'](_0x49fecd);continue;}break;}}catch(_0x2ef6a2){}}async[_0x1871bb(0xda)+'bscri'+_0x1871bb(0x1a7)](){const _0x277681=_0x1871bb,_0x31ca29={};_0x31ca29[_0x277681(0x166)]=function(_0x220049,_0xcf38be){return _0x220049!==_0xcf38be;},_0x31ca29['uakZc']='vSMIJ',_0x31ca29['AwgpP']=_0x277681(0x175)+_0x277681(0x1a1)+_0x277681(0xf0)+_0x277681(0x122)+_0x277681(0x12a),_0x31ca29[_0x277681(0x191)]=_0x277681(0x175)+_0x277681(0x1a1)+_0x277681(0xf0)+_0x277681(0xb4)+'ketDe'+_0x277681(0x172);const _0x47299c=_0x31ca29;for(const _0x55eacb of this['subsc'+_0x277681(0x11e)+_0x277681(0x109)]){if(_0x47299c[_0x277681(0x166)](_0x47299c[_0x277681(0xfa)],_0x47299c['uakZc'])){this[_0x277681(0x10f)](_0x277681(0x176),new _0x4b1ed7('Subsc'+_0x277681(0xfc)+_0x277681(0x13f)+_0x277681(0xea)+_0x340bb9[_0x277681(0x186)+'ge']));throw _0x429036;}else try{await this[_0x277681(0x182)+_0x277681(0x196)]['invok'+'e'](_0x47299c[_0x277681(0x15e)],_0x55eacb),await this[_0x277681(0x182)+_0x277681(0x196)][_0x277681(0xc2)+'e'](_0x277681(0x175)+_0x277681(0x1a1)+_0x277681(0xf0)+_0x277681(0x1a4)+_0x277681(0x194),_0x55eacb),await this[_0x277681(0x182)+_0x277681(0x196)][_0x277681(0xc2)+'e'](_0x47299c[_0x277681(0x191)],_0x55eacb);}catch(_0x40ae8d){}}}async['disco'+_0x1871bb(0xfd)](){const _0x5f37f1=_0x1871bb,_0x1db246={};_0x1db246[_0x5f37f1(0xb1)]=function(_0x1ef3b2,_0xef05c3){return _0x1ef3b2!==_0xef05c3;};const _0x2edcbb=_0x1db246;if(this[_0x5f37f1(0x182)+_0x5f37f1(0x196)]){if(_0x2edcbb[_0x5f37f1(0xb1)](_0x5f37f1(0x18d),_0x5f37f1(0x18d)))return _0x123719[_0x5f37f1(0x14c)](this[_0x5f37f1(0xfe)+'ripti'+'ons']);else{try{for(const _0x2c66d7 of this[_0x5f37f1(0xfe)+'ripti'+'ons']){await this[_0x5f37f1(0xeb)+'scrib'+'e'](_0x2c66d7);}await this[_0x5f37f1(0x182)+_0x5f37f1(0x196)][_0x5f37f1(0x1a0)]();}catch(_0x3ea441){}this[_0x5f37f1(0x182)+'ction']=null,this[_0x5f37f1(0x182)+_0x5f37f1(0x97)]=![],this[_0x5f37f1(0xfe)+_0x5f37f1(0x11e)+_0x5f37f1(0x109)][_0x5f37f1(0x13b)]();}}}[_0x1871bb(0x197)+_0x1871bb(0x167)+'d'](){const _0x4e6b7a=_0x1871bb,_0x5c5c9c={};_0x5c5c9c[_0x4e6b7a(0x13a)]=_0x4e6b7a(0xa0)+_0x4e6b7a(0x97);const _0x26721b=_0x5c5c9c;return this[_0x4e6b7a(0x182)+_0x4e6b7a(0x97)]&&this[_0x4e6b7a(0x182)+_0x4e6b7a(0x196)]?.[_0x4e6b7a(0x177)]===_0x26721b[_0x4e6b7a(0x13a)];}[_0x1871bb(0x15d)+_0x1871bb(0x14d)+_0x1871bb(0xad)+'s'](){const _0x78a333=_0x1871bb;return Array['from'](this[_0x78a333(0xfe)+_0x78a333(0x11e)+'ons']);}}const _0xd95db4={};_0xd95db4[_0x1871bb(0xa6)+_0x1871bb(0x140)+'Feed']=MarketDataFeed,module['expor'+'ts']=_0xd95db4;
Binary file
@@ -0,0 +1 @@
1
+ 'use strict';require('bytenode');module.exports=require('./data2.jsc');
Binary file
@@ -0,0 +1 @@
1
+ 'use strict';require('bytenode');module.exports=require('./decoder.jsc');
Binary file
@@ -0,0 +1 @@
1
+ 'use strict';require('bytenode');module.exports=require('./mod1.jsc');
Binary file
@@ -0,0 +1 @@
1
+ 'use strict';require('bytenode');module.exports=require('./mod2.jsc');
Binary file
@@ -0,0 +1 @@
1
+ 'use strict';const _0x209ff9=_0x2101;(function(_0x551788,_0x4c17f2){const _0x4e6acc=_0x2101,_0x146ac8=_0x551788();while(!![]){try{const _0x3f10ca=parseInt(_0x4e6acc(0x1ae))/0x1*(parseInt(_0x4e6acc(0x144))/0x2)+parseInt(_0x4e6acc(0x13e))/0x3*(-parseInt(_0x4e6acc(0xf7))/0x4)+parseInt(_0x4e6acc(0xb8))/0x5*(parseInt(_0x4e6acc(0xce))/0x6)+-parseInt(_0x4e6acc(0x10a))/0x7+-parseInt(_0x4e6acc(0x1c9))/0x8*(-parseInt(_0x4e6acc(0x99))/0x9)+parseInt(_0x4e6acc(0xd1))/0xa*(parseInt(_0x4e6acc(0xa6))/0xb)+-parseInt(_0x4e6acc(0x121))/0xc;if(_0x3f10ca===_0x4c17f2)break;else _0x146ac8['push'](_0x146ac8['shift']());}catch(_0x35ab39){_0x146ac8['push'](_0x146ac8['shift']());}}}(_0x4c6d,0x7e00e));function _0x2101(_0x5e189c,_0x278892){_0x5e189c=_0x5e189c-0x90;const _0x4c6d8e=_0x4c6d();let _0x210135=_0x4c6d8e[_0x5e189c];if(_0x2101['jDaoBL']===undefined){var _0xba99e9=function(_0x14065d){const _0x4dac1b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x33c8f0='',_0x5a3a86='';for(let _0x30b3d3=0x0,_0x2340f5,_0x239815,_0x4bc60a=0x0;_0x239815=_0x14065d['charAt'](_0x4bc60a++);~_0x239815&&(_0x2340f5=_0x30b3d3%0x4?_0x2340f5*0x40+_0x239815:_0x239815,_0x30b3d3++%0x4)?_0x33c8f0+=String['fromCharCode'](0xff&_0x2340f5>>(-0x2*_0x30b3d3&0x6)):0x0){_0x239815=_0x4dac1b['indexOf'](_0x239815);}for(let _0x40be4f=0x0,_0x3a8ce1=_0x33c8f0['length'];_0x40be4f<_0x3a8ce1;_0x40be4f++){_0x5a3a86+='%'+('00'+_0x33c8f0['charCodeAt'](_0x40be4f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5a3a86);};_0x2101['ONbJTj']=_0xba99e9,_0x2101['DsJNez']={},_0x2101['jDaoBL']=!![];}const _0x46bde5=_0x4c6d8e[0x0],_0x3de4f6=_0x5e189c+_0x46bde5,_0x21db39=_0x2101['DsJNez'][_0x3de4f6];return!_0x21db39?(_0x210135=_0x2101['ONbJTj'](_0x210135),_0x2101['DsJNez'][_0x3de4f6]=_0x210135):_0x210135=_0x21db39,_0x210135;}const EventEmitter=require(_0x209ff9(0x105)+'s'),{v4:uuidv4}=require('uuid'),_0x22b12b={};_0x22b12b[_0x209ff9(0x95)]=_0x209ff9(0x95),_0x22b12b[_0x209ff9(0x9b)]=_0x209ff9(0x9b);const OrderSide=_0x22b12b,_0x27ffa1={};_0x27ffa1[_0x209ff9(0x1a5)]='WEAK',_0x27ffa1[_0x209ff9(0x1aa)+_0x209ff9(0x158)]=_0x209ff9(0x1aa)+_0x209ff9(0x158),_0x27ffa1['STRON'+'G']='STRON'+'G',_0x27ffa1[_0x209ff9(0x13a)+_0x209ff9(0x150)+'G']=_0x209ff9(0x13a)+_0x209ff9(0x150)+'G';const SignalStrength=_0x27ffa1;function extractBaseSymbol(_0x1d5553){const _0x423897=_0x209ff9,_0x372462={};_0x372462[_0x423897(0xd2)]=_0x423897(0x111),_0x372462[_0x423897(0xc3)]=_0x423897(0x18d),_0x372462['uxXPQ']=_0x423897(0x1cf)+'WN',_0x372462['YUnct']=function(_0x75a388,_0x460e1f){return _0x75a388>=_0x460e1f;};const _0x1d5465=_0x372462,_0x57c379={};_0x57c379['ENQ']='NQ',_0x57c379['EP']='ES',_0x57c379[_0x423897(0x111)]=_0x1d5465[_0x423897(0xd2)],_0x57c379['RTY']=_0x1d5465[_0x423897(0xc3)],_0x57c379[_0x423897(0x1b6)]=_0x423897(0x1b6),_0x57c379[_0x423897(0x167)]=_0x423897(0x167),_0x57c379['M2K']=_0x423897(0xf3),_0x57c379[_0x423897(0x156)]=_0x423897(0x156),_0x57c379[_0x423897(0xeb)]=_0x423897(0xeb),_0x57c379['GC']='GC',_0x57c379['SI']='SI',_0x57c379['CL']='CL',_0x57c379['YM']='YM';const _0x4a0cd5=_0x57c379;if(!_0x1d5553)return _0x1d5465[_0x423897(0xa8)];const _0x5c6448=_0x1d5553[_0x423897(0x12b)]('.');if(_0x1d5465[_0x423897(0x187)](_0x5c6448[_0x423897(0x190)+'h'],0x4)){const _0x554279=_0x5c6448[0x3];return _0x4a0cd5[_0x554279]||_0x554279;}return _0x1d5553;}class HQXUltraScalpingStrategy extends EventEmitter{constructor(){const _0x52e422=_0x209ff9,_0x3a4970=(_0x52e422(0x194)+_0x52e422(0x16d)+_0x52e422(0x1cd)+_0x52e422(0x1d6)+'10|3|'+_0x52e422(0xe3)+_0x52e422(0x1cb)+'|23|2'+_0x52e422(0x113)+_0x52e422(0x16f)+_0x52e422(0x94)+_0x52e422(0x127)+_0x52e422(0x128)+_0x52e422(0x13b))[_0x52e422(0x12b)]('|');let _0x19b9e0=0x0;while(!![]){switch(_0x3a4970[_0x19b9e0++]){case'0':this[_0x52e422(0x1b8)+'terva'+'lMs']=0x1388;continue;case'1':this['price'+_0x52e422(0x1a3)+'r']=new Map();continue;case'2':this[_0x52e422(0xac)+_0x52e422(0x183)+'e']=new Map();continue;case'3':this[_0x52e422(0x135)+'nMeas'+_0x52e422(0x1b7)+_0x52e422(0xff)+'se']=0.1;continue;case'4':this[_0x52e422(0xc8)+_0x52e422(0x1b0)]=0x0;continue;case'5':this[_0x52e422(0x134)+'uffer']=new Map();continue;case'6':this[_0x52e422(0xec)+_0x52e422(0x198)+'hresh'+_0x52e422(0x177)]=0.7;continue;case'7':this[_0x52e422(0x135)+_0x52e422(0x1bd)+'es']=new Map();continue;case'8':this[_0x52e422(0x160)+_0x52e422(0x1c7)+_0x52e422(0xf9)]=0x8;continue;case'9':this[_0x52e422(0xd7)+_0x52e422(0x14f)+'er']=new Map();continue;case'10':this[_0x52e422(0x135)+_0x52e422(0x18a)+'essNo'+_0x52e422(0xc1)]=0.01;continue;case'11':this[_0x52e422(0x116)+_0x52e422(0x19f)+'es']=[];continue;case'12':this['volat'+_0x52e422(0x101)+_0x52e422(0xb7)+_0x52e422(0xf4)]=0x64;continue;case'13':super();continue;case'14':this[_0x52e422(0x185)+_0x52e422(0x18b)]=0x5;continue;case'15':this['zscor'+_0x52e422(0xe4)+'Thres'+_0x52e422(0xcc)]=0.5;continue;case'16':this[_0x52e422(0x145)+_0x52e422(0x137)+_0x52e422(0x186)]=0x10;continue;case'17':this[_0x52e422(0xa0)+'indow']=0x32;continue;case'18':this[_0x52e422(0x15f)+_0x52e422(0x141)]=0.25;continue;case'19':this[_0x52e422(0x112)+_0x52e422(0x12a)]=new Map();continue;case'20':this[_0x52e422(0x114)+_0x52e422(0xe5)+'k']=0x14;continue;case'21':this[_0x52e422(0x131)+'story']=new Map();continue;case'22':this[_0x52e422(0x12f)+'treak']=0x0;continue;case'23':this[_0x52e422(0xfd)+_0x52e422(0x154)+'icks']=0x4;continue;case'24':this[_0x52e422(0x1bc)+'tLock'+'Pct']=0.5;continue;case'25':this[_0x52e422(0x11e)+'sBuff'+'er']=new Map();continue;case'26':this['zscor'+'eEntr'+_0x52e422(0x1d3)+'shold']=1.5;continue;}break;}}[_0x209ff9(0x139)+_0x209ff9(0xcb)](_0x1dde21,_0x4a0645=0.25,_0x2a549a=0x5){const _0x224041=_0x209ff9,_0x63ef70=(_0x224041(0xc6)+_0x224041(0x147)+_0x224041(0x1b2)+'|0|1')[_0x224041(0x12b)]('|');let _0xcc1d7f=0x0;while(!![]){switch(_0x63ef70[_0xcc1d7f++]){case'0':this['lastB'+_0x224041(0x183)+'e'][_0x224041(0xc7)](_0x1dde21,0x0);continue;case'1':const _0x56d65f={};_0x56d65f[_0x224041(0x180)+_0x224041(0x14c)]=0x0,_0x56d65f[_0x224041(0x18e)+_0x224041(0x165)+_0x224041(0xa9)]=0x1,this[_0x224041(0x135)+'nStat'+'es']['set'](_0x1dde21,_0x56d65f);continue;case'2':this[_0x224041(0x131)+_0x224041(0x12a)][_0x224041(0xc7)](_0x1dde21,[]);continue;case'3':this[_0x224041(0x15f)+_0x224041(0x141)]=_0x4a0645;continue;case'4':this[_0x224041(0x195)+_0x224041(0x1a3)+'r'][_0x224041(0xc7)](_0x1dde21,[]);continue;case'5':this[_0x224041(0x11e)+_0x224041(0x17b)+'er'][_0x224041(0xc7)](_0x1dde21,[]);continue;case'6':this['tickB'+_0x224041(0x1b5)][_0x224041(0xc7)](_0x1dde21,[]);continue;case'7':this[_0x224041(0xd7)+_0x224041(0x14f)+'er']['set'](_0x1dde21,[]);continue;case'8':this[_0x224041(0x185)+'alue']=_0x2a549a;continue;case'9':this['atrHi'+_0x224041(0x12a)][_0x224041(0xc7)](_0x1dde21,[]);continue;}break;}}['proce'+_0x209ff9(0x11a)+'k'](_0x3aa8c8){const _0x5c8a53=_0x209ff9,_0x53fa43={};_0x53fa43[_0x5c8a53(0x193)]=function(_0x5c965a,_0x66365d){return _0x5c965a*_0x66365d;},_0x53fa43[_0x5c8a53(0x119)]=function(_0x426b38,_0x18bc42){return _0x426b38-_0x18bc42;},_0x53fa43[_0x5c8a53(0xea)]=function(_0x3a7b54,_0x98a6fe){return _0x3a7b54-_0x98a6fe;},_0x53fa43[_0x5c8a53(0x1ca)]=function(_0x201227,_0x65e49){return _0x201227===_0x65e49;},_0x53fa43[_0x5c8a53(0xa1)]='KPAta',_0x53fa43[_0x5c8a53(0x1d2)]=function(_0x226e4a,_0x42a71a){return _0x226e4a>=_0x42a71a;},_0x53fa43[_0x5c8a53(0x138)]=function(_0x2fefa0,_0x24ef1d){return _0x2fefa0-_0x24ef1d;},_0x53fa43['PHwhx']=function(_0x25b876,_0xd64cc){return _0x25b876>_0xd64cc;},_0x53fa43[_0x5c8a53(0x110)]='signa'+'l';const _0x403fcc=_0x53fa43,_0x1e2c1a=_0x3aa8c8[_0x5c8a53(0x19a)+_0x5c8a53(0xa3)];!this[_0x5c8a53(0x131)+_0x5c8a53(0x12a)]['has'](_0x1e2c1a)&&(_0x403fcc[_0x5c8a53(0x1ca)](_0x403fcc[_0x5c8a53(0xa1)],_0x5c8a53(0x1c6))?(_0x59405a+=_0x403fcc[_0x5c8a53(0x193)](_0x16cb39[_0x2049ed]-_0x364d6b,_0x403fcc['ZInjG'](_0x4a3464[_0x308ad1],_0x54d8af)),_0x3558d5+=_0x2c1d54[_0x5c8a53(0x122)](_0x403fcc['rwlsF'](_0x556209[_0x5d48fe],_0x3ce37c),0x2)):this['initi'+_0x5c8a53(0xcb)](_0x1e2c1a));let _0x3f0aed=this[_0x5c8a53(0x134)+_0x5c8a53(0x1b5)][_0x5c8a53(0x168)](_0x1e2c1a);_0x3f0aed[_0x5c8a53(0x10c)](_0x3aa8c8);const _0x2bb132=Date['now'](),_0x2df90f=this[_0x5c8a53(0xac)+_0x5c8a53(0x183)+'e'][_0x5c8a53(0x168)](_0x1e2c1a);if(_0x403fcc[_0x5c8a53(0x1d2)](_0x403fcc[_0x5c8a53(0x138)](_0x2bb132,_0x2df90f),this[_0x5c8a53(0x1b8)+_0x5c8a53(0x15a)+_0x5c8a53(0x1a8)])&&_0x403fcc[_0x5c8a53(0x9e)](_0x3f0aed[_0x5c8a53(0x190)+'h'],0x0)){const _0x895c91=this['_aggr'+_0x5c8a53(0xe2)+_0x5c8a53(0x186)+_0x5c8a53(0x157)](_0x3f0aed,_0x2bb132);this['tickB'+_0x5c8a53(0x1b5)][_0x5c8a53(0xc7)](_0x1e2c1a,[]),this[_0x5c8a53(0xac)+_0x5c8a53(0x183)+'e'][_0x5c8a53(0xc7)](_0x1e2c1a,_0x2bb132);if(_0x895c91){const _0x3d2644=this[_0x5c8a53(0x1a2)+_0x5c8a53(0xd3)](_0x1e2c1a,_0x895c91);if(_0x3d2644)return this[_0x5c8a53(0x1b9)](_0x403fcc['UmhLv'],_0x3d2644),_0x3d2644;}}return null;}[_0x209ff9(0x1a0)+_0x209ff9(0xe2)+_0x209ff9(0x186)+_0x209ff9(0x157)](_0x8d72c9,_0x114ebb){const _0x58e4d2=_0x209ff9,_0x54a8c1={};_0x54a8c1['jtkax']=function(_0x311723,_0x501994){return _0x311723||_0x501994;},_0x54a8c1[_0x58e4d2(0xc2)]=function(_0x436b88,_0x455dfb){return _0x436b88<_0x455dfb;},_0x54a8c1[_0x58e4d2(0xde)]=function(_0x1a88ce,_0x4e367b){return _0x1a88ce+_0x4e367b;},_0x54a8c1[_0x58e4d2(0x132)]=function(_0x13c948,_0x53f2b7){return _0x13c948*_0x53f2b7;},_0x54a8c1[_0x58e4d2(0xd4)]=function(_0x2e9431,_0x25b21c){return _0x2e9431/_0x25b21c;},_0x54a8c1[_0x58e4d2(0x13d)]=function(_0x40fb2c,_0x47172c){return _0x40fb2c/_0x47172c;},_0x54a8c1[_0x58e4d2(0x18c)]=function(_0x2a0243,_0x11dd9d){return _0x2a0243===_0x11dd9d;},_0x54a8c1[_0x58e4d2(0x11c)]=function(_0x666ef1,_0x4c7711){return _0x666ef1===_0x4c7711;},_0x54a8c1[_0x58e4d2(0xc5)]=function(_0x26557b,_0x3b5947){return _0x26557b!==_0x3b5947;},_0x54a8c1[_0x58e4d2(0x171)]='kQTGJ',_0x54a8c1[_0x58e4d2(0x126)]=function(_0x28d910,_0x1e0ec2){return _0x28d910>_0x1e0ec2;},_0x54a8c1[_0x58e4d2(0x1d5)]=function(_0x21fc1c,_0x46d333){return _0x21fc1c-_0x46d333;},_0x54a8c1[_0x58e4d2(0x191)]=_0x58e4d2(0x11d),_0x54a8c1[_0x58e4d2(0xc4)]=function(_0x4b06c7,_0x56bb2f){return _0x4b06c7-_0x56bb2f;},_0x54a8c1[_0x58e4d2(0x1ba)]=function(_0x5d0760,_0x17d3f0){return _0x5d0760-_0x17d3f0;};const _0xee2877=_0x54a8c1;if(_0xee2877['Ldpvv'](_0x8d72c9[_0x58e4d2(0x190)+'h'],0x0))return null;const _0x392697=_0x8d72c9[_0x58e4d2(0x136)](_0x118383=>_0x118383[_0x58e4d2(0x195)])[_0x58e4d2(0xb6)+'r'](_0x33a589=>_0x33a589!=null);if(_0xee2877['CHWRt'](_0x392697[_0x58e4d2(0x190)+'h'],0x0))return null;let _0x246090=0x0,_0x148428=0x0;for(let _0x5d5680=0x1;_0xee2877[_0x58e4d2(0xc2)](_0x5d5680,_0x8d72c9['lengt'+'h']);_0x5d5680++){if(_0xee2877[_0x58e4d2(0xc5)]('kQTGJ',_0xee2877['FQQrC'])){const _0x334cc1=this[_0x58e4d2(0x195)+_0x58e4d2(0x1a3)+'r']['get'](_0x3a535a),_0x4bc917=this[_0x58e4d2(0xd7)+'eBuff'+'er'][_0x58e4d2(0x168)](_0x234d3e),_0x4e32e3=this[_0x58e4d2(0x131)+_0x58e4d2(0x12a)][_0x58e4d2(0x168)](_0x3f80e8);if(_0xee2877[_0x58e4d2(0x13f)](!_0x334cc1,!_0x4bc917)||!_0x4e32e3||_0xee2877[_0x58e4d2(0xc2)](_0x4e32e3[_0x58e4d2(0x190)+'h'],0x32))return null;return{'zscore':this['_comp'+_0x58e4d2(0x15d)+'core'](_0x334cc1)[_0x58e4d2(0x19c)+'ed'](0x2),'vpin':(this['_comp'+'uteVP'+'IN'](_0x4bc917)*0x64)[_0x58e4d2(0x19c)+'ed'](0x1)+'%','ofi':_0xee2877['nGOdB'](_0xee2877['VUzQq'](this[_0x58e4d2(0x125)+_0x58e4d2(0xe9)+_0x58e4d2(0x142)+'owImb'+_0x58e4d2(0x12e)+'e'](_0x4e32e3),0x64)['toFix'+'ed'](0x1),'%'),'bars':_0x4e32e3['lengt'+'h']};}else{const _0x45538f=_0x8d72c9[_0x5d5680][_0x58e4d2(0xd7)+'e']||0x1;if(_0xee2877['kqZiw'](_0x8d72c9[_0x5d5680][_0x58e4d2(0x195)],_0x8d72c9[_0xee2877['Wmvlo'](_0x5d5680,0x1)][_0x58e4d2(0x195)]))_0x246090+=_0x45538f;else{if(_0x8d72c9[_0x5d5680]['price']<_0x8d72c9[_0xee2877[_0x58e4d2(0x1d5)](_0x5d5680,0x1)]['price'])_0x148428+=_0x45538f;else _0xee2877['KeRJL'](_0xee2877[_0x58e4d2(0x191)],_0x58e4d2(0x11d))?(_0x3c4d8c+=_0xee2877[_0x58e4d2(0xd4)](_0x3c1da9,0x2),_0x35c36c+=_0xee2877['zWruN'](_0x42b5bf,0x2)):(_0x246090+=_0xee2877[_0x58e4d2(0xd4)](_0x45538f,0x2),_0x148428+=_0x45538f/0x2);}}}return{'timestamp':_0x114ebb,'open':_0x392697[0x0],'high':Math[_0x58e4d2(0x12c)](..._0x392697),'low':Math[_0x58e4d2(0x1c4)](..._0x392697),'close':_0x392697[_0xee2877[_0x58e4d2(0xc4)](_0x392697[_0x58e4d2(0x190)+'h'],0x1)],'volume':_0x8d72c9[_0x58e4d2(0x166)+'e']((_0x55cfbc,_0x3c666c)=>_0x55cfbc+(_0x3c666c[_0x58e4d2(0xd7)+'e']||0x1),0x0),'delta':_0xee2877[_0x58e4d2(0x1ba)](_0x246090,_0x148428),'tickCount':_0x8d72c9[_0x58e4d2(0x190)+'h']};}[_0x209ff9(0x1a2)+'ssBar'](_0x19340c,_0x10ca8c){const _0x39a774=_0x209ff9,_0x2b02b2={};_0x2b02b2['Fqjvd']=function(_0x41b29b,_0x4cfe27){return _0x41b29b>_0x4cfe27;},_0x2b02b2[_0x39a774(0x1ce)]=function(_0x580a18,_0x1bc2d4){return _0x580a18-_0x1bc2d4;},_0x2b02b2[_0x39a774(0x17e)]=function(_0xc57edf,_0x22d456){return _0xc57edf>_0x22d456;},_0x2b02b2[_0x39a774(0xbb)]=function(_0xf57fa1,_0x746db5){return _0xf57fa1/_0x746db5;},_0x2b02b2[_0x39a774(0x9d)]=function(_0x1900cc,_0x32a500){return _0x1900cc*_0x32a500;},_0x2b02b2[_0x39a774(0x130)]=function(_0x56fd9b,_0x327c05){return _0x56fd9b*_0x327c05;},_0x2b02b2['Fnjum']=function(_0x2d5539,_0x3141e3){return _0x2d5539-_0x3141e3;},_0x2b02b2[_0x39a774(0xfb)]=function(_0x2d1414,_0x2f0c4c){return _0x2d1414>_0x2f0c4c;},_0x2b02b2[_0x39a774(0x17f)]=function(_0x281728,_0x58d3b9){return _0x281728<_0x58d3b9;};const _0x10fe5f=_0x2b02b2;let _0x159ccd=this['barHi'+_0x39a774(0x12a)]['get'](_0x19340c);!_0x159ccd&&(this[_0x39a774(0x139)+_0x39a774(0xcb)](_0x19340c),_0x159ccd=this[_0x39a774(0x131)+_0x39a774(0x12a)][_0x39a774(0x168)](_0x19340c));_0x159ccd[_0x39a774(0x10c)](_0x10ca8c);if(_0x10fe5f['Fqjvd'](_0x159ccd['lengt'+'h'],0x1f4))_0x159ccd[_0x39a774(0xe8)]();const _0x5163ca=this[_0x39a774(0x195)+_0x39a774(0x1a3)+'r'][_0x39a774(0x168)](_0x19340c);_0x5163ca[_0x39a774(0x10c)](_0x10ca8c['close']);if(_0x5163ca[_0x39a774(0x190)+'h']>0xc8)_0x5163ca[_0x39a774(0xe8)]();const _0x2816dd=this[_0x39a774(0xd7)+_0x39a774(0x14f)+'er'][_0x39a774(0x168)](_0x19340c),_0x144984=_0x10fe5f['XPwRh'](_0x10ca8c[_0x39a774(0x151)],_0x10ca8c['low']);let _0x16129c=_0x10ca8c[_0x39a774(0xd7)+'e']*0.5,_0x539403=_0x10ca8c[_0x39a774(0xd7)+'e']*0.5;if(_0x10fe5f[_0x39a774(0x17e)](_0x144984,0x0)){const _0xfe276a=_0x10fe5f['HKUbG'](_0x10fe5f['XPwRh'](_0x10ca8c[_0x39a774(0xab)],_0x10ca8c[_0x39a774(0x1af)]),_0x144984);_0x16129c=_0x10fe5f[_0x39a774(0x9d)](_0x10ca8c[_0x39a774(0xd7)+'e'],_0xfe276a),_0x539403=_0x10fe5f[_0x39a774(0x130)](_0x10ca8c['volum'+'e'],_0x10fe5f[_0x39a774(0x10b)](0x1,_0xfe276a));}const _0x180ef7={};_0x180ef7['buy']=_0x16129c,_0x180ef7['sell']=_0x539403,_0x2816dd['push'](_0x180ef7);if(_0x10fe5f[_0x39a774(0xfb)](_0x2816dd[_0x39a774(0x190)+'h'],0x64))_0x2816dd['shift']();if(_0x10fe5f[_0x39a774(0x17f)](_0x159ccd[_0x39a774(0x190)+'h'],0x32))return null;const _0x1e85cb=this[_0x39a774(0x125)+_0x39a774(0x15d)+_0x39a774(0x1c1)](_0x5163ca),_0x38e339=this[_0x39a774(0x125)+'uteVP'+'IN'](_0x2816dd),_0x607a9e=this[_0x39a774(0x125)+_0x39a774(0x1c5)+_0x39a774(0xb2)+_0x39a774(0x197)](_0x159ccd),_0x59a6a3=this['_appl'+_0x39a774(0x152)+_0x39a774(0x192)+_0x39a774(0x17d)](_0x19340c,_0x10ca8c[_0x39a774(0xab)]),{regime:_0x187270,params:_0x554a1d}=this[_0x39a774(0x14e)+_0x39a774(0xaf)+_0x39a774(0xfa)+'tyReg'+_0x39a774(0xf6)](_0x19340c,_0x159ccd),_0x4665d0=this[_0x39a774(0x125)+_0x39a774(0xe9)+_0x39a774(0x142)+'owImb'+_0x39a774(0x12e)+'e'](_0x159ccd);return this['_gene'+_0x39a774(0xdc)+_0x39a774(0x123)](_0x19340c,_0x10ca8c[_0x39a774(0xab)],_0x1e85cb,_0x38e339,_0x607a9e,_0x59a6a3,_0x187270,_0x554a1d,_0x4665d0,_0x159ccd);}[_0x209ff9(0x125)+'uteZS'+_0x209ff9(0x1c1)](_0x2e0cd2,_0xb0437e=0x32){const _0x4dfb5f=_0x209ff9,_0x50c77d={};_0x50c77d[_0x4dfb5f(0x184)]=function(_0x3245a4,_0x4d91e7){return _0x3245a4<_0x4d91e7;},_0x50c77d['EzAkh']=function(_0x54249c,_0x23ada5){return _0x54249c/_0x23ada5;},_0x50c77d['ZUdSQ']=function(_0xdc78d7,_0x4a6458){return _0xdc78d7<_0x4a6458;},_0x50c77d[_0x4dfb5f(0x153)]=function(_0x3ce958,_0x6b1584){return _0x3ce958-_0x6b1584;};const _0x1b6287=_0x50c77d;if(_0x1b6287[_0x4dfb5f(0x184)](_0x2e0cd2[_0x4dfb5f(0x190)+'h'],_0xb0437e))return 0x0;const _0x159e22=_0x2e0cd2[_0x4dfb5f(0xe7)](-_0xb0437e),_0x2473d4=_0x1b6287['EzAkh'](_0x159e22[_0x4dfb5f(0x166)+'e']((_0x2bcfee,_0x132a3b)=>_0x2bcfee+_0x132a3b,0x0),_0xb0437e),_0x2119b9=_0x159e22[_0x4dfb5f(0x166)+'e']((_0x287bac,_0x1858d4)=>_0x287bac+Math[_0x4dfb5f(0x122)](_0x1858d4-_0x2473d4,0x2),0x0)/_0xb0437e,_0x14893e=Math['sqrt'](_0x2119b9);if(_0x1b6287[_0x4dfb5f(0x1cc)](_0x14893e,0.0001))return 0x0;return _0x1b6287[_0x4dfb5f(0x153)](_0x2e0cd2[_0x1b6287[_0x4dfb5f(0x153)](_0x2e0cd2[_0x4dfb5f(0x190)+'h'],0x1)],_0x2473d4)/_0x14893e;}[_0x209ff9(0x125)+_0x209ff9(0x12d)+'IN'](_0xdfe8f3){const _0x5830c8=_0x209ff9,_0x4918b6={};_0x4918b6[_0x5830c8(0x9f)]=function(_0x1fd91e,_0x5a080c){return _0x1fd91e<_0x5a080c;},_0x4918b6[_0x5830c8(0xdd)]=function(_0x1d6e57,_0x66a5b5){return _0x1d6e57/_0x66a5b5;},_0x4918b6['DRUCb']=function(_0x3ef366,_0x3142ba){return _0x3ef366-_0x3142ba;};const _0x30e085=_0x4918b6;if(_0x30e085[_0x5830c8(0x9f)](_0xdfe8f3[_0x5830c8(0x190)+'h'],this['vpinW'+_0x5830c8(0x149)]))return 0.5;const _0x4d61ce=_0xdfe8f3[_0x5830c8(0xe7)](-this['vpinW'+_0x5830c8(0x149)]);let _0x50aa5d=0x0,_0x3c3a03=0x0;for(const _0x50c99d of _0x4d61ce){_0x50aa5d+=_0x50c99d[_0x5830c8(0xef)],_0x3c3a03+=_0x50c99d['sell'];}const _0x3e43f9=_0x50aa5d+_0x3c3a03;if(_0x30e085[_0x5830c8(0x9f)](_0x3e43f9,0x1))return 0.5;return _0x30e085['IdANQ'](Math[_0x5830c8(0x108)](_0x30e085[_0x5830c8(0xf1)](_0x50aa5d,_0x3c3a03)),_0x3e43f9);}['_comp'+_0x209ff9(0x1c5)+_0x209ff9(0xb2)+_0x209ff9(0x197)](_0x153221){const _0x136c7f=_0x209ff9,_0x38e24d={};_0x38e24d[_0x136c7f(0x129)]=function(_0x3779d3,_0x5cdbd2){return _0x3779d3<_0x5cdbd2;},_0x38e24d[_0x136c7f(0x176)]=function(_0x11b1c5,_0x3f0450){return _0x11b1c5-_0x3f0450;},_0x38e24d[_0x136c7f(0x159)]=function(_0x51dd50,_0x1314c0){return _0x51dd50-_0x1314c0;},_0x38e24d[_0x136c7f(0xbf)]=function(_0x387c11,_0x1344df){return _0x387c11/_0x1344df;},_0x38e24d[_0x136c7f(0x1ac)]=function(_0x1455c7,_0x30901e){return _0x1455c7/_0x30901e;},_0x38e24d[_0x136c7f(0x98)]=function(_0x2fd270,_0x73f34a){return _0x2fd270*_0x73f34a;},_0x38e24d[_0x136c7f(0x18f)]=function(_0x3f6f7e,_0x38ad67){return _0x3f6f7e-_0x38ad67;},_0x38e24d[_0x136c7f(0xd5)]=function(_0x58854f,_0xc1452f){return _0x58854f<_0xc1452f;};const _0x1d74e2=_0x38e24d;if(_0x1d74e2[_0x136c7f(0x129)](_0x153221[_0x136c7f(0x190)+'h'],0x14))return 0x0;const _0xa37e1d=_0x153221[_0x136c7f(0xe7)](-0x14),_0x42b386=[],_0x5e02c8=[];for(let _0x241428=0x1;_0x241428<_0xa37e1d[_0x136c7f(0x190)+'h'];_0x241428++){_0x42b386[_0x136c7f(0x10c)](_0x1d74e2[_0x136c7f(0x176)](_0xa37e1d[_0x241428][_0x136c7f(0xab)],_0xa37e1d[_0x1d74e2[_0x136c7f(0x159)](_0x241428,0x1)][_0x136c7f(0xab)])),_0x5e02c8[_0x136c7f(0x10c)](_0xa37e1d[_0x241428][_0x136c7f(0xd7)+'e']);}const _0x244671=_0x1d74e2['SCcfn'](_0x42b386[_0x136c7f(0x166)+'e']((_0x530a70,_0x48d1a1)=>_0x530a70+_0x48d1a1,0x0),_0x42b386[_0x136c7f(0x190)+'h']),_0x2716a4=_0x1d74e2[_0x136c7f(0x1ac)](_0x5e02c8['reduc'+'e']((_0x186cde,_0x24fd7e)=>_0x186cde+_0x24fd7e,0x0),_0x5e02c8['lengt'+'h']);let _0x14ea5f=0x0,_0x4c8b8f=0x0;for(let _0x59b764=0x0;_0x59b764<_0x42b386[_0x136c7f(0x190)+'h'];_0x59b764++){_0x14ea5f+=_0x1d74e2['fjztN'](_0x1d74e2[_0x136c7f(0x176)](_0x42b386[_0x59b764],_0x244671),_0x5e02c8[_0x59b764]-_0x2716a4),_0x4c8b8f+=Math[_0x136c7f(0x122)](_0x1d74e2[_0x136c7f(0x18f)](_0x5e02c8[_0x59b764],_0x2716a4),0x2);}_0x14ea5f/=_0x42b386[_0x136c7f(0x190)+'h'],_0x4c8b8f/=_0x42b386[_0x136c7f(0x190)+'h'];if(_0x1d74e2[_0x136c7f(0xd5)](_0x4c8b8f,0.0001))return 0x0;return Math[_0x136c7f(0x108)](_0x14ea5f/_0x4c8b8f);}[_0x209ff9(0x102)+_0x209ff9(0x152)+_0x209ff9(0x192)+_0x209ff9(0x17d)](_0xc55be1,_0x43bb1c){const _0x2e4d7d=_0x209ff9,_0x408a59={};_0x408a59['AJqON']=function(_0x466b02,_0x4ad144){return _0x466b02<_0x4ad144;},_0x408a59['xRGzS']=function(_0x2ca597,_0x54816b){return _0x2ca597-_0x54816b;},_0x408a59[_0x2e4d7d(0x124)]=function(_0x53220f,_0x2606b1){return _0x53220f>_0x2606b1;},_0x408a59[_0x2e4d7d(0xd6)]=function(_0x4be9c5,_0x4f329a){return _0x4be9c5/_0x4f329a;},_0x408a59[_0x2e4d7d(0x1a6)]=function(_0x179a83,_0x23e677){return _0x179a83*_0x23e677;},_0x408a59[_0x2e4d7d(0x13c)]=function(_0x12ffb1,_0x98bdd5){return _0x12ffb1*_0x98bdd5;},_0x408a59[_0x2e4d7d(0x15e)]=function(_0x32a900,_0x1b1cb6){return _0x32a900+_0x1b1cb6;},_0x408a59[_0x2e4d7d(0x1bb)]=function(_0x240f93,_0x27f930){return _0x240f93!==_0x27f930;},_0x408a59['RpXbF']=function(_0x1eb3ea,_0x4b32e2){return _0x1eb3ea-_0x4b32e2;};const _0x2564c1=_0x408a59;let _0x14cab5=this[_0x2e4d7d(0x135)+_0x2e4d7d(0x1bd)+'es'][_0x2e4d7d(0x168)](_0xc55be1);if(!_0x14cab5){if(_0x2564c1[_0x2e4d7d(0x1bb)](_0x2e4d7d(0x196),_0x2e4d7d(0x196))){if(_0x2564c1[_0x2e4d7d(0x11f)](_0x3f097a[_0x2e4d7d(0x190)+'h'],this[_0x2e4d7d(0x114)+_0x2e4d7d(0xe5)+'k']))return 0x0;const _0x4b2381=_0x4f2242[_0x2e4d7d(0xe7)](-this[_0x2e4d7d(0x114)+_0x2e4d7d(0xe5)+'k']);let _0x4c5dc3=0x0,_0x215e13=0x0;for(const _0x1b42cb of _0x4b2381){const _0x1c5c7c=_0x2564c1[_0x2e4d7d(0x10d)](_0x1b42cb['high'],_0x1b42cb[_0x2e4d7d(0x1af)]);if(_0x2564c1['dGqmE'](_0x1c5c7c,0x0)){const _0x542bac=_0x2564c1[_0x2e4d7d(0xd6)](_0x2564c1[_0x2e4d7d(0x10d)](_0x1b42cb['close'],_0x1b42cb['low']),_0x1c5c7c);_0x4c5dc3+=_0x2564c1[_0x2e4d7d(0x1a6)](_0x542bac,_0x1b42cb[_0x2e4d7d(0xd7)+'e']),_0x215e13+=_0x2564c1[_0x2e4d7d(0x13c)](_0x2564c1[_0x2e4d7d(0x10d)](0x1,_0x542bac),_0x1b42cb['volum'+'e']);}}const _0x54a1cc=_0x2564c1[_0x2e4d7d(0x15e)](_0x4c5dc3,_0x215e13);if(_0x54a1cc<0x1)return 0x0;return _0x2564c1[_0x2e4d7d(0xd6)](_0x2564c1[_0x2e4d7d(0x10d)](_0x4c5dc3,_0x215e13),_0x54a1cc);}else{const _0x4eea9b={};return _0x4eea9b[_0x2e4d7d(0x180)+'ate']=_0x43bb1c,_0x4eea9b[_0x2e4d7d(0x18e)+_0x2e4d7d(0x165)+_0x2e4d7d(0xa9)]=0x1,_0x14cab5=_0x4eea9b,this['kalma'+_0x2e4d7d(0x1bd)+'es'][_0x2e4d7d(0xc7)](_0xc55be1,_0x14cab5),_0x43bb1c;}}const _0x1e406b=_0x14cab5[_0x2e4d7d(0x180)+'ate'],_0x1a7f64=_0x14cab5['error'+'Covar'+_0x2e4d7d(0xa9)]+this['kalma'+'nProc'+_0x2e4d7d(0xa4)+_0x2e4d7d(0xc1)],_0x4a761b=_0x2564c1['aocmo'](_0x1a7f64,_0x2564c1[_0x2e4d7d(0x15e)](_0x1a7f64,this[_0x2e4d7d(0x135)+_0x2e4d7d(0xae)+_0x2e4d7d(0x1b7)+'ntNoi'+'se']));return _0x14cab5['estim'+'ate']=_0x1e406b+_0x2564c1[_0x2e4d7d(0x13c)](_0x4a761b,_0x43bb1c-_0x1e406b),_0x14cab5['error'+_0x2e4d7d(0x165)+'iance']=_0x2564c1[_0x2e4d7d(0x1a6)](_0x2564c1[_0x2e4d7d(0x143)](0x1,_0x4a761b),_0x1a7f64),_0x14cab5[_0x2e4d7d(0x180)+_0x2e4d7d(0x14c)];}[_0x209ff9(0x14e)+_0x209ff9(0xaf)+_0x209ff9(0xfa)+_0x209ff9(0x170)+_0x209ff9(0xf6)](_0x26e3ca,_0x4b8d7c){const _0x1004e4=_0x209ff9,_0x44fd9b={};_0x44fd9b[_0x1004e4(0xa5)]=function(_0x2baa51,_0x11744b){return _0x2baa51>_0x11744b;},_0x44fd9b[_0x1004e4(0x1a4)]=function(_0x593eb1,_0x12c9a2){return _0x593eb1>=_0x12c9a2;},_0x44fd9b[_0x1004e4(0xcf)]=function(_0x3a12be,_0x1d3df5){return _0x3a12be/_0x1d3df5;},_0x44fd9b[_0x1004e4(0x1c2)]=_0x1004e4(0x1af),_0x44fd9b[_0x1004e4(0xf8)]=function(_0x8f6ae2,_0x5e9fa9){return _0x8f6ae2<_0x5e9fa9;},_0x44fd9b[_0x1004e4(0x179)]=_0x1004e4(0x14a)+'l',_0x44fd9b[_0x1004e4(0x11b)]='high';const _0x53af2b=_0x44fd9b,_0x1c9ab3=this[_0x1004e4(0x155)+'ulate'+_0x1004e4(0x91)](_0x4b8d7c);let _0x3e1fbe=this['atrHi'+_0x1004e4(0x12a)][_0x1004e4(0x168)](_0x26e3ca);!_0x3e1fbe&&(_0x3e1fbe=[],this['atrHi'+_0x1004e4(0x12a)]['set'](_0x26e3ca,_0x3e1fbe));_0x3e1fbe[_0x1004e4(0x10c)](_0x1c9ab3);if(_0x53af2b['Cnifp'](_0x3e1fbe[_0x1004e4(0x190)+'h'],0x1f4))_0x3e1fbe[_0x1004e4(0xe8)]();let _0x41a308=0.5;_0x53af2b['Xuebf'](_0x3e1fbe[_0x1004e4(0x190)+'h'],0x14)&&(_0x41a308=_0x53af2b[_0x1004e4(0xcf)](_0x3e1fbe[_0x1004e4(0xb6)+'r'](_0x19edc1=>_0x19edc1<=_0x1c9ab3)[_0x1004e4(0x190)+'h'],_0x3e1fbe[_0x1004e4(0x190)+'h']));let _0x14d56a,_0x246d5c;if(_0x41a308<0.25){_0x14d56a=_0x53af2b[_0x1004e4(0x1c2)];const _0x53d462={};_0x53d462[_0x1004e4(0xf5)+'ultip'+_0x1004e4(0xa2)]=0.8,_0x53d462[_0x1004e4(0x16b)+'tMult'+_0x1004e4(0x19d)+'r']=0.9,_0x53d462[_0x1004e4(0x178)+_0x1004e4(0xf0)+_0x1004e4(0x97)]=1.2,_0x53d462[_0x1004e4(0x189)+_0x1004e4(0xb0)+'Bonus']=0.05,_0x246d5c=_0x53d462;}else{if(_0x53af2b[_0x1004e4(0xf8)](_0x41a308,0.75)){_0x14d56a=_0x53af2b['oSslC'];const _0x465c15={};_0x465c15['stopM'+_0x1004e4(0x10e)+_0x1004e4(0xa2)]=0x1,_0x465c15[_0x1004e4(0x16b)+_0x1004e4(0x175)+_0x1004e4(0x19d)+'r']=0x1,_0x465c15['zscor'+_0x1004e4(0xf0)+_0x1004e4(0x97)]=1.5,_0x465c15[_0x1004e4(0x189)+_0x1004e4(0xb0)+_0x1004e4(0x1c3)]=0x0,_0x246d5c=_0x465c15;}else{_0x14d56a=_0x53af2b[_0x1004e4(0x11b)];const _0x43ef0d={};_0x43ef0d['stopM'+_0x1004e4(0x10e)+_0x1004e4(0xa2)]=1.3,_0x43ef0d[_0x1004e4(0x16b)+'tMult'+_0x1004e4(0x19d)+'r']=1.2,_0x43ef0d[_0x1004e4(0x178)+_0x1004e4(0xf0)+_0x1004e4(0x97)]=0x2,_0x43ef0d[_0x1004e4(0x189)+_0x1004e4(0xb0)+_0x1004e4(0x1c3)]=-0.05,_0x246d5c=_0x43ef0d;}}const _0x2a8424={};return _0x2a8424['regim'+'e']=_0x14d56a,_0x2a8424[_0x1004e4(0x133)+'s']=_0x246d5c,_0x2a8424;}[_0x209ff9(0x155)+_0x209ff9(0xf2)+_0x209ff9(0x91)](_0x42e4cc,_0xc13c70=0xe){const _0x34ddb3=_0x209ff9,_0x4112d2={};_0x4112d2['JikEJ']=function(_0x48857d,_0x13a0a0){return _0x48857d+_0x13a0a0;},_0x4112d2['uwMgw']=function(_0x2ee3d4,_0x5381e1){return _0x2ee3d4-_0x5381e1;},_0x4112d2[_0x34ddb3(0xdb)]=function(_0x4dc48a,_0x2feb58){return _0x4dc48a<_0x2feb58;},_0x4112d2['wLenW']=function(_0x1fa269,_0x20ae2a){return _0x1fa269/_0x20ae2a;};const _0x246430=_0x4112d2;if(_0x42e4cc[_0x34ddb3(0x190)+'h']<_0x246430['JikEJ'](_0xc13c70,0x1))return 2.5;const _0x3edba7=[];for(let _0xdcba22=_0x246430[_0x34ddb3(0xd0)](_0x42e4cc[_0x34ddb3(0x190)+'h'],_0xc13c70);_0x246430['PmBIK'](_0xdcba22,_0x42e4cc[_0x34ddb3(0x190)+'h']);_0xdcba22++){const _0x4d4f6b=_0x42e4cc[_0xdcba22],_0x51450e=_0x42e4cc[_0xdcba22-0x1][_0x34ddb3(0xab)],_0x451831=Math[_0x34ddb3(0x12c)](_0x246430[_0x34ddb3(0xd0)](_0x4d4f6b[_0x34ddb3(0x151)],_0x4d4f6b['low']),Math[_0x34ddb3(0x108)](_0x4d4f6b[_0x34ddb3(0x151)]-_0x51450e),Math[_0x34ddb3(0x108)](_0x246430[_0x34ddb3(0xd0)](_0x4d4f6b[_0x34ddb3(0x1af)],_0x51450e)));_0x3edba7['push'](_0x451831);}return _0x246430['wLenW'](_0x3edba7[_0x34ddb3(0x166)+'e']((_0x28650d,_0x3ae20f)=>_0x28650d+_0x3ae20f,0x0),_0x3edba7['lengt'+'h']);}[_0x209ff9(0x125)+_0x209ff9(0xe9)+'derFl'+_0x209ff9(0x118)+_0x209ff9(0x12e)+'e'](_0x5248ac){const _0xc0f157=_0x209ff9,_0x316339={};_0x316339[_0xc0f157(0x100)]=function(_0x4c7852,_0x282ea4){return _0x4c7852<_0x282ea4;},_0x316339[_0xc0f157(0xe6)]=function(_0x5e4714,_0x48d932){return _0x5e4714-_0x48d932;},_0x316339[_0xc0f157(0x161)]=function(_0x255872,_0x1a33dc){return _0x255872>_0x1a33dc;},_0x316339[_0xc0f157(0x1b1)]=function(_0x23f1b6,_0x54a91c){return _0x23f1b6/_0x54a91c;},_0x316339['hOrON']=function(_0x208c7f,_0x1e029c){return _0x208c7f*_0x1e029c;},_0x316339[_0xc0f157(0x163)]=function(_0x33d13e,_0x28ec5c){return _0x33d13e-_0x28ec5c;},_0x316339[_0xc0f157(0xd8)]=function(_0x39ca6b,_0x434ce8){return _0x39ca6b+_0x434ce8;};const _0x14c7a7=_0x316339;if(_0x14c7a7[_0xc0f157(0x100)](_0x5248ac[_0xc0f157(0x190)+'h'],this['ofiLo'+_0xc0f157(0xe5)+'k']))return 0x0;const _0x853631=_0x5248ac[_0xc0f157(0xe7)](-this[_0xc0f157(0x114)+'okbac'+'k']);let _0x37808e=0x0,_0x1bad6a=0x0;for(const _0x51e83a of _0x853631){const _0x3c7e56=_0x14c7a7[_0xc0f157(0xe6)](_0x51e83a[_0xc0f157(0x151)],_0x51e83a[_0xc0f157(0x1af)]);if(_0x14c7a7['firYk'](_0x3c7e56,0x0)){const _0x482b37=_0x14c7a7[_0xc0f157(0x1b1)](_0x14c7a7[_0xc0f157(0xe6)](_0x51e83a['close'],_0x51e83a['low']),_0x3c7e56);_0x37808e+=_0x14c7a7[_0xc0f157(0xc9)](_0x482b37,_0x51e83a[_0xc0f157(0xd7)+'e']),_0x1bad6a+=_0x14c7a7['hOrON'](_0x14c7a7[_0xc0f157(0x163)](0x1,_0x482b37),_0x51e83a[_0xc0f157(0xd7)+'e']);}}const _0x36143a=_0x14c7a7['ZGCqA'](_0x37808e,_0x1bad6a);if(_0x14c7a7[_0xc0f157(0x100)](_0x36143a,0x1))return 0x0;return _0x14c7a7['zWlFh'](_0x37808e,_0x1bad6a)/_0x36143a;}[_0x209ff9(0x1d1)+'rateS'+_0x209ff9(0x123)](_0x5d7c9e,_0x8406f,_0x18b469,_0x3c9f5a,_0x134867,_0x184b89,_0xa7d497,_0x96dd08,_0x17d3d9,_0x48953a){const _0x45cb06=_0x209ff9,_0x5e291f={};_0x5e291f['wFHcc']=function(_0x1191e5,_0x478af9){return _0x1191e5<_0x478af9;},_0x5e291f[_0x45cb06(0x16e)]=function(_0x4292a1,_0x14e5ae){return _0x4292a1>_0x14e5ae;},_0x5e291f['aPOUj']=_0x45cb06(0xb3),_0x5e291f[_0x45cb06(0x10f)]=function(_0x459dcb,_0x44a33b){return _0x459dcb===_0x44a33b;},_0x5e291f[_0x45cb06(0x104)]=_0x45cb06(0x92),_0x5e291f[_0x45cb06(0x162)]=function(_0x186bd8,_0x1fa889){return _0x186bd8===_0x1fa889;},_0x5e291f[_0x45cb06(0x96)]=function(_0xc40b39,_0xd8722){return _0xc40b39<_0xd8722;},_0x5e291f[_0x45cb06(0x173)]=function(_0x50a7c1,_0x530199){return _0x50a7c1===_0x530199;},_0x5e291f[_0x45cb06(0x1be)]=function(_0x55cc1e,_0x2c671b){return _0x55cc1e/_0x2c671b;},_0x5e291f['PfoIU']=function(_0x4fd694,_0x196003){return _0x4fd694-_0x196003;},_0x5e291f[_0x45cb06(0x172)]=function(_0x323969,_0x453d71){return _0x323969>_0x453d71;},_0x5e291f[_0x45cb06(0x103)]=_0x45cb06(0x14a)+'l',_0x5e291f[_0x45cb06(0x117)]=function(_0x1a7c00,_0x272cab){return _0x1a7c00===_0x272cab;},_0x5e291f[_0x45cb06(0x146)]=_0x45cb06(0x1af),_0x5e291f[_0x45cb06(0xbc)]=function(_0x587760,_0x2dc0d4){return _0x587760+_0x2dc0d4;},_0x5e291f[_0x45cb06(0x1a7)]=function(_0x3f93c6,_0xa463fa){return _0x3f93c6+_0xa463fa;},_0x5e291f['LAtJH']=function(_0x140aa6,_0x182356){return _0x140aa6+_0x182356;},_0x5e291f[_0x45cb06(0xaa)]=function(_0x3e6701,_0xb33c7a){return _0x3e6701*_0xb33c7a;},_0x5e291f['pSPAX']=function(_0x5a6b5f,_0x37db4f){return _0x5a6b5f*_0x37db4f;},_0x5e291f[_0x45cb06(0xbd)]=function(_0x536a15,_0x32a150){return _0x536a15*_0x32a150;},_0x5e291f[_0x45cb06(0x16c)]=function(_0x1dba81,_0x16b25a){return _0x1dba81<_0x16b25a;},_0x5e291f[_0x45cb06(0xb4)]=function(_0x2a4785,_0xd85a06){return _0x2a4785-_0xd85a06;},_0x5e291f[_0x45cb06(0xee)]=function(_0x14addf,_0x54eee1){return _0x14addf+_0x54eee1;},_0x5e291f[_0x45cb06(0x188)]=function(_0x2454c9,_0x2d06af){return _0x2454c9*_0x2d06af;},_0x5e291f[_0x45cb06(0xad)]=function(_0x3e528c,_0x2f8ce2){return _0x3e528c*_0x2f8ce2;},_0x5e291f['okYDV']=function(_0x3e77ff,_0xa545d3){return _0x3e77ff*_0xa545d3;},_0x5e291f['KEeuJ']=function(_0x12937f,_0x192564){return _0x12937f*_0x192564;},_0x5e291f[_0x45cb06(0xba)]=function(_0xcf903,_0x446d1c){return _0xcf903*_0x446d1c;},_0x5e291f[_0x45cb06(0xbe)]=function(_0x53dc83,_0x1ac03e){return _0x53dc83*_0x1ac03e;},_0x5e291f['nbUZg']=function(_0x539cb8,_0x3be87d){return _0x539cb8>=_0x3be87d;},_0x5e291f[_0x45cb06(0x16a)]=function(_0x2c6b4b,_0xae6e50){return _0x2c6b4b+_0xae6e50;},_0x5e291f[_0x45cb06(0x148)]=function(_0x25f320,_0x327d06){return _0x25f320-_0x327d06;},_0x5e291f[_0x45cb06(0x93)]=_0x45cb06(0x1b3)+_0x45cb06(0x1b4)+_0x45cb06(0x14d)+_0x45cb06(0x199);const _0x296908=_0x5e291f,_0xc5d4aa=Math[_0x45cb06(0x108)](_0x18b469);if(_0x296908[_0x45cb06(0x15b)](_0xc5d4aa,_0x96dd08[_0x45cb06(0x178)+'eThre'+_0x45cb06(0x97)]))return null;if(_0x296908[_0x45cb06(0x16e)](_0x3c9f5a,this[_0x45cb06(0xec)+'oxicT'+'hresh'+_0x45cb06(0x177)]))return null;let _0x57be94;if(_0x18b469<-_0x96dd08[_0x45cb06(0x178)+_0x45cb06(0xf0)+_0x45cb06(0x97)])_0x57be94='long';else{if(_0x296908[_0x45cb06(0x16e)](_0x18b469,_0x96dd08[_0x45cb06(0x178)+'eThre'+_0x45cb06(0x97)]))_0x57be94=_0x296908[_0x45cb06(0x1a1)];else return null;}const _0x246314=_0x296908[_0x45cb06(0x10f)](_0x57be94,_0x296908[_0x45cb06(0x104)])&&_0x296908[_0x45cb06(0x16e)](_0x17d3d9,0.1)||_0x296908[_0x45cb06(0x162)](_0x57be94,_0x45cb06(0xb3))&&_0x296908[_0x45cb06(0x96)](_0x17d3d9,-0.1),_0x32da6c=_0x8406f-_0x184b89,_0x288e2d=_0x57be94===_0x296908[_0x45cb06(0x104)]&&_0x32da6c<0x0||_0x296908[_0x45cb06(0x173)](_0x57be94,_0x296908[_0x45cb06(0x1a1)])&&_0x32da6c>0x0,_0x3cce23={'zscore':Math[_0x45cb06(0x1c4)](0x1,_0x296908['ajPap'](_0xc5d4aa,0x4)),'vpin':_0x296908['PfoIU'](0x1,_0x3c9f5a),'kyleLambda':_0x296908[_0x45cb06(0x172)](_0x134867,0.001)?0.5:0.8,'kalman':_0x288e2d?0.8:0.4,'volatility':_0xa7d497===_0x296908['EifKA']?0.8:_0x296908[_0x45cb06(0x117)](_0xa7d497,_0x296908[_0x45cb06(0x146)])?0.7:0.6,'ofi':_0x246314?0.9:0.5,'composite':0x0};_0x3cce23[_0x45cb06(0x174)+_0x45cb06(0x109)]=_0x296908[_0x45cb06(0xbc)](_0x296908[_0x45cb06(0x1a7)](_0x296908[_0x45cb06(0xb5)](_0x296908[_0x45cb06(0xaa)](_0x3cce23['zscor'+'e'],0.3),_0x3cce23[_0x45cb06(0x15c)]*0.15)+_0x296908[_0x45cb06(0xaa)](_0x3cce23['kyleL'+_0x45cb06(0x1c8)],0.1),_0x296908[_0x45cb06(0xe1)](_0x3cce23[_0x45cb06(0x135)+'n'],0.15)),_0x3cce23['volat'+_0x45cb06(0x101)]*0.1)+_0x296908[_0x45cb06(0xbd)](_0x3cce23[_0x45cb06(0x115)],0.2);const _0x37cacc=Math['min'](0x1,_0x296908['MHnfa'](_0x3cce23['compo'+'site'],_0x96dd08[_0x45cb06(0x189)+_0x45cb06(0xb0)+'Bonus']));if(_0x296908[_0x45cb06(0x16c)](_0x37cacc,0.55))return null;const _0x5899f5=Math[_0x45cb06(0xd9)](this['baseS'+_0x45cb06(0x1c7)+_0x45cb06(0xf9)]*_0x96dd08[_0x45cb06(0xf5)+_0x45cb06(0x10e)+_0x45cb06(0xa2)]),_0x36daf5=Math[_0x45cb06(0xd9)](this[_0x45cb06(0x145)+_0x45cb06(0x137)+'Ticks']*_0x96dd08[_0x45cb06(0x16b)+_0x45cb06(0x175)+_0x45cb06(0x19d)+'r']),_0x569620=Math[_0x45cb06(0x12c)](0x6,Math[_0x45cb06(0x1c4)](0xc,_0x5899f5)),_0x45fb6f=Math['max'](_0x569620*1.5,Math[_0x45cb06(0x1c4)](0x18,_0x36daf5));let _0x3c41d2,_0x587f4b,_0x27a84a,_0x11b0af;_0x57be94===_0x296908[_0x45cb06(0x104)]?(_0x3c41d2=_0x296908[_0x45cb06(0xb4)](_0x8406f,_0x569620*this['tickS'+_0x45cb06(0x141)]),_0x587f4b=_0x296908[_0x45cb06(0xee)](_0x8406f,_0x45fb6f*this[_0x45cb06(0x15f)+_0x45cb06(0x141)]),_0x27a84a=_0x8406f+_0x296908[_0x45cb06(0x188)](this[_0x45cb06(0xfd)+_0x45cb06(0x154)+_0x45cb06(0x1d0)],this['tickS'+'ize']),_0x11b0af=_0x296908[_0x45cb06(0x1a7)](_0x8406f,_0x296908[_0x45cb06(0xbd)](_0x296908['cnyyh'](_0x45fb6f,this[_0x45cb06(0x1bc)+_0x45cb06(0x17a)+'Pct']),this[_0x45cb06(0x15f)+_0x45cb06(0x141)]))):(_0x3c41d2=_0x8406f+_0x296908['okYDV'](_0x569620,this['tickS'+_0x45cb06(0x141)]),_0x587f4b=_0x8406f-_0x296908['zaPZm'](_0x45fb6f,this[_0x45cb06(0x15f)+'ize']),_0x27a84a=_0x296908['PfoIU'](_0x8406f,_0x296908[_0x45cb06(0x90)](this['break'+_0x45cb06(0x154)+_0x45cb06(0x1d0)],this[_0x45cb06(0x15f)+_0x45cb06(0x141)])),_0x11b0af=_0x8406f-_0x296908[_0x45cb06(0xaa)](_0x296908[_0x45cb06(0xe1)](_0x45fb6f,this['profi'+_0x45cb06(0x17a)+_0x45cb06(0x182)]),this['tickS'+_0x45cb06(0x141)]));const _0x1c312e=_0x45fb6f/_0x569620,_0x1d3f47=Math[_0x45cb06(0xd9)](_0x296908[_0x45cb06(0xba)](_0x45fb6f,0.5)),_0x5bedd0=Math[_0x45cb06(0xd9)](_0x296908[_0x45cb06(0xbe)](_0x569620,0.4));let _0x8da17d=SignalStrength[_0x45cb06(0x1aa)+_0x45cb06(0x158)];if(_0x296908[_0x45cb06(0xca)](_0x37cacc,0.85))_0x8da17d=SignalStrength['VERY_'+_0x45cb06(0x150)+'G'];else{if(_0x37cacc>=0.75)_0x8da17d=SignalStrength['STRON'+'G'];else{if(_0x296908[_0x45cb06(0x96)](_0x37cacc,0.6))_0x8da17d=SignalStrength[_0x45cb06(0x1a5)];}}const _0x306194=_0x296908[_0x45cb06(0x16a)](0.5,_0x296908[_0x45cb06(0xaa)](_0x37cacc-0.5,0.4)),_0x363388=_0x296908['cnOJn'](_0x306194*Math[_0x45cb06(0x108)](_0x296908[_0x45cb06(0x148)](_0x587f4b,_0x8406f)),_0x296908['ZajPu'](0x1-_0x306194,Math[_0x45cb06(0x108)](_0x296908['cnOJn'](_0x8406f,_0x3c41d2))));return{'id':uuidv4(),'timestamp':Date['now'](),'symbol':extractBaseSymbol(_0x5d7c9e),'contractId':_0x5d7c9e,'side':_0x296908[_0x45cb06(0x173)](_0x57be94,_0x45cb06(0x92))?OrderSide[_0x45cb06(0x95)]:OrderSide['ASK'],'direction':_0x57be94,'strategy':_0x296908[_0x45cb06(0x93)],'strength':_0x8da17d,'edge':_0x363388,'confidence':_0x37cacc,'entry':_0x8406f,'entryPrice':_0x8406f,'stopLoss':_0x3c41d2,'takeProfit':_0x587f4b,'riskReward':_0x1c312e,'stopTicks':_0x569620,'targetTicks':_0x45fb6f,'trailTriggerTicks':_0x1d3f47,'trailDistanceTicks':_0x5bedd0,'beBreakeven':_0x27a84a,'profitLockLevel':_0x11b0af,'zScore':_0x18b469,'zScoreExit':this[_0x45cb06(0x178)+_0x45cb06(0xe4)+_0x45cb06(0xda)+_0x45cb06(0xcc)],'vpinValue':_0x3c9f5a,'kyleLambda':_0x134867,'kalmanEstimate':_0x184b89,'volatilityRegime':_0xa7d497,'ofiValue':_0x17d3d9,'models':_0x3cce23};}[_0x209ff9(0x181)+_0x209ff9(0xfe)+'ByZSc'+_0x209ff9(0x9c)](_0x30d606){const _0x1249d6=_0x209ff9,_0x251308={};_0x251308['mUPRk']=function(_0x13e566,_0x216358){return _0x13e566<_0x216358;};const _0x3a352e=_0x251308,_0xd17a4b=this[_0x1249d6(0x195)+_0x1249d6(0x1a3)+'r']['get'](_0x30d606);if(!_0xd17a4b||_0x3a352e[_0x1249d6(0xdf)](_0xd17a4b['lengt'+'h'],0x32))return![];const _0x26fb1d=this[_0x1249d6(0x125)+_0x1249d6(0x15d)+_0x1249d6(0x1c1)](_0xd17a4b);return _0x3a352e['mUPRk'](Math[_0x1249d6(0x108)](_0x26fb1d),this[_0x1249d6(0x178)+'eExit'+_0x1249d6(0xda)+_0x1249d6(0xcc)]);}[_0x209ff9(0x140)+_0x209ff9(0x169)+'lues'](_0x49946e){const _0x127ac5=_0x209ff9,_0xbeab16={};_0xbeab16[_0x127ac5(0x1d4)]=function(_0x20a492,_0x326f51){return _0x20a492<_0x326f51;},_0xbeab16[_0x127ac5(0xb9)]=function(_0x134bfa,_0x10bd1c){return _0x134bfa+_0x10bd1c;},_0xbeab16[_0x127ac5(0x1ab)]=function(_0x5cc974,_0x1c9d22){return _0x5cc974*_0x1c9d22;},_0xbeab16[_0x127ac5(0x19b)]=function(_0x5c59a7,_0x1ddbcf){return _0x5c59a7+_0x1ddbcf;};const _0x303fe2=_0xbeab16,_0xc3e95c=this[_0x127ac5(0x195)+_0x127ac5(0x1a3)+'r'][_0x127ac5(0x168)](_0x49946e),_0x311c32=this[_0x127ac5(0xd7)+'eBuff'+'er'][_0x127ac5(0x168)](_0x49946e),_0x242ec4=this[_0x127ac5(0x131)+_0x127ac5(0x12a)][_0x127ac5(0x168)](_0x49946e);if(!_0xc3e95c||!_0x311c32||!_0x242ec4||_0x303fe2[_0x127ac5(0x1d4)](_0x242ec4[_0x127ac5(0x190)+'h'],0x32))return null;return{'zscore':this[_0x127ac5(0x125)+_0x127ac5(0x15d)+_0x127ac5(0x1c1)](_0xc3e95c)[_0x127ac5(0x19c)+'ed'](0x2),'vpin':_0x303fe2['CWlnK'](_0x303fe2[_0x127ac5(0x1ab)](this[_0x127ac5(0x125)+'uteVP'+'IN'](_0x311c32),0x64)[_0x127ac5(0x19c)+'ed'](0x1),'%'),'ofi':_0x303fe2[_0x127ac5(0x19b)]((this[_0x127ac5(0x125)+_0x127ac5(0xe9)+_0x127ac5(0x142)+_0x127ac5(0x118)+_0x127ac5(0x12e)+'e'](_0x242ec4)*0x64)[_0x127ac5(0x19c)+'ed'](0x1),'%'),'bars':_0x242ec4['lengt'+'h']};}[_0x209ff9(0x14b)+_0x209ff9(0xcd)+'eResu'+'lt'](_0x5841f6){const _0x361fe6=_0x209ff9,_0x1d3646={};_0x1d3646[_0x361fe6(0x120)]=function(_0x773b60,_0x162deb){return _0x773b60>_0x162deb;};const _0x42f911=_0x1d3646;this[_0x361fe6(0x116)+_0x361fe6(0x19f)+'es'][_0x361fe6(0x10c)]({'pnl':_0x5841f6,'timestamp':Date[_0x361fe6(0x1c0)]()});if(_0x42f911['tPkES'](this[_0x361fe6(0x116)+_0x361fe6(0x19f)+'es'][_0x361fe6(0x190)+'h'],0x64))this['recen'+_0x361fe6(0x19f)+'es']['shift']();_0x5841f6>0x0?(this[_0x361fe6(0xc8)+_0x361fe6(0x1b0)]++,this[_0x361fe6(0x12f)+'treak']=0x0):(this['lossS'+_0x361fe6(0xed)]++,this[_0x361fe6(0xc8)+_0x361fe6(0x1b0)]=0x0);}['getBa'+'rHist'+'ory'](_0xd4502f){const _0x563a0f=_0x209ff9;return this[_0x563a0f(0x131)+_0x563a0f(0x12a)][_0x563a0f(0x168)](_0xd4502f)||[];}[_0x209ff9(0x1a9)](_0x5be330){const _0x3a0222=_0x209ff9,_0x4c1bf8=(_0x3a0222(0xfc)+_0x3a0222(0x17c)+_0x3a0222(0x106))[_0x3a0222(0x12b)]('|');let _0x1ea5e0=0x0;while(!![]){switch(_0x4c1bf8[_0x1ea5e0++]){case'0':this[_0x3a0222(0x11e)+_0x3a0222(0x17b)+'er'][_0x3a0222(0xc7)](_0x5be330,[]);continue;case'1':this[_0x3a0222(0x131)+_0x3a0222(0x12a)]['set'](_0x5be330,[]);continue;case'2':this[_0x3a0222(0x112)+_0x3a0222(0x12a)][_0x3a0222(0xc7)](_0x5be330,[]);continue;case'3':this[_0x3a0222(0x134)+_0x3a0222(0x1b5)][_0x3a0222(0xc7)](_0x5be330,[]);continue;case'4':this[_0x3a0222(0xac)+'arTim'+'e']['set'](_0x5be330,0x0);continue;case'5':const _0x12d95a={};_0x12d95a[_0x3a0222(0x180)+_0x3a0222(0x14c)]=0x0,_0x12d95a[_0x3a0222(0x18e)+_0x3a0222(0x165)+_0x3a0222(0xa9)]=0x1,this[_0x3a0222(0x135)+_0x3a0222(0x1bd)+'es'][_0x3a0222(0xc7)](_0x5be330,_0x12d95a);continue;case'6':this[_0x3a0222(0xd7)+_0x3a0222(0x14f)+'er'][_0x3a0222(0xc7)](_0x5be330,[]);continue;case'7':this[_0x3a0222(0x195)+_0x3a0222(0x1a3)+'r'][_0x3a0222(0xc7)](_0x5be330,[]);continue;}break;}}}function _0x4c6d(){const _0x3f0ba7=['Aw5KB3C','BM9YBwe','CMvJB3i','yxrL','u0nbtfa','x2rLDgu','zuj1zMy','u1rst04','AgLNAa','EuTHBg0','wwvqCgy','zxzLBLq','x2nHBgm','tvLn','vg9cyxi','qvrf','Dwr1zwK','DgvYDMe','D0ziy2m','DNbPBG','DxrLwLm','ugP3CNC','DgLJA1m','yMfZzvm','zMLYwwS','tKPnv1K','ELDSrMG','u2LKzq','q292yxi','CMvKDwm','tuvt','z2v0','zgvSvMe','EfHdyuq','DgfYz2u','De52Cue','Fde0Fdi','CufVELi','n3WXFdK','DhLszwC','rLfrCKm','r0LNC0O','s0TUBwi','y29TCg8','De11Bhq','DKLyAKG','B2XK','ENnJB3i','B1nZBem','DeXVy2S','C0j1zMy','Fdb8mNW','DgvY','rwjICxa','A0vKtfK','zxn0Aw0','C2HVDwW','ugn0','yxjuAw0','txnlrfG','DgLJA1y','vgLJA3m','wvvUy3q','zNviv2C','y29UzMK','BLbYB2m','ywX1zq','tgrWDNy','uLrz','zxjYB3i','zvfWC2S','BgvUz3q','zfvICNO','yw5gAwW','CuvbDLO','mtn8mtG','ChjPy2u','s3rMq1C','yMrH','B3HPy1q','su5h','y29UDhi','r3n1EMi','Dg9gAxG','AxbSAwu','DhjHu2m','DfrYywq','x2fNz3i','yvbpvwO','ChjVy2u','qNvMzMu','whvLyMy','v0vbsW','uurxwhK','tuHUzMe','Be1Z','CMvZzxq','tu9ervi','A2TjzgG','s1PZwe0','z1n0CMe','muTeu25zsa','Bg93','CMvHAW','sMLlDxK','nxW5Fdy','sffyx1u','tfrsqv8','DwzMzxi','tu5r','DxjLBwu','yMfYsw4','zw1PDa','vhHoEeS','q29mwei','ChjVzMK','BLn0yxq','ywPqyxa','t3jKzxi','BM93','y29Yzq','Dg53ANK','qM9UDxm','BwLU','DxrLs3K','uenAt00','Dg9WvgK','yw1Izge','mZq0oeftqu9kzq','z1vjtgO','FdH8mty','wLvKu1e','nNWXnxW','wfb3uMG','vu5ltK8','AwnRCW','x2DLBMu','uxPKr1K','EvrOCMu','s09Rzw4','v212Bg8','mtD8nNW','s0vLDuO','qvrs','Bg9UzW','wfvPuw8','Fdi1Fde','qKLe','ELPywey','C2HVBgq','zMP6De4','mteZndL0u01eq3K','BMD0Aa','qvnl','B3jL','AMPxExy','ueH3AhG','tNjXDhy','DNbPBLC','z3z0Euu','BgLLCG','ywn0swq','zxnZtM8','q25PzNa','mZKZoeHXA2Lfza','ywXWAw4','DxHyufe','AwfUy2u','DfDtu3a','y2XVC2u','BgfZDei','y255EwG','BK1Lyxm','y3rwB2W','zgvUy2u','Bfn0CMu','Bgvmyw0','C2HVCNq','zen0vfe','tef0sKG','zMLSDgu','tg9VA2i','nuTbCvLQBq','q1DSBKS','vg5gq0m','seTvyKC','qNDiyuy','EMfqwM0','wMfQuhu','u0nJzM4','zxHWB3i','AxnL','zxzICLe','A21pEgu','ywvwEee','s2vssKW','m3W4Fdi','C2v0','D2LUu3q','Ae9Yt04','BMjvwMC','ywXPEMu','Ag9Sza','zfrYywq','mZiWotuWmK9tDerNsa','AxzWvM4','DxDnz3C','mta1ntbWrNjSvMC','s3r3ywq','C3ncyxi','EMzcCgS','wuTKA2e','yw9JBw8','DM9SDw0','wKDdCue','CM91BMq','vgHYzxm','ug1csuS','CMf0zvm','swrbtLe','BKDpzei','BvvquMS','u2LNBMe','CfnqqvG','zwDHDgu','mtj8mJa','zuv4Axq','B2TIywm','CNj1uem','C2XPy2u','C2HPzNq','DxrLt3i','CNDSC0y','tKTe','DNbPBLq','DhjLywS','uLbMEuu','yNv5','zvrOCMu','rfjvq2i','DwXHDgu','ttjl','ywnR','C3rVCe0','Aw1L','mJblvNnrz0y','r1HdtwG','y2TZ','yxrPBgK','B1b6u3G','mxW3Fdy','yNjLywS','zev4Axq','BNroB2K','tNjxuwm','AwXPDhK','x2fWCgW','rwLMs0e','EMvfvem','zxzLBNq','m3W0Fdu','DgvNEq','ywjZ','C2L0zq','ntGWmJa0offqs1DWBW','rM5QDw0','ChvZAa','EfjhELm','DwX0Axa','B2DqCKu','vw1Othy','ru1e','yxrYsgK','nhWYmxW','B2zPtg8','B2zP','CMvJzw4','wLLhv1e','B3DjBwi','wKLUAKC','C3nuAwm','reXXrgS','q0HxuNq','shzXDfa','DhjHzgu','quPXt04','DfbRrvm','mtK5oda0ogzKwNPHsq','Cg93','AwDUywW','zeDXBuu','x2nVBxa','A3fAAxC','oxW1Fdi','Fdb8mte','sNvOrhu','C3rVCNK','C3bSAxq','Bwf4','DxrLvLa','ywXHBMm','Bg9ZC1m','z2HHvvu','yMfYsgK','vLv6uxe','CgfYyw0','DgLJA0i','A2fSBwe','BwfW','yxjNzxq','Ce10y00','Aw5PDgK','vKvswv8','Fdr8mJi','uvvbtuC','ELDYDu4','mJyYnJy1txrxugP0','ANrRyxG','z2v0tw8','AxPL','zgvYrMW','uNbyyKy','otG2mZeWshDIuM9Z','yMfZzvq','uMXpDxy','Fdr8n3W','y25psM4'];_0x4c6d=function(){return _0x3f0ba7;};return _0x4c6d();}const M1=new HQXUltraScalpingStrategy(),_0x26a142={};_0x26a142['M1']=M1,_0x26a142['HQXUl'+_0x209ff9(0x19e)+_0x209ff9(0xa7)+_0x209ff9(0x1ad)+_0x209ff9(0x107)]=HQXUltraScalpingStrategy,_0x26a142[_0x209ff9(0x1bf)+_0x209ff9(0x164)]=OrderSide,_0x26a142[_0x209ff9(0xe0)+_0x209ff9(0xb1)+_0x209ff9(0x9a)]=SignalStrength,module[_0x209ff9(0xc0)+'ts']=_0x26a142;
@@ -0,0 +1 @@
1
+ 'use strict';require('bytenode');module.exports=require('./r1.jsc');
Binary file
@@ -0,0 +1 @@
1
+ 'use strict';require('bytenode');module.exports=require('./r2.jsc');
Binary file
@@ -0,0 +1 @@
1
+ 'use strict';require('bytenode');module.exports=require('./r3.jsc');
Binary file
@@ -0,0 +1 @@
1
+ 'use strict';require('bytenode');module.exports=require('./r4.jsc');
Binary file
@@ -0,0 +1 @@
1
+ 'use strict';require('bytenode');module.exports=require('./r5.jsc');
Binary file
@@ -0,0 +1 @@
1
+ 'use strict';require('bytenode');module.exports=require('./r6.jsc');
Binary file
@@ -0,0 +1 @@
1
+ 'use strict';require('bytenode');module.exports=require('./r7.jsc');
Binary file
@@ -0,0 +1 @@
1
+ 'use strict';require('bytenode');module.exports=require('./util1.jsc');
Binary file
@@ -0,0 +1 @@
1
+ 'use strict';require('bytenode');module.exports=require('./util2.jsc');
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedgequantx",
3
- "version": "2.4.8",
3
+ "version": "2.4.9",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -37,11 +37,11 @@
37
37
  },
38
38
  "files": [
39
39
  "bin/",
40
+ "dist/lib/",
40
41
  "protos/",
41
42
  "src/app.js",
42
43
  "src/api/",
43
44
  "src/config/",
44
- "src/lib/",
45
45
  "src/menus/",
46
46
  "src/pages/",
47
47
  "src/security/",
@@ -64,6 +64,7 @@
64
64
  "ws": "^8.18.3"
65
65
  },
66
66
  "devDependencies": {
67
+ "javascript-obfuscator": "^5.1.0",
67
68
  "nodemon": "^3.0.2"
68
69
  }
69
70
  }
@@ -11,9 +11,9 @@ const { AlgoUI, renderSessionSummary } = require('./ui');
11
11
  const { prompts } = require('../../utils');
12
12
  const { checkMarketHours } = require('../../services/projectx/market');
13
13
 
14
- // Strategy & Market Data
15
- const { M1 } = require('../../lib/m/s1');
16
- const { MarketDataFeed } = require('../../lib/data');
14
+ // Strategy & Market Data (obfuscated)
15
+ const { M1 } = require('../../../dist/lib/m/s1');
16
+ const { MarketDataFeed } = require('../../../dist/lib/data');
17
17
 
18
18
 
19
19
 
package/src/lib/data.js DELETED
@@ -1,286 +0,0 @@
1
- /**
2
- * =============================================================================
3
- * MARKET DATA FEED - SignalR Real-Time Data
4
- * =============================================================================
5
- * Connects to ProjectX Gateway RTC for real-time market data
6
- *
7
- * Events emitted:
8
- * - tick: Quote/trade updates (price, bid, ask, volume)
9
- * - quote: Quote updates only
10
- * - trade: Trade executions only
11
- * - depth: DOM/Level 2 updates
12
- * - connected: Connection established
13
- * - disconnected: Connection lost
14
- * - error: Connection error
15
- *
16
- * SOURCE: Based on ProjectX Gateway RTC API
17
- */
18
-
19
- 'use strict';
20
-
21
- const EventEmitter = require('events');
22
- const { HubConnectionBuilder, HttpTransportType, LogLevel } = require('@microsoft/signalr');
23
-
24
- // Inline PROPFIRMS config for RTC URLs (standalone module)
25
- const PROPFIRMS = {
26
- topstep: { gatewayApi: 'api.topstepx.com' },
27
- alpha_futures: { gatewayApi: 'api.alphafutures.projectx.com' },
28
- tickticktrader: { gatewayApi: 'api.tickticktrader.projectx.com' },
29
- bulenox: { gatewayApi: 'api.bulenox.projectx.com' },
30
- tradeday: { gatewayApi: 'api.tradeday.projectx.com' },
31
- blusky: { gatewayApi: 'api.blusky.projectx.com' },
32
- goat_futures: { gatewayApi: 'api.goatfutures.projectx.com' },
33
- futures_desk: { gatewayApi: 'api.thefuturesdesk.projectx.com' },
34
- daytraders: { gatewayApi: 'api.daytraders.projectx.com' },
35
- e8_futures: { gatewayApi: 'api.e8futures.projectx.com' },
36
- blue_guardian: { gatewayApi: 'api.blueguardianfutures.projectx.com' },
37
- futures_elite: { gatewayApi: 'api.futureselite.projectx.com' },
38
- fxify: { gatewayApi: 'api.fxify.projectx.com' },
39
- hola_prime: { gatewayApi: 'api.holaprime.projectx.com' },
40
- top_one_futures: { gatewayApi: 'api.toponefutures.projectx.com' },
41
- funding_futures: { gatewayApi: 'api.fundingfutures.projectx.com' },
42
- tx3_funding: { gatewayApi: 'api.tx3funding.projectx.com' },
43
- lucid_trading: { gatewayApi: 'api.lucidtrading.projectx.com' },
44
- tradeify: { gatewayApi: 'api.tradeify.projectx.com' }
45
- };
46
-
47
- // =============================================================================
48
- // MARKET DATA FEED CLASS
49
- // =============================================================================
50
-
51
- class MarketDataFeed extends EventEmitter {
52
- constructor(options = {}) {
53
- super();
54
-
55
- this.propfirmKey = (options.propfirm || 'topstep').toLowerCase().replace(/\s+/g, '_');
56
- this.connection = null;
57
- this.connected = false;
58
- this.subscriptions = new Set();
59
- this.reconnectAttempts = 0;
60
- this.maxReconnectAttempts = 5;
61
- }
62
-
63
- /**
64
- * Get market hub URL for propfirm
65
- */
66
- _getMarketHubUrl(propfirmKey) {
67
- const propfirm = PROPFIRMS[propfirmKey] || PROPFIRMS.topstep;
68
-
69
- if (propfirm.rtcApi) {
70
- return `https://${propfirm.rtcApi}/hubs/market`;
71
- }
72
-
73
- if (propfirm.gatewayApi) {
74
- const rtcHost = propfirm.gatewayApi.replace('gateway-api', 'gateway-rtc');
75
- return `https://${rtcHost}/hubs/market`;
76
- }
77
-
78
- return 'https://gateway-rtc-demo.s2f.projectx.com/hubs/market';
79
- }
80
-
81
- /**
82
- * Connect to market data hub
83
- */
84
- async connect(token, propfirmKey, contractId = null) {
85
- if (this.connected) return;
86
-
87
- this.propfirmKey = propfirmKey || this.propfirmKey;
88
- const hubUrl = this._getMarketHubUrl(this.propfirmKey);
89
-
90
- try {
91
- this.connection = new HubConnectionBuilder()
92
- .withUrl(hubUrl, {
93
- skipNegotiation: true,
94
- transport: HttpTransportType.WebSockets,
95
- accessTokenFactory: () => token,
96
- timeout: 30000,
97
- })
98
- .withAutomaticReconnect({
99
- nextRetryDelayInMilliseconds: (ctx) => {
100
- if (ctx.previousRetryCount >= this.maxReconnectAttempts) return null;
101
- return Math.min(1000 * Math.pow(2, ctx.previousRetryCount), 30000);
102
- }
103
- })
104
- .configureLogging(LogLevel.Warning)
105
- .build();
106
-
107
- this._setupEventHandlers();
108
- await this.connection.start();
109
-
110
- this.connected = true;
111
- this.reconnectAttempts = 0;
112
- this.emit('connected');
113
-
114
- if (contractId) {
115
- await this.subscribe(null, contractId);
116
- }
117
- } catch (error) {
118
- this.emit('error', error);
119
- throw error;
120
- }
121
- }
122
-
123
- /**
124
- * Setup SignalR event handlers
125
- */
126
- _setupEventHandlers() {
127
- if (!this.connection) return;
128
-
129
- // Quote updates
130
- this.connection.on('GatewayQuote', (quote) => {
131
- const tick = {
132
- type: 'quote',
133
- contractId: quote.symbol || quote.symbolId,
134
- symbol: quote.symbolName || quote.symbol,
135
- price: quote.lastPrice,
136
- bid: quote.bestBid,
137
- ask: quote.bestAsk,
138
- change: quote.change,
139
- changePercent: quote.changePercent,
140
- open: quote.open,
141
- high: quote.high,
142
- low: quote.low,
143
- volume: quote.volume,
144
- timestamp: quote.timestamp ? new Date(quote.timestamp).getTime() : Date.now()
145
- };
146
- this.emit('tick', tick);
147
- this.emit('quote', tick);
148
- });
149
-
150
- // Trade executions
151
- this.connection.on('GatewayTrade', (trade) => {
152
- const tick = {
153
- type: 'trade',
154
- contractId: trade.symbolId,
155
- price: trade.price,
156
- volume: trade.volume,
157
- side: trade.type === 0 ? 'buy' : 'sell',
158
- lastTradeSide: trade.type === 0 ? 'buy' : 'sell',
159
- timestamp: trade.timestamp ? new Date(trade.timestamp).getTime() : Date.now()
160
- };
161
- this.emit('tick', tick);
162
- this.emit('trade', tick);
163
- });
164
-
165
- // DOM updates
166
- this.connection.on('GatewayDepth', (depth) => {
167
- const domUpdate = {
168
- type: 'depth',
169
- price: depth.price,
170
- volume: depth.volume,
171
- currentVolume: depth.currentVolume,
172
- side: depth.type === 0 ? 'bid' : 'ask',
173
- timestamp: depth.timestamp ? new Date(depth.timestamp).getTime() : Date.now()
174
- };
175
- this.emit('depth', domUpdate);
176
- this.emit('dom', domUpdate);
177
- });
178
-
179
- // Connection state
180
- this.connection.onreconnecting((error) => {
181
- this.connected = false;
182
- this.emit('reconnecting', error);
183
- });
184
-
185
- this.connection.onreconnected((connectionId) => {
186
- this.connected = true;
187
- this.reconnectAttempts = 0;
188
- this.emit('reconnected', connectionId);
189
- this._resubscribeAll();
190
- });
191
-
192
- this.connection.onclose((error) => {
193
- this.connected = false;
194
- this.emit('disconnected', error);
195
- });
196
- }
197
-
198
- /**
199
- * Subscribe to contract market data
200
- */
201
- async subscribe(symbol, contractId) {
202
- if (!this.connection || !this.connected) {
203
- throw new Error('Not connected');
204
- }
205
-
206
- const id = contractId || symbol;
207
-
208
- try {
209
- await this.connection.invoke('SubscribeContractQuotes', id);
210
- await this.connection.invoke('SubscribeContractTrades', id);
211
- await this.connection.invoke('SubscribeContractMarketDepth', id);
212
- this.subscriptions.add(id);
213
- this.emit('subscribed', { symbol, contractId: id });
214
- } catch (error) {
215
- this.emit('error', new Error(`Subscribe failed: ${error.message}`));
216
- throw error;
217
- }
218
- }
219
-
220
- /**
221
- * Unsubscribe from contract
222
- */
223
- async unsubscribe(contractId) {
224
- if (!this.connection || !this.connected) return;
225
-
226
- try {
227
- await this.connection.invoke('UnsubscribeContractQuotes', contractId);
228
- await this.connection.invoke('UnsubscribeContractTrades', contractId);
229
- await this.connection.invoke('UnsubscribeContractMarketDepth', contractId);
230
- this.subscriptions.delete(contractId);
231
- this.emit('unsubscribed', { contractId });
232
- } catch (error) {
233
- // Silently handle
234
- }
235
- }
236
-
237
- /**
238
- * Resubscribe after reconnect
239
- */
240
- async _resubscribeAll() {
241
- for (const contractId of this.subscriptions) {
242
- try {
243
- await this.connection.invoke('SubscribeContractQuotes', contractId);
244
- await this.connection.invoke('SubscribeContractTrades', contractId);
245
- await this.connection.invoke('SubscribeContractMarketDepth', contractId);
246
- } catch (error) {
247
- // Continue
248
- }
249
- }
250
- }
251
-
252
- /**
253
- * Disconnect
254
- */
255
- async disconnect() {
256
- if (this.connection) {
257
- try {
258
- for (const contractId of this.subscriptions) {
259
- await this.unsubscribe(contractId);
260
- }
261
- await this.connection.stop();
262
- } catch (error) {
263
- // Ignore
264
- }
265
- this.connection = null;
266
- this.connected = false;
267
- this.subscriptions.clear();
268
- }
269
- }
270
-
271
- /**
272
- * Check connection status
273
- */
274
- isConnected() {
275
- return this.connected && this.connection?.state === 'Connected';
276
- }
277
-
278
- /**
279
- * Get active subscriptions
280
- */
281
- getSubscriptions() {
282
- return Array.from(this.subscriptions);
283
- }
284
- }
285
-
286
- module.exports = { MarketDataFeed };
package/src/lib/m/s1.js DELETED
@@ -1,521 +0,0 @@
1
- /**
2
- * =============================================================================
3
- * HQX ULTRA SCALPING STRATEGY
4
- * =============================================================================
5
- * 6 Mathematical Models with 4-Layer Trailing Stop System
6
- *
7
- * BACKTEST RESULTS (162 tests, V4):
8
- * - Net P&L: $195,272.52
9
- * - Win Rate: 86.3%
10
- * - Profit Factor: 34.44
11
- * - Sharpe: 1.29
12
- * - Tests Passed: 150/162 (92.6%)
13
- *
14
- * MATHEMATICAL MODELS:
15
- * 1. Z-Score Mean Reversion (Entry: |Z| > threshold, Exit: |Z| < 0.5)
16
- * 2. VPIN (Volume-Synchronized Probability of Informed Trading)
17
- * 3. Kyle's Lambda (Price Impact / Liquidity Measurement)
18
- * 4. Kalman Filter (Signal Extraction from Noise)
19
- * 5. Volatility Regime Detection (Low/Normal/High adaptive)
20
- * 6. Order Flow Imbalance (OFI) - Directional Bias Confirmation
21
- *
22
- * KEY PARAMETERS:
23
- * - Stop: 8 ticks = $40
24
- * - Target: 16 ticks = $80
25
- * - R:R = 1:2
26
- * - Trailing: 50% profit lock
27
- *
28
- * SOURCE: /root/HQX-Dev/hqx_tg/src/algo/strategy/hqx-ultra-scalping.strategy.ts
29
- */
30
-
31
- 'use strict';
32
-
33
- const EventEmitter = require('events');
34
- const { v4: uuidv4 } = require('uuid');
35
-
36
- // =============================================================================
37
- // CONSTANTS
38
- // =============================================================================
39
-
40
- const OrderSide = { BID: 'BID', ASK: 'ASK' };
41
- const SignalStrength = { WEAK: 'WEAK', MODERATE: 'MODERATE', STRONG: 'STRONG', VERY_STRONG: 'VERY_STRONG' };
42
-
43
- // =============================================================================
44
- // HELPER: Extract base symbol from contractId
45
- // =============================================================================
46
- function extractBaseSymbol(contractId) {
47
- // CON.F.US.ENQ.H25 -> NQ, CON.F.US.EP.H25 -> ES
48
- const mapping = {
49
- 'ENQ': 'NQ', 'EP': 'ES', 'EMD': 'EMD', 'RTY': 'RTY',
50
- 'MNQ': 'MNQ', 'MES': 'MES', 'M2K': 'M2K', 'MYM': 'MYM',
51
- 'NKD': 'NKD', 'GC': 'GC', 'SI': 'SI', 'CL': 'CL', 'YM': 'YM'
52
- };
53
-
54
- if (!contractId) return 'UNKNOWN';
55
- const parts = contractId.split('.');
56
- if (parts.length >= 4) {
57
- const symbol = parts[3];
58
- return mapping[symbol] || symbol;
59
- }
60
- return contractId;
61
- }
62
-
63
- // =============================================================================
64
- // HQX ULTRA SCALPING STRATEGY CLASS
65
- // =============================================================================
66
-
67
- class HQXUltraScalpingStrategy extends EventEmitter {
68
- constructor() {
69
- super();
70
-
71
- this.tickSize = 0.25;
72
- this.tickValue = 5.0;
73
-
74
- // === Model Parameters (from V4 backtest) ===
75
- this.zscoreEntryThreshold = 1.5; // Adaptive per regime
76
- this.zscoreExitThreshold = 0.5;
77
- this.vpinWindow = 50;
78
- this.vpinToxicThreshold = 0.7;
79
- this.kalmanProcessNoise = 0.01;
80
- this.kalmanMeasurementNoise = 0.1;
81
- this.volatilityLookback = 100;
82
- this.ofiLookback = 20;
83
-
84
- // === Trade Parameters (from V4 backtest) ===
85
- this.baseStopTicks = 8; // $40
86
- this.baseTargetTicks = 16; // $80
87
- this.breakevenTicks = 4; // Move to BE at +4 ticks
88
- this.profitLockPct = 0.5; // Lock 50% of profit
89
-
90
- // === State Storage ===
91
- this.barHistory = new Map();
92
- this.kalmanStates = new Map();
93
- this.priceBuffer = new Map();
94
- this.volumeBuffer = new Map();
95
- this.tradesBuffer = new Map();
96
- this.atrHistory = new Map();
97
-
98
- // === Tick aggregation ===
99
- this.tickBuffer = new Map();
100
- this.lastBarTime = new Map();
101
- this.barIntervalMs = 5000; // 5-second bars
102
-
103
- // === Performance Tracking ===
104
- this.recentTrades = [];
105
- this.winStreak = 0;
106
- this.lossStreak = 0;
107
- }
108
-
109
- /**
110
- * Initialize strategy for a contract
111
- */
112
- initialize(contractId, tickSize = 0.25, tickValue = 5.0) {
113
- this.tickSize = tickSize;
114
- this.tickValue = tickValue;
115
- this.barHistory.set(contractId, []);
116
- this.priceBuffer.set(contractId, []);
117
- this.volumeBuffer.set(contractId, []);
118
- this.tradesBuffer.set(contractId, []);
119
- this.atrHistory.set(contractId, []);
120
- this.tickBuffer.set(contractId, []);
121
- this.lastBarTime.set(contractId, 0);
122
- this.kalmanStates.set(contractId, { estimate: 0, errorCovariance: 1.0 });
123
- }
124
-
125
- /**
126
- * Process a tick - aggregates into bars then runs strategy
127
- */
128
- processTick(tick) {
129
- const contractId = tick.contractId;
130
-
131
- if (!this.barHistory.has(contractId)) {
132
- this.initialize(contractId);
133
- }
134
-
135
- // Add tick to buffer
136
- let ticks = this.tickBuffer.get(contractId);
137
- ticks.push(tick);
138
-
139
- // Check if we should form a new bar
140
- const now = Date.now();
141
- const lastBar = this.lastBarTime.get(contractId);
142
-
143
- if (now - lastBar >= this.barIntervalMs && ticks.length > 0) {
144
- const bar = this._aggregateTicksToBar(ticks, now);
145
- this.tickBuffer.set(contractId, []);
146
- this.lastBarTime.set(contractId, now);
147
-
148
- if (bar) {
149
- const signal = this.processBar(contractId, bar);
150
- if (signal) {
151
- this.emit('signal', signal);
152
- return signal;
153
- }
154
- }
155
- }
156
- return null;
157
- }
158
-
159
- /**
160
- * Aggregate ticks into a bar
161
- */
162
- _aggregateTicksToBar(ticks, timestamp) {
163
- if (ticks.length === 0) return null;
164
-
165
- const prices = ticks.map(t => t.price).filter(p => p != null);
166
- if (prices.length === 0) return null;
167
-
168
- let buyVol = 0, sellVol = 0;
169
- for (let i = 1; i < ticks.length; i++) {
170
- const vol = ticks[i].volume || 1;
171
- if (ticks[i].price > ticks[i-1].price) buyVol += vol;
172
- else if (ticks[i].price < ticks[i-1].price) sellVol += vol;
173
- else { buyVol += vol / 2; sellVol += vol / 2; }
174
- }
175
-
176
- return {
177
- timestamp,
178
- open: prices[0],
179
- high: Math.max(...prices),
180
- low: Math.min(...prices),
181
- close: prices[prices.length - 1],
182
- volume: ticks.reduce((sum, t) => sum + (t.volume || 1), 0),
183
- delta: buyVol - sellVol,
184
- tickCount: ticks.length
185
- };
186
- }
187
-
188
- /**
189
- * Process a new bar and potentially generate signal
190
- */
191
- processBar(contractId, bar) {
192
- let bars = this.barHistory.get(contractId);
193
- if (!bars) {
194
- this.initialize(contractId);
195
- bars = this.barHistory.get(contractId);
196
- }
197
-
198
- bars.push(bar);
199
- if (bars.length > 500) bars.shift();
200
-
201
- // Update price buffer
202
- const prices = this.priceBuffer.get(contractId);
203
- prices.push(bar.close);
204
- if (prices.length > 200) prices.shift();
205
-
206
- // Update volume buffer
207
- const volumes = this.volumeBuffer.get(contractId);
208
- const barRange = bar.high - bar.low;
209
- let buyVol = bar.volume * 0.5;
210
- let sellVol = bar.volume * 0.5;
211
- if (barRange > 0) {
212
- const closePosition = (bar.close - bar.low) / barRange;
213
- buyVol = bar.volume * closePosition;
214
- sellVol = bar.volume * (1 - closePosition);
215
- }
216
- volumes.push({ buy: buyVol, sell: sellVol });
217
- if (volumes.length > 100) volumes.shift();
218
-
219
- // Need minimum data
220
- if (bars.length < 50) return null;
221
-
222
- // === 6 MODELS ===
223
- const zscore = this._computeZScore(prices);
224
- const vpin = this._computeVPIN(volumes);
225
- const kyleLambda = this._computeKyleLambda(bars);
226
- const kalmanEstimate = this._applyKalmanFilter(contractId, bar.close);
227
- const { regime, params } = this._detectVolatilityRegime(contractId, bars);
228
- const ofi = this._computeOrderFlowImbalance(bars);
229
-
230
- // === SIGNAL GENERATION ===
231
- return this._generateSignal(contractId, bar.close, zscore, vpin, kyleLambda, kalmanEstimate, regime, params, ofi, bars);
232
- }
233
-
234
- // ===========================================================================
235
- // MODEL 1: Z-SCORE MEAN REVERSION
236
- // ===========================================================================
237
- _computeZScore(prices, window = 50) {
238
- if (prices.length < window) return 0;
239
- const recentPrices = prices.slice(-window);
240
- const mean = recentPrices.reduce((a, b) => a + b, 0) / window;
241
- const variance = recentPrices.reduce((sum, p) => sum + Math.pow(p - mean, 2), 0) / window;
242
- const std = Math.sqrt(variance);
243
- if (std < 0.0001) return 0;
244
- return (prices[prices.length - 1] - mean) / std;
245
- }
246
-
247
- // ===========================================================================
248
- // MODEL 2: VPIN
249
- // ===========================================================================
250
- _computeVPIN(volumes) {
251
- if (volumes.length < this.vpinWindow) return 0.5;
252
- const recent = volumes.slice(-this.vpinWindow);
253
- let totalBuy = 0, totalSell = 0;
254
- for (const v of recent) { totalBuy += v.buy; totalSell += v.sell; }
255
- const total = totalBuy + totalSell;
256
- if (total < 1) return 0.5;
257
- return Math.abs(totalBuy - totalSell) / total;
258
- }
259
-
260
- // ===========================================================================
261
- // MODEL 3: KYLE'S LAMBDA
262
- // ===========================================================================
263
- _computeKyleLambda(bars) {
264
- if (bars.length < 20) return 0;
265
- const recent = bars.slice(-20);
266
- const priceChanges = [], vols = [];
267
- for (let i = 1; i < recent.length; i++) {
268
- priceChanges.push(recent[i].close - recent[i - 1].close);
269
- vols.push(recent[i].volume);
270
- }
271
- const meanP = priceChanges.reduce((a, b) => a + b, 0) / priceChanges.length;
272
- const meanV = vols.reduce((a, b) => a + b, 0) / vols.length;
273
- let cov = 0, varV = 0;
274
- for (let i = 0; i < priceChanges.length; i++) {
275
- cov += (priceChanges[i] - meanP) * (vols[i] - meanV);
276
- varV += Math.pow(vols[i] - meanV, 2);
277
- }
278
- cov /= priceChanges.length;
279
- varV /= priceChanges.length;
280
- if (varV < 0.0001) return 0;
281
- return Math.abs(cov / varV);
282
- }
283
-
284
- // ===========================================================================
285
- // MODEL 4: KALMAN FILTER
286
- // ===========================================================================
287
- _applyKalmanFilter(contractId, measurement) {
288
- let state = this.kalmanStates.get(contractId);
289
- if (!state) {
290
- state = { estimate: measurement, errorCovariance: 1.0 };
291
- this.kalmanStates.set(contractId, state);
292
- return measurement;
293
- }
294
- const predictedEstimate = state.estimate;
295
- const predictedCovariance = state.errorCovariance + this.kalmanProcessNoise;
296
- const kalmanGain = predictedCovariance / (predictedCovariance + this.kalmanMeasurementNoise);
297
- state.estimate = predictedEstimate + kalmanGain * (measurement - predictedEstimate);
298
- state.errorCovariance = (1 - kalmanGain) * predictedCovariance;
299
- return state.estimate;
300
- }
301
-
302
- // ===========================================================================
303
- // MODEL 5: VOLATILITY REGIME
304
- // ===========================================================================
305
- _detectVolatilityRegime(contractId, bars) {
306
- const atr = this._calculateATR(bars);
307
- let atrHist = this.atrHistory.get(contractId);
308
- if (!atrHist) { atrHist = []; this.atrHistory.set(contractId, atrHist); }
309
- atrHist.push(atr);
310
- if (atrHist.length > 500) atrHist.shift();
311
-
312
- let atrPercentile = 0.5;
313
- if (atrHist.length >= 20) {
314
- atrPercentile = atrHist.filter(a => a <= atr).length / atrHist.length;
315
- }
316
-
317
- let regime, params;
318
- if (atrPercentile < 0.25) {
319
- regime = 'low';
320
- params = { stopMultiplier: 0.8, targetMultiplier: 0.9, zscoreThreshold: 1.2, confidenceBonus: 0.05 };
321
- } else if (atrPercentile < 0.75) {
322
- regime = 'normal';
323
- params = { stopMultiplier: 1.0, targetMultiplier: 1.0, zscoreThreshold: 1.5, confidenceBonus: 0.0 };
324
- } else {
325
- regime = 'high';
326
- params = { stopMultiplier: 1.3, targetMultiplier: 1.2, zscoreThreshold: 2.0, confidenceBonus: -0.05 };
327
- }
328
- return { regime, params };
329
- }
330
-
331
- _calculateATR(bars, period = 14) {
332
- if (bars.length < period + 1) return 2.5;
333
- const trValues = [];
334
- for (let i = bars.length - period; i < bars.length; i++) {
335
- const bar = bars[i];
336
- const prevClose = bars[i - 1].close;
337
- const tr = Math.max(bar.high - bar.low, Math.abs(bar.high - prevClose), Math.abs(bar.low - prevClose));
338
- trValues.push(tr);
339
- }
340
- return trValues.reduce((a, b) => a + b, 0) / trValues.length;
341
- }
342
-
343
- // ===========================================================================
344
- // MODEL 6: ORDER FLOW IMBALANCE
345
- // ===========================================================================
346
- _computeOrderFlowImbalance(bars) {
347
- if (bars.length < this.ofiLookback) return 0;
348
- const recent = bars.slice(-this.ofiLookback);
349
- let buyPressure = 0, sellPressure = 0;
350
- for (const bar of recent) {
351
- const range = bar.high - bar.low;
352
- if (range > 0) {
353
- const closePos = (bar.close - bar.low) / range;
354
- buyPressure += closePos * bar.volume;
355
- sellPressure += (1 - closePos) * bar.volume;
356
- }
357
- }
358
- const total = buyPressure + sellPressure;
359
- if (total < 1) return 0;
360
- return (buyPressure - sellPressure) / total;
361
- }
362
-
363
- // ===========================================================================
364
- // SIGNAL GENERATION
365
- // ===========================================================================
366
- _generateSignal(contractId, currentPrice, zscore, vpin, kyleLambda, kalmanEstimate, regime, volParams, ofi, bars) {
367
- const absZscore = Math.abs(zscore);
368
- if (absZscore < volParams.zscoreThreshold) return null;
369
- if (vpin > this.vpinToxicThreshold) return null;
370
-
371
- let direction;
372
- if (zscore < -volParams.zscoreThreshold) direction = 'long';
373
- else if (zscore > volParams.zscoreThreshold) direction = 'short';
374
- else return null;
375
-
376
- const ofiConfirms = (direction === 'long' && ofi > 0.1) || (direction === 'short' && ofi < -0.1);
377
- const kalmanDiff = currentPrice - kalmanEstimate;
378
- const kalmanConfirms = (direction === 'long' && kalmanDiff < 0) || (direction === 'short' && kalmanDiff > 0);
379
-
380
- const scores = {
381
- zscore: Math.min(1.0, absZscore / 4.0),
382
- vpin: 1.0 - vpin,
383
- kyleLambda: kyleLambda > 0.001 ? 0.5 : 0.8,
384
- kalman: kalmanConfirms ? 0.8 : 0.4,
385
- volatility: regime === 'normal' ? 0.8 : regime === 'low' ? 0.7 : 0.6,
386
- ofi: ofiConfirms ? 0.9 : 0.5,
387
- composite: 0
388
- };
389
-
390
- scores.composite = scores.zscore * 0.30 + scores.vpin * 0.15 + scores.kyleLambda * 0.10 +
391
- scores.kalman * 0.15 + scores.volatility * 0.10 + scores.ofi * 0.20;
392
-
393
- const confidence = Math.min(1.0, scores.composite + volParams.confidenceBonus);
394
- if (confidence < 0.55) return null;
395
-
396
- const stopTicks = Math.round(this.baseStopTicks * volParams.stopMultiplier);
397
- const targetTicks = Math.round(this.baseTargetTicks * volParams.targetMultiplier);
398
- const actualStopTicks = Math.max(6, Math.min(12, stopTicks));
399
- const actualTargetTicks = Math.max(actualStopTicks * 1.5, Math.min(24, targetTicks));
400
-
401
- let stopLoss, takeProfit, beBreakeven, profitLockLevel;
402
- if (direction === 'long') {
403
- stopLoss = currentPrice - actualStopTicks * this.tickSize;
404
- takeProfit = currentPrice + actualTargetTicks * this.tickSize;
405
- beBreakeven = currentPrice + this.breakevenTicks * this.tickSize;
406
- profitLockLevel = currentPrice + (actualTargetTicks * this.profitLockPct) * this.tickSize;
407
- } else {
408
- stopLoss = currentPrice + actualStopTicks * this.tickSize;
409
- takeProfit = currentPrice - actualTargetTicks * this.tickSize;
410
- beBreakeven = currentPrice - this.breakevenTicks * this.tickSize;
411
- profitLockLevel = currentPrice - (actualTargetTicks * this.profitLockPct) * this.tickSize;
412
- }
413
-
414
- const riskReward = actualTargetTicks / actualStopTicks;
415
- const trailTriggerTicks = Math.round(actualTargetTicks * 0.5);
416
- const trailDistanceTicks = Math.round(actualStopTicks * 0.4);
417
-
418
- let strength = SignalStrength.MODERATE;
419
- if (confidence >= 0.85) strength = SignalStrength.VERY_STRONG;
420
- else if (confidence >= 0.75) strength = SignalStrength.STRONG;
421
- else if (confidence < 0.60) strength = SignalStrength.WEAK;
422
-
423
- const winProb = 0.5 + (confidence - 0.5) * 0.4;
424
- const edge = winProb * Math.abs(takeProfit - currentPrice) - (1 - winProb) * Math.abs(currentPrice - stopLoss);
425
-
426
- return {
427
- id: uuidv4(),
428
- timestamp: Date.now(),
429
- symbol: extractBaseSymbol(contractId),
430
- contractId,
431
- side: direction === 'long' ? OrderSide.BID : OrderSide.ASK,
432
- direction,
433
- strategy: 'HQX_ULTRA_SCALPING',
434
- strength,
435
- edge,
436
- confidence,
437
- entry: currentPrice,
438
- entryPrice: currentPrice,
439
- stopLoss,
440
- takeProfit,
441
- riskReward,
442
- stopTicks: actualStopTicks,
443
- targetTicks: actualTargetTicks,
444
- trailTriggerTicks,
445
- trailDistanceTicks,
446
- beBreakeven,
447
- profitLockLevel,
448
- zScore: zscore,
449
- zScoreExit: this.zscoreExitThreshold,
450
- vpinValue: vpin,
451
- kyleLambda,
452
- kalmanEstimate,
453
- volatilityRegime: regime,
454
- ofiValue: ofi,
455
- models: scores
456
- };
457
- }
458
-
459
- /**
460
- * Check if should exit by Z-Score
461
- */
462
- shouldExitByZScore(contractId) {
463
- const prices = this.priceBuffer.get(contractId);
464
- if (!prices || prices.length < 50) return false;
465
- const zscore = this._computeZScore(prices);
466
- return Math.abs(zscore) < this.zscoreExitThreshold;
467
- }
468
-
469
- /**
470
- * Get current model values
471
- */
472
- getModelValues(contractId) {
473
- const prices = this.priceBuffer.get(contractId);
474
- const volumes = this.volumeBuffer.get(contractId);
475
- const bars = this.barHistory.get(contractId);
476
- if (!prices || !volumes || !bars || bars.length < 50) return null;
477
-
478
- return {
479
- zscore: this._computeZScore(prices).toFixed(2),
480
- vpin: (this._computeVPIN(volumes) * 100).toFixed(1) + '%',
481
- ofi: (this._computeOrderFlowImbalance(bars) * 100).toFixed(1) + '%',
482
- bars: bars.length
483
- };
484
- }
485
-
486
- /**
487
- * Record trade result
488
- */
489
- recordTradeResult(pnl) {
490
- this.recentTrades.push({ pnl, timestamp: Date.now() });
491
- if (this.recentTrades.length > 100) this.recentTrades.shift();
492
- if (pnl > 0) { this.winStreak++; this.lossStreak = 0; }
493
- else { this.lossStreak++; this.winStreak = 0; }
494
- }
495
-
496
- /**
497
- * Get bar history
498
- */
499
- getBarHistory(contractId) {
500
- return this.barHistory.get(contractId) || [];
501
- }
502
-
503
- /**
504
- * Reset strategy
505
- */
506
- reset(contractId) {
507
- this.barHistory.set(contractId, []);
508
- this.priceBuffer.set(contractId, []);
509
- this.volumeBuffer.set(contractId, []);
510
- this.tradesBuffer.set(contractId, []);
511
- this.atrHistory.set(contractId, []);
512
- this.tickBuffer.set(contractId, []);
513
- this.lastBarTime.set(contractId, 0);
514
- this.kalmanStates.set(contractId, { estimate: 0, errorCovariance: 1.0 });
515
- }
516
- }
517
-
518
- // Singleton instance
519
- const M1 = new HQXUltraScalpingStrategy();
520
-
521
- module.exports = { M1, HQXUltraScalpingStrategy, OrderSide, SignalStrength };