hedgequantx 2.4.8 → 2.4.10

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';const _0x6056bd=_0x467a;(function(_0x182582,_0xa9b9d0){const _0x2d4afb=_0x467a,_0x1372c6=_0x182582();while(!![]){try{const _0x3e8b4d=parseInt(_0x2d4afb(0x26f))/0x1*(-parseInt(_0x2d4afb(0x25b))/0x2)+parseInt(_0x2d4afb(0x194))/0x3*(-parseInt(_0x2d4afb(0x24b))/0x4)+-parseInt(_0x2d4afb(0x220))/0x5*(-parseInt(_0x2d4afb(0x1c5))/0x6)+parseInt(_0x2d4afb(0x20e))/0x7+parseInt(_0x2d4afb(0x1f4))/0x8+-parseInt(_0x2d4afb(0x1ec))/0x9+parseInt(_0x2d4afb(0x219))/0xa;if(_0x3e8b4d===_0xa9b9d0)break;else _0x1372c6['push'](_0x1372c6['shift']());}catch(_0x3c500c){_0x1372c6['push'](_0x1372c6['shift']());}}}(_0x4bd9,0x59be6));const EventEmitter=require(_0x6056bd(0x1c2)+'s'),{HubConnectionBuilder,HttpTransportType,LogLevel}=require('@micr'+_0x6056bd(0x187)+'/sign'+_0x6056bd(0x1ca)),_0x76194f={};_0x76194f['gatew'+_0x6056bd(0x26c)]='api.t'+_0x6056bd(0x1c9)+'px.co'+'m';const _0x57be17={};_0x57be17[_0x6056bd(0x21b)+_0x6056bd(0x26c)]='api.a'+'lphaf'+_0x6056bd(0x24a)+_0x6056bd(0x1a3)+'jectx'+'.com';const _0x42bca5={};_0x42bca5[_0x6056bd(0x21b)+_0x6056bd(0x26c)]=_0x6056bd(0x23c)+_0x6056bd(0x1c6)+'cktra'+'der.p'+_0x6056bd(0x260)+'tx.co'+'m';const _0x3d1825={};_0x3d1825[_0x6056bd(0x21b)+'ayApi']=_0x6056bd(0x1ce)+_0x6056bd(0x286)+_0x6056bd(0x228)+'jectx'+_0x6056bd(0x1f9);const _0x358e1a={};_0x358e1a[_0x6056bd(0x21b)+_0x6056bd(0x26c)]=_0x6056bd(0x23c)+_0x6056bd(0x23f)+_0x6056bd(0x1fa)+'oject'+_0x6056bd(0x1d0);const _0x3920f7={};_0x3920f7[_0x6056bd(0x21b)+_0x6056bd(0x26c)]=_0x6056bd(0x1ce)+_0x6056bd(0x233)+_0x6056bd(0x25c)+'ectx.'+_0x6056bd(0x1ac);const _0x45958d={};_0x45958d['gatew'+_0x6056bd(0x26c)]='api.g'+_0x6056bd(0x1c0)+_0x6056bd(0x277)+'.proj'+_0x6056bd(0x18f)+_0x6056bd(0x1ac);const _0x55ab57={};_0x55ab57[_0x6056bd(0x21b)+'ayApi']=_0x6056bd(0x23c)+_0x6056bd(0x285)+_0x6056bd(0x202)+_0x6056bd(0x22a)+'rojec'+_0x6056bd(0x24c)+'m';const _0x16888c={};_0x16888c[_0x6056bd(0x21b)+_0x6056bd(0x26c)]='api.d'+'aytra'+_0x6056bd(0x24d)+_0x6056bd(0x287)+_0x6056bd(0x262)+'om';const _0x2a18fd={};_0x2a18fd[_0x6056bd(0x21b)+_0x6056bd(0x26c)]='api.e'+'8futu'+'res.p'+'rojec'+_0x6056bd(0x24c)+'m';const _0x5af74d={};_0x5af74d[_0x6056bd(0x21b)+_0x6056bd(0x26c)]=_0x6056bd(0x1ce)+_0x6056bd(0x226)+'ardia'+_0x6056bd(0x18b)+_0x6056bd(0x212)+'rojec'+_0x6056bd(0x24c)+'m';const _0x3c95d8={};_0x3c95d8[_0x6056bd(0x21b)+_0x6056bd(0x26c)]='api.f'+_0x6056bd(0x24a)+_0x6056bd(0x1f7)+_0x6056bd(0x242)+_0x6056bd(0x18c)+'.com';const _0x522102={};_0x522102[_0x6056bd(0x21b)+'ayApi']='api.f'+_0x6056bd(0x181)+_0x6056bd(0x287)+_0x6056bd(0x262)+'om';const _0x29ee28={};_0x29ee28['gatew'+_0x6056bd(0x26c)]='api.h'+'olapr'+'ime.p'+_0x6056bd(0x260)+_0x6056bd(0x24c)+'m';const _0x2d56b4={};_0x2d56b4['gatew'+_0x6056bd(0x26c)]=_0x6056bd(0x23c)+'opone'+_0x6056bd(0x251)+_0x6056bd(0x270)+_0x6056bd(0x288)+_0x6056bd(0x1d0);const _0x5bcabb={};function _0x467a(_0x3c1480,_0x399e1e){_0x3c1480=_0x3c1480-0x181;const _0x4bd945=_0x4bd9();let _0x467acd=_0x4bd945[_0x3c1480];if(_0x467a['QNzjel']===undefined){var _0x15a216=function(_0x45a5d7){const _0x263496='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4a03dd='',_0x2f376c='';for(let _0x4ab511=0x0,_0x1a55a8,_0x4f7999,_0x3d4994=0x0;_0x4f7999=_0x45a5d7['charAt'](_0x3d4994++);~_0x4f7999&&(_0x1a55a8=_0x4ab511%0x4?_0x1a55a8*0x40+_0x4f7999:_0x4f7999,_0x4ab511++%0x4)?_0x4a03dd+=String['fromCharCode'](0xff&_0x1a55a8>>(-0x2*_0x4ab511&0x6)):0x0){_0x4f7999=_0x263496['indexOf'](_0x4f7999);}for(let _0x221f79=0x0,_0x474cd6=_0x4a03dd['length'];_0x221f79<_0x474cd6;_0x221f79++){_0x2f376c+='%'+('00'+_0x4a03dd['charCodeAt'](_0x221f79)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2f376c);};_0x467a['thrOiI']=_0x15a216,_0x467a['gybmcg']={},_0x467a['QNzjel']=!![];}const _0x563041=_0x4bd945[0x0],_0x5ad6c8=_0x3c1480+_0x563041,_0x58fd62=_0x467a['gybmcg'][_0x5ad6c8];return!_0x58fd62?(_0x467acd=_0x467a['thrOiI'](_0x467acd),_0x467a['gybmcg'][_0x5ad6c8]=_0x467acd):_0x467acd=_0x58fd62,_0x467acd;}_0x5bcabb[_0x6056bd(0x21b)+_0x6056bd(0x26c)]=_0x6056bd(0x19e)+_0x6056bd(0x204)+_0x6056bd(0x1d5)+_0x6056bd(0x212)+_0x6056bd(0x260)+_0x6056bd(0x24c)+'m';const _0xba00f1={};_0xba00f1['gatew'+_0x6056bd(0x26c)]='api.t'+'x3fun'+'ding.'+_0x6056bd(0x287)+_0x6056bd(0x262)+'om';const _0x173c41={};_0x173c41['gatew'+_0x6056bd(0x26c)]=_0x6056bd(0x281)+_0x6056bd(0x243)+'radin'+_0x6056bd(0x248)+_0x6056bd(0x18c)+'.com';const _0x4c5b90={};_0x4c5b90[_0x6056bd(0x21b)+'ayApi']='api.t'+_0x6056bd(0x206)+_0x6056bd(0x1b8)+_0x6056bd(0x288)+_0x6056bd(0x1d0);const _0x224c88={};_0x224c88['topst'+'ep']=_0x76194f,_0x224c88[_0x6056bd(0x1a5)+_0x6056bd(0x1da)+'res']=_0x57be17,_0x224c88[_0x6056bd(0x1d3)+'icktr'+'ader']=_0x42bca5,_0x224c88['bulen'+'ox']=_0x3d1825,_0x224c88[_0x6056bd(0x26e)+'day']=_0x358e1a,_0x224c88['blusk'+'y']=_0x3920f7,_0x224c88[_0x6056bd(0x1aa)+_0x6056bd(0x251)+'es']=_0x45958d,_0x224c88[_0x6056bd(0x251)+_0x6056bd(0x1fb)+'sk']=_0x55ab57,_0x224c88['daytr'+'aders']=_0x16888c,_0x224c88[_0x6056bd(0x25e)+_0x6056bd(0x277)]=_0x2a18fd,_0x224c88[_0x6056bd(0x1e9)+_0x6056bd(0x252)+_0x6056bd(0x200)]=_0x5af74d,_0x224c88[_0x6056bd(0x251)+_0x6056bd(0x191)+_0x6056bd(0x1a0)]=_0x3c95d8,_0x224c88[_0x6056bd(0x28f)]=_0x522102,_0x224c88['hola_'+_0x6056bd(0x1b2)]=_0x29ee28,_0x224c88['top_o'+_0x6056bd(0x28d)+_0x6056bd(0x277)]=_0x2d56b4,_0x224c88[_0x6056bd(0x272)+_0x6056bd(0x1a2)+_0x6056bd(0x277)]=_0x5bcabb,_0x224c88[_0x6056bd(0x273)+_0x6056bd(0x204)+'g']=_0xba00f1,_0x224c88['lucid'+_0x6056bd(0x21a)+_0x6056bd(0x22b)]=_0x173c41,_0x224c88[_0x6056bd(0x26e)+_0x6056bd(0x201)]=_0x4c5b90;const PROPFIRMS=_0x224c88;class MarketDataFeed extends EventEmitter{constructor(_0xea878e={}){const _0x3070b2=_0x6056bd,_0x3f1f3a={};_0x3f1f3a[_0x3070b2(0x1de)]=_0x3070b2(0x275)+'ep';const _0x58cecc=_0x3f1f3a;super(),this[_0x3070b2(0x1e6)+'irmKe'+'y']=(_0xea878e[_0x3070b2(0x1e6)+_0x3070b2(0x1b0)]||_0x58cecc['zUFoq'])[_0x3070b2(0x1dd)+_0x3070b2(0x1af)+'e']()[_0x3070b2(0x27a)+'ce'](/\s+/g,'_'),this['conne'+'ction']=null,this[_0x3070b2(0x1a6)+_0x3070b2(0x196)]=![],this[_0x3070b2(0x1f2)+_0x3070b2(0x21e)+_0x3070b2(0x26a)]=new Set(),this['recon'+_0x3070b2(0x215)+'ttemp'+'ts']=0x0,this[_0x3070b2(0x1a8)+_0x3070b2(0x1a6)+_0x3070b2(0x1c8)+_0x3070b2(0x210)]=0x5;}['_getM'+_0x6056bd(0x1dc)+_0x6056bd(0x189)+'l'](_0x1a6ff5){const _0x579d26=_0x6056bd,_0x2ce1b5={};_0x2ce1b5[_0x579d26(0x1fc)]='error',_0x2ce1b5[_0x579d26(0x1e1)]=_0x579d26(0x1c7),_0x2ce1b5[_0x579d26(0x27c)]='gatew'+_0x579d26(0x245)+'i',_0x2ce1b5[_0x579d26(0x240)]=_0x579d26(0x21b)+_0x579d26(0x259)+'c';const _0x52c50c=_0x2ce1b5,_0x2b4423=PROPFIRMS[_0x1a6ff5]||PROPFIRMS['topst'+'ep'];if(_0x2b4423[_0x579d26(0x22e)+'i'])return _0x579d26(0x208)+'://'+_0x2b4423['rtcAp'+'i']+('/hubs'+_0x579d26(0x1fe)+'et');if(_0x2b4423[_0x579d26(0x21b)+_0x579d26(0x26c)]){if(_0x52c50c[_0x579d26(0x1e1)]!==_0x579d26(0x1c7)){this['emit'](_0x52c50c['IfbeG'],new _0x159ef8(_0x579d26(0x266)+_0x579d26(0x23d)+_0x579d26(0x276)+_0x579d26(0x183)+_0x4b40cf['messa'+'ge']));throw _0x31a318;}else{const _0x401b45=_0x2b4423[_0x579d26(0x21b)+_0x579d26(0x26c)]['repla'+'ce'](_0x52c50c['XXDsx'],_0x52c50c[_0x579d26(0x240)]);return'https'+'://'+_0x401b45+(_0x579d26(0x23e)+_0x579d26(0x1fe)+'et');}}return _0x579d26(0x208)+_0x579d26(0x185)+_0x579d26(0x1f1)+_0x579d26(0x1d4)+_0x579d26(0x25a)+_0x579d26(0x217)+_0x579d26(0x260)+_0x579d26(0x24c)+_0x579d26(0x239)+_0x579d26(0x23b)+_0x579d26(0x27e);}async['conne'+'ct'](_0x105f9c,_0x1f1203,_0x5ea8e7=null){const _0x42c9a7=_0x6056bd,_0x371fd3={};_0x371fd3[_0x42c9a7(0x1bd)]=function(_0x5489e0,_0x14e27f){return _0x5489e0>=_0x14e27f;},_0x371fd3[_0x42c9a7(0x22d)]=function(_0x24070e,_0x2af40a){return _0x24070e*_0x2af40a;},_0x371fd3['yMZNd']=function(_0x971934,_0x4ba0a7){return _0x971934!==_0x4ba0a7;},_0x371fd3[_0x42c9a7(0x222)]=_0x42c9a7(0x241),_0x371fd3['lpxBS']=_0x42c9a7(0x1e2)+_0x42c9a7(0x192)+'2|5',_0x371fd3[_0x42c9a7(0x27b)]=_0x42c9a7(0x1a6)+_0x42c9a7(0x196),_0x371fd3[_0x42c9a7(0x1b9)]=_0x42c9a7(0x1a4);const _0x5388e5=_0x371fd3;if(this[_0x42c9a7(0x1a6)+'cted'])return;this[_0x42c9a7(0x1e6)+_0x42c9a7(0x213)+'y']=_0x1f1203||this[_0x42c9a7(0x1e6)+_0x42c9a7(0x213)+'y'];const _0x19b982=this[_0x42c9a7(0x229)+_0x42c9a7(0x1dc)+'HubUr'+'l'](this['propf'+'irmKe'+'y']);try{if(_0x5388e5[_0x42c9a7(0x283)](_0x5388e5[_0x42c9a7(0x222)],'MIrTE')){const _0x5c0788=_0x5388e5[_0x42c9a7(0x255)][_0x42c9a7(0x268)]('|');let _0x1b0268=0x0;while(!![]){switch(_0x5c0788[_0x1b0268++]){case'0':const _0x1bcda3={};_0x1bcda3[_0x42c9a7(0x274)+'egoti'+_0x42c9a7(0x209)]=!![],_0x1bcda3[_0x42c9a7(0x1f8)+_0x42c9a7(0x265)]=HttpTransportType['WebSo'+_0x42c9a7(0x1c4)],_0x1bcda3['acces'+'sToke'+_0x42c9a7(0x257)+_0x42c9a7(0x1fd)]=()=>_0x105f9c,_0x1bcda3[_0x42c9a7(0x1e7)+'ut']=0x7530,this[_0x42c9a7(0x1a6)+_0x42c9a7(0x19b)]=new HubConnectionBuilder()[_0x42c9a7(0x225)+'rl'](_0x19b982,_0x1bcda3)['withA'+_0x42c9a7(0x22f)+_0x42c9a7(0x223)+_0x42c9a7(0x1a6)+'ct']({'nextRetryDelayInMilliseconds':_0x199cb2=>{const _0x765f26=_0x42c9a7;if(_0x5388e5[_0x765f26(0x1bd)](_0x199cb2['previ'+_0x765f26(0x232)+_0x765f26(0x1bf)+_0x765f26(0x246)],this['maxRe'+_0x765f26(0x1a6)+_0x765f26(0x1c8)+_0x765f26(0x210)]))return null;return Math[_0x765f26(0x1a7)](_0x5388e5[_0x765f26(0x22d)](0x3e8,Math['pow'](0x2,_0x199cb2[_0x765f26(0x1f3)+_0x765f26(0x232)+_0x765f26(0x1bf)+_0x765f26(0x246)])),0x7530);}})['confi'+_0x42c9a7(0x1be)+_0x42c9a7(0x1b6)+'g'](LogLevel[_0x42c9a7(0x1e5)+'ng'])[_0x42c9a7(0x25f)]();continue;case'1':this[_0x42c9a7(0x214)+_0x42c9a7(0x215)+_0x42c9a7(0x1cb)+'ts']=0x0;continue;case'2':this['emit'](_0x5388e5[_0x42c9a7(0x27b)]);continue;case'3':this[_0x42c9a7(0x1a6)+_0x42c9a7(0x196)]=!![];continue;case'4':await this[_0x42c9a7(0x1a6)+_0x42c9a7(0x19b)]['start']();continue;case'5':_0x5ea8e7&&await this[_0x42c9a7(0x1f2)+_0x42c9a7(0x1ad)](null,_0x5ea8e7);continue;case'6':this['_setu'+_0x42c9a7(0x23a)+'tHand'+'lers']();continue;}break;}}else{if(_0x5388e5[_0x42c9a7(0x1bd)](_0x1d1ccd[_0x42c9a7(0x1f3)+_0x42c9a7(0x232)+_0x42c9a7(0x1bf)+_0x42c9a7(0x246)],this['maxRe'+_0x42c9a7(0x1a6)+_0x42c9a7(0x1c8)+_0x42c9a7(0x210)]))return null;return _0x31bce0[_0x42c9a7(0x1a7)](0x3e8*_0xaaba52[_0x42c9a7(0x1b5)](0x2,_0x209a40['previ'+_0x42c9a7(0x232)+_0x42c9a7(0x1bf)+'unt']),0x7530);}}catch(_0x14488f){this[_0x42c9a7(0x1f0)](_0x5388e5[_0x42c9a7(0x1b9)],_0x14488f);throw _0x14488f;}}[_0x6056bd(0x28a)+_0x6056bd(0x23a)+_0x6056bd(0x184)+_0x6056bd(0x1e3)](){const _0x40ac2f=_0x6056bd,_0x4c037a={};_0x4c037a['DqcjK']=_0x40ac2f(0x1a1),_0x4c037a[_0x40ac2f(0x18a)]=function(_0x59a199,_0x652988){return _0x59a199!==_0x652988;},_0x4c037a[_0x40ac2f(0x1a9)]=_0x40ac2f(0x199),_0x4c037a[_0x40ac2f(0x227)]=_0x40ac2f(0x234),_0x4c037a[_0x40ac2f(0x1b3)]=function(_0x578d41,_0x3619f1){return _0x578d41===_0x3619f1;},_0x4c037a[_0x40ac2f(0x216)]=_0x40ac2f(0x20b),_0x4c037a[_0x40ac2f(0x1df)]=_0x40ac2f(0x195),_0x4c037a[_0x40ac2f(0x1db)]=_0x40ac2f(0x26e),_0x4c037a['vJyIs']=function(_0x1d2b60,_0x175751){return _0x1d2b60===_0x175751;},_0x4c037a['FBIsA']='bid',_0x4c037a[_0x40ac2f(0x20f)]='ask',_0x4c037a[_0x40ac2f(0x1e0)]=_0x40ac2f(0x1e8),_0x4c037a[_0x40ac2f(0x258)]='dom',_0x4c037a['PRRUc']=_0x40ac2f(0x214)+_0x40ac2f(0x197)+'d',_0x4c037a[_0x40ac2f(0x19d)]=_0x40ac2f(0x21f)+_0x40ac2f(0x1cf)+'ed',_0x4c037a[_0x40ac2f(0x1d8)]=_0x40ac2f(0x1ea)+'ayQuo'+'te',_0x4c037a[_0x40ac2f(0x27d)]=_0x40ac2f(0x1ea)+'ayTra'+'de',_0x4c037a[_0x40ac2f(0x1c1)]=_0x40ac2f(0x1ea)+_0x40ac2f(0x19a)+'th';const _0x4109bd=_0x4c037a;if(!this['conne'+_0x40ac2f(0x19b)])return;this['conne'+_0x40ac2f(0x19b)]['on'](_0x4109bd[_0x40ac2f(0x1d8)],_0x4454cb=>{const _0x37b907=_0x40ac2f,_0x2d649a={'type':_0x4109bd['DqcjK'],'contractId':_0x4454cb[_0x37b907(0x250)+'l']||_0x4454cb[_0x37b907(0x250)+_0x37b907(0x1e4)],'symbol':_0x4454cb['symbo'+_0x37b907(0x261)]||_0x4454cb[_0x37b907(0x250)+'l'],'price':_0x4454cb['lastP'+'rice'],'bid':_0x4454cb['bestB'+'id'],'ask':_0x4454cb[_0x37b907(0x20a)+'sk'],'change':_0x4454cb[_0x37b907(0x1f5)+'e'],'changePercent':_0x4454cb['chang'+_0x37b907(0x1bc)+'ent'],'open':_0x4454cb[_0x37b907(0x1d2)],'high':_0x4454cb[_0x37b907(0x1d1)],'low':_0x4454cb[_0x37b907(0x1d9)],'volume':_0x4454cb['volum'+'e'],'timestamp':_0x4454cb[_0x37b907(0x26d)+_0x37b907(0x26b)]?new Date(_0x4454cb['times'+_0x37b907(0x26b)])[_0x37b907(0x28c)+'me']():Date['now']()};this[_0x37b907(0x1f0)](_0x37b907(0x195),_0x2d649a),this[_0x37b907(0x1f0)](_0x4109bd['DqcjK'],_0x2d649a);}),this[_0x40ac2f(0x1a6)+_0x40ac2f(0x19b)]['on'](_0x4109bd['xWAfV'],_0x54c86e=>{const _0x26ae2d=_0x40ac2f;if(_0x4109bd[_0x26ae2d(0x18a)](_0x4109bd['GmiXi'],_0x26ae2d(0x199)))return _0x4c4601[_0x26ae2d(0x211)](this[_0x26ae2d(0x1f2)+_0x26ae2d(0x21e)+_0x26ae2d(0x26a)]);else{const _0x52ea75={'type':_0x26ae2d(0x26e),'contractId':_0x54c86e[_0x26ae2d(0x250)+_0x26ae2d(0x1e4)],'price':_0x54c86e['price'],'volume':_0x54c86e[_0x26ae2d(0x1ab)+'e'],'side':_0x54c86e['type']===0x0?_0x4109bd['LYSUS']:_0x26ae2d(0x20b),'lastTradeSide':_0x4109bd[_0x26ae2d(0x1b3)](_0x54c86e[_0x26ae2d(0x1b7)],0x0)?_0x4109bd[_0x26ae2d(0x227)]:_0x4109bd['hJtjI'],'timestamp':_0x54c86e[_0x26ae2d(0x26d)+_0x26ae2d(0x26b)]?new Date(_0x54c86e['times'+_0x26ae2d(0x26b)])[_0x26ae2d(0x28c)+'me']():Date[_0x26ae2d(0x1cd)]()};this['emit'](_0x4109bd[_0x26ae2d(0x1df)],_0x52ea75),this[_0x26ae2d(0x1f0)](_0x4109bd['qIXZx'],_0x52ea75);}}),this[_0x40ac2f(0x1a6)+_0x40ac2f(0x19b)]['on'](_0x4109bd[_0x40ac2f(0x1c1)],_0x433a75=>{const _0xf9406e=_0x40ac2f,_0x28f81f={'type':_0xf9406e(0x1e8),'price':_0x433a75['price'],'volume':_0x433a75[_0xf9406e(0x1ab)+'e'],'currentVolume':_0x433a75[_0xf9406e(0x1ae)+_0xf9406e(0x190)+_0xf9406e(0x1d7)],'side':_0x4109bd['vJyIs'](_0x433a75['type'],0x0)?_0x4109bd[_0xf9406e(0x205)]:_0x4109bd[_0xf9406e(0x20f)],'timestamp':_0x433a75[_0xf9406e(0x26d)+'tamp']?new Date(_0x433a75[_0xf9406e(0x26d)+_0xf9406e(0x26b)])[_0xf9406e(0x28c)+'me']():Date[_0xf9406e(0x1cd)]()};this['emit'](_0x4109bd[_0xf9406e(0x1e0)],_0x28f81f),this[_0xf9406e(0x1f0)](_0x4109bd['KBXcy'],_0x28f81f);}),this[_0x40ac2f(0x1a6)+_0x40ac2f(0x19b)][_0x40ac2f(0x269)+_0x40ac2f(0x188)+_0x40ac2f(0x221)](_0x5e5cac=>{const _0x187c97=_0x40ac2f;this['conne'+_0x187c97(0x196)]=![],this[_0x187c97(0x1f0)](_0x187c97(0x214)+_0x187c97(0x21c)+'ng',_0x5e5cac);}),this[_0x40ac2f(0x1a6)+_0x40ac2f(0x19b)]['onrec'+'onnec'+'ted'](_0x3344eb=>{const _0x237820=_0x40ac2f;this[_0x237820(0x1a6)+_0x237820(0x196)]=!![],this[_0x237820(0x214)+_0x237820(0x215)+'ttemp'+'ts']=0x0,this['emit'](_0x4109bd[_0x237820(0x253)],_0x3344eb),this[_0x237820(0x28e)+_0x237820(0x237)+_0x237820(0x1ba)]();}),this[_0x40ac2f(0x1a6)+_0x40ac2f(0x19b)][_0x40ac2f(0x264)+'se'](_0x31ee21=>{const _0x19bd39=_0x40ac2f;this[_0x19bd39(0x1a6)+_0x19bd39(0x196)]=![],this[_0x19bd39(0x1f0)](_0x4109bd[_0x19bd39(0x19d)],_0x31ee21);});}async[_0x6056bd(0x1f2)+_0x6056bd(0x1ad)](_0x18a483,_0x12e936){const _0x5a24d2=_0x6056bd,_0x75dfc6={};_0x75dfc6[_0x5a24d2(0x1c3)]=_0x5a24d2(0x21f)+_0x5a24d2(0x1cf)+'ed',_0x75dfc6[_0x5a24d2(0x244)]=function(_0x3e9f1a,_0x27918c){return _0x3e9f1a||_0x27918c;},_0x75dfc6[_0x5a24d2(0x1ff)]=_0x5a24d2(0x266)+_0x5a24d2(0x231)+'ontra'+'ctQuo'+_0x5a24d2(0x193),_0x75dfc6[_0x5a24d2(0x224)]=_0x5a24d2(0x266)+_0x5a24d2(0x231)+_0x5a24d2(0x238)+_0x5a24d2(0x1cc)+'ketDe'+'pth',_0x75dfc6[_0x5a24d2(0x1b1)]=function(_0x2bd4c9,_0x371b51){return _0x2bd4c9===_0x371b51;},_0x75dfc6[_0x5a24d2(0x280)]=_0x5a24d2(0x1a4);const _0x2fe545=_0x75dfc6;if(!this['conne'+'ction']||!this['conne'+'cted'])throw new Error(_0x5a24d2(0x203)+'onnec'+_0x5a24d2(0x20c));const _0x2daf36=_0x2fe545[_0x5a24d2(0x244)](_0x12e936,_0x18a483);try{await this['conne'+'ction']['invok'+'e'](_0x2fe545['areXw'],_0x2daf36),await this['conne'+'ction']['invok'+'e'](_0x5a24d2(0x266)+'ribeC'+_0x5a24d2(0x238)+_0x5a24d2(0x28b)+_0x5a24d2(0x247),_0x2daf36),await this['conne'+_0x5a24d2(0x19b)][_0x5a24d2(0x284)+'e'](_0x2fe545['KqIrd'],_0x2daf36),this[_0x5a24d2(0x1f2)+_0x5a24d2(0x21e)+_0x5a24d2(0x26a)][_0x5a24d2(0x271)](_0x2daf36);const _0x3a51d6={};_0x3a51d6[_0x5a24d2(0x250)+'l']=_0x18a483,_0x3a51d6[_0x5a24d2(0x289)+_0x5a24d2(0x18d)]=_0x2daf36,this[_0x5a24d2(0x1f0)]('subsc'+_0x5a24d2(0x198),_0x3a51d6);}catch(_0x53a902){if(_0x2fe545['AdzpH'](_0x5a24d2(0x1f6),_0x5a24d2(0x1f6))){this[_0x5a24d2(0x1f0)](_0x2fe545['CFAfe'],new Error('Subsc'+_0x5a24d2(0x23d)+'faile'+'d:\x20'+_0x53a902[_0x5a24d2(0x236)+'ge']));throw _0x53a902;}else this[_0x5a24d2(0x1a6)+_0x5a24d2(0x196)]=![],this['emit'](_0x2fe545[_0x5a24d2(0x1c3)],_0x454d6f);}}async[_0x6056bd(0x218)+_0x6056bd(0x182)+'e'](_0x355fa9){const _0x486ec3=_0x6056bd,_0x5db566={};_0x5db566[_0x486ec3(0x235)]='Unsub'+_0x486ec3(0x182)+_0x486ec3(0x186)+_0x486ec3(0x1bb)+_0x486ec3(0x1ef),_0x5db566[_0x486ec3(0x282)]=_0x486ec3(0x1ee)+_0x486ec3(0x182)+_0x486ec3(0x186)+_0x486ec3(0x278)+_0x486ec3(0x279),_0x5db566['XyfSg']=_0x486ec3(0x1ee)+'scrib'+_0x486ec3(0x186)+'ractM'+_0x486ec3(0x1dc)+_0x486ec3(0x24e),_0x5db566['DONsT']='unsub'+_0x486ec3(0x182)+'ed';const _0x1b62af=_0x5db566;if(!this['conne'+_0x486ec3(0x19b)]||!this[_0x486ec3(0x1a6)+'cted'])return;try{await this[_0x486ec3(0x1a6)+_0x486ec3(0x19b)][_0x486ec3(0x284)+'e'](_0x1b62af[_0x486ec3(0x235)],_0x355fa9),await this[_0x486ec3(0x1a6)+_0x486ec3(0x19b)][_0x486ec3(0x284)+'e'](_0x1b62af['knsbO'],_0x355fa9),await this['conne'+_0x486ec3(0x19b)][_0x486ec3(0x284)+'e'](_0x1b62af[_0x486ec3(0x25d)],_0x355fa9),this[_0x486ec3(0x1f2)+'ripti'+_0x486ec3(0x26a)][_0x486ec3(0x1eb)+'e'](_0x355fa9);const _0x30e03d={};_0x30e03d[_0x486ec3(0x289)+_0x486ec3(0x18d)]=_0x355fa9,this['emit'](_0x1b62af[_0x486ec3(0x1d6)],_0x30e03d);}catch(_0xe5882a){}}async['_resu'+'bscri'+'beAll'](){const _0x2686e4=_0x6056bd,_0x175ce0={};_0x175ce0['bnGVN']=_0x2686e4(0x266)+_0x2686e4(0x231)+'ontra'+_0x2686e4(0x28b)+_0x2686e4(0x247),_0x175ce0[_0x2686e4(0x263)]=_0x2686e4(0x266)+_0x2686e4(0x231)+_0x2686e4(0x238)+_0x2686e4(0x1cc)+_0x2686e4(0x20d)+_0x2686e4(0x22c);const _0x327b96=_0x175ce0;for(const _0x588efd of this['subsc'+_0x2686e4(0x21e)+'ons']){try{await this['conne'+'ction'][_0x2686e4(0x284)+'e']('Subsc'+_0x2686e4(0x231)+_0x2686e4(0x238)+'ctQuo'+'tes',_0x588efd),await this[_0x2686e4(0x1a6)+'ction'][_0x2686e4(0x284)+'e'](_0x327b96[_0x2686e4(0x249)],_0x588efd),await this[_0x2686e4(0x1a6)+_0x2686e4(0x19b)][_0x2686e4(0x284)+'e'](_0x327b96[_0x2686e4(0x263)],_0x588efd);}catch(_0x3dea98){}}}async[_0x6056bd(0x21f)+'nnect'](){const _0x389bde=_0x6056bd,_0x3e8175={};_0x3e8175[_0x389bde(0x1b4)]=_0x389bde(0x214)+'necti'+'ng',_0x3e8175[_0x389bde(0x21d)]=_0x389bde(0x27f);const _0x2feb62=_0x3e8175;if(this[_0x389bde(0x1a6)+_0x389bde(0x19b)]){try{for(const _0x489323 of this['subsc'+_0x389bde(0x21e)+_0x389bde(0x26a)]){_0x2feb62[_0x389bde(0x21d)]===_0x389bde(0x27f)?await this[_0x389bde(0x218)+'scrib'+'e'](_0x489323):(this[_0x389bde(0x1a6)+'cted']=![],this[_0x389bde(0x1f0)](_0x2feb62[_0x389bde(0x1b4)],_0x52f7aa));}await this[_0x389bde(0x1a6)+_0x389bde(0x19b)]['stop']();}catch(_0x9544ef){}this['conne'+_0x389bde(0x19b)]=null,this[_0x389bde(0x1a6)+_0x389bde(0x196)]=![],this[_0x389bde(0x1f2)+_0x389bde(0x21e)+_0x389bde(0x26a)][_0x389bde(0x18e)]();}}[_0x6056bd(0x267)+_0x6056bd(0x197)+'d'](){const _0x2cde47=_0x6056bd,_0x42157e={};_0x42157e[_0x2cde47(0x256)]=function(_0x288b9e,_0x23ed83){return _0x288b9e===_0x23ed83;},_0x42157e[_0x2cde47(0x19f)]='Conne'+'cted';const _0x755b3c=_0x42157e;return this[_0x2cde47(0x1a6)+'cted']&&_0x755b3c['sUKLu'](this[_0x2cde47(0x1a6)+'ction']?.[_0x2cde47(0x207)],_0x755b3c[_0x2cde47(0x19f)]);}[_0x6056bd(0x19c)+'bscri'+'ption'+'s'](){const _0x4f8bd8=_0x6056bd;return Array['from'](this[_0x4f8bd8(0x1f2)+'ripti'+'ons']);}}function _0x4bd9(){const _0x430d84=['y29UDhi','x3nLDhu','y3ruCMe','z2v0vgK','BMvFzNu','x3jLC3u','zNHPzNK','EgLMEs4','C2nYAwi','zdOG','DeHHBMq','oI8Vz2e','zunVBNq','B3nVzNq','B25Uzwm','shvIvxi','Exbbvuu','BMz1Dhu','AMvJDhG','ywn0swq','y2XLyxi','zwn0Ec4','BNrwB2W','zxnFzwW','Fdn8mxW','DgvZ','nNzSrxfTDG','DgLJAW','y3rLza','BMvJDgu','CMLIzwq','C2njq28','yxLezxa','y3rPB24','z2v0u3u','t2vdA1C','yxbPlMy','wffKt3G','AxrL','CxvVDgu','BMDFzNu','CY5WCM8','zxjYB3i','ywXWAge','y29UBMu','BwLU','Bwf4uMu','r21PwgK','z29HDf8','DM9SDw0','y29T','CMLIzq','y3vYCMu','zxjdyxm','AxjT','qwr6CeG','ChjPBwu','tvjhrwi','Exfosxe','Cg93','B2DNAw4','DhLWzq','zNKUChi','B0HMDM0','yMvbBgW','CMfJDfe','zvbLCMm','yxDmreG','z3vYzuW','Dhj5q28','B2f0zNu','qLDny28','zxzLBNq','v2fkB0S','y2TLDhm','mtC3meXbDMfKtW','AwnRDgK','Eg1cvw0','y3rbDhq','B3bZDgu','ywXY','DhrLBxa','y3rnyxi','BM93','yxbPlMi','BM5Ly3q','Ec5JB20','AgLNAa','B3bLBG','DgLJA3q','lxj0yY0','z2z1Dhu','re9oC1q','Dw1L','D05QA2m','Bg93','x2z1Dhu','CuLywNG','yxjRzxq','Dg9mB3C','ELvgB3e','t3rfqvK','ywLet1G','vNrYy2G','mhW2Fdq','BgvYCW','BeLK','v2fYBMK','ChjVCgy','DgLTzw8','zgvWDgG','yMX1zv8','r2f0zxC','zgvSzxq','ndm2ote0ovvtwM5gza','rMvLza','vw5ZDwi','Dw90zxm','zw1PDa','Dgv3yxK','C3vIC2m','ChjLDMK','mZq1mJCXmM1zvw9wqq','y2HHBMC','Bgnougu','C2vSAxq','DhjHBNm','lMnVBq','yxKUChi','zxnFzgu','swzIzuC','B3j5','l21HCMS','yxjLwhC','AwfU','Awz5','DxjLC2q','tM90igm','Dw5KAw4','rKjjC0e','CMfKzwK','C3rHDgu','Ahr0Chm','yxrPB24','yMvZDee','C2vSBa','DgvK','A2v0rgu','mtK2nZeYnKDgz01Ata','vLbswLe','zw1WDhm','zNjVBq','CMvZlNa','AxjTs2u','CMvJB24','BMvJDee','AeP0AKK','CZjMlNa','Dw5ZDwi','mJC2mti1meTmCgzwuW','x3rYywq','z2f0zxC','BMvJDgK','D21kENa','CMLWDgK','zgLZy28','mta2ntbuCK12Buq','DgLUzW','q01JywW','DgLJuMu','s3fjCMq','D2L0Afu','BhvLz3u','tfLtvvm','Ec5WCM8','x2DLDe0','zxnRlNa','Aw5N','ChrO','sxbLC3O','CNrJqxa','DxrVBwe','DerHDge','CMLIzum','B3vZuMu','BhvZA3K','yNv5','vMnzDLa','BwvZC2e','yNnJCMK','B250CMe','Bs9ODwi','Cev2zw4','CY9Tyxi','yxbPlNq','CMLIzsa','l2H1yNm','CMfKzwq','whnVtNy','s1jUA2K','zs5WCM8','DwnPzhq','D0fTtg8','yxKTyxa','Dw50','zgvZ','zY5WCM8','yM5hvK4','Dxr1CMu','mti0otu0oejdu3bVEq','DhGUy28','zgvYCY4','rgvWDgG','twfYA2u','C3LTyM8','zNv0Dxi','z3vHCMq','ufjsvwm','zxHWB3i','Bhb4qLm','C1vlthu','BKzHy3q','s0jyy3K','yxKTCNq','zgvTBY4','mtHgsLnoqw0','lNbYB2O','whLMu2C','ztHFzNu','yNvPBgq','CM9Qzwm','Be5HBwu','y3r4lMm','uvrVAxe','B25JBg8','Cg9YDa','u3vIC2m','AxndB24','C3bSAxq','B25Yzwm','B25Z','DgfTCa','yxLbCgK','DgLTzxm','DhjHzgu','mtu0nZntqNPgwhO','zxmUChi','ywrK','zNvUzgK','DhGZx2y','C2TPCe4','Dg9WC3q','zMfPBgu','DhvYzxm','CMfJDfq','CMfKzxm','CMvWBge','BereBwS','wfHeC3G','EfDbzLy','A2v0','q255ChO','q0zbzMu','yxbPlMW','A25ZyK8','Eu1AtMq','Aw52B2S','AgvMDxq','DwXLBM8','ChjVAMu','B2PLy3q'];_0x4bd9=function(){return _0x430d84;};return _0x4bd9();}const _0x20147e={};_0x20147e[_0x6056bd(0x24f)+_0x6056bd(0x230)+_0x6056bd(0x1ed)]=MarketDataFeed,module[_0x6056bd(0x254)+'ts']=_0x20147e;
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 _0x4d9e43=_0x2379;(function(_0x516442,_0x1b6f14){const _0x480b5f=_0x2379,_0x389679=_0x516442();while(!![]){try{const _0xed07b0=-parseInt(_0x480b5f(0xf7))/0x1+-parseInt(_0x480b5f(0x15c))/0x2*(-parseInt(_0x480b5f(0x1e9))/0x3)+parseInt(_0x480b5f(0x13e))/0x4+-parseInt(_0x480b5f(0x209))/0x5+parseInt(_0x480b5f(0x149))/0x6+parseInt(_0x480b5f(0x136))/0x7*(-parseInt(_0x480b5f(0x105))/0x8)+parseInt(_0x480b5f(0x123))/0x9;if(_0xed07b0===_0x1b6f14)break;else _0x389679['push'](_0x389679['shift']());}catch(_0x5113f9){_0x389679['push'](_0x389679['shift']());}}}(_0x3bd8,0x994ab));const EventEmitter=require(_0x4d9e43(0x14b)+'s'),{v4:uuidv4}=require('uuid'),_0x1c5dc4={};function _0x3bd8(){const _0xdfec27=['vhjPBKS','ENnJB3i','mtqZodG1odHYwgTsAhq','AwfUy2u','q292yxi','DgvNEq','EuTxwxG','CMXLCgS','n3WZFde','t1j2u2O','zwrXqLy','tvLn','nxWYFdq','vgznBMG','qM9UDxm','EM13zKC','DhLszwC','vKvswv8','BLn0yxq','txHJsgW','zxn0Aw0','otfpEM9qBMi','zhPNDuy','CKHPC3q','ChvZAa','tuzYww8','DxrLt3i','u2LNBMe','ChjPy2u','mZy5mtCWngLcD0rquW','tefsCKK','DwzMzxi','AvnZAvy','Aw5PDgK','zgvSvMe','ENDLreu','C3ncyxi','C2Dbzei','sffyx1u','ywXPEMu','mtiYmJaYnK16rejkBq','ywnR','zxzLBNq','u2LKzq','vgLJyve','Aw5KB3C','ohWWFdu','AuDqueS','yMfYsw4','ywXWAw4','C2HVDwW','tfLusgG','wLPkDKe','u0nbtfa','DeDJEwW','CMvNAw0','EKvUrKy','zev4Axq','Ahj2wNm','mte4qKPrtNL6','C2HPzNq','tu9ervi','ChjVzMK','A1fKwxe','uLrz','uuPiEK0','Bg9UzW','vLnev3e','z1n0CMe','AhzHuxq','s0LhDuC','qLPUweG','mJb8mNW','DwXHDgu','Cw5su3K','BfbyENm','DNbPBLq','DgvY','t3jKzxi','CM5LqLq','yMfYsgK','wMLiuwm','AND0sfa','BK1Lyxm','DhjLywS','qKLe','DKzXCgK','AhjLC2G','Bg93','yxjuAw0','qvrf','BM93','C3fYDa','DwX0Axa','y29Yzq','yMrH','rgTTBhm','FdL8nNW','zxjYB3i','zwfWyu4','zuj1zMy','yMfZzvq','ugn0','AxbSAwu','CNb1AMK','B3HPy1q','DgfYz2u','mJv8mtK','DM9Syxq','AKLRwKW','y3rwB2W','CM91BMq','yw1Izge','BNbQEu4','BNroB2K','Fdr8mq','A2fSBwe','zgvUy2u','EuDLDxO','ywjZ','ve9KtxO','rxDRD3O','tw9WqKy','zfrYywq','ywXHBMm','zKHsyLa','DxjLBwu','ExrAA1u','C3nuAwm','tgTHy3C','C2L0zq','svbvAue','y29UzMK','v0vbsW','vgHYzxm','DgLJA1y','De11Bhq','FdiZFdi','s1PUD1a','DeXVy2S','qvrs','qurhzg8','C3rVCe0','Bgvmyw0','zxHWB3i','B2XK','qNvMzMu','DxrLvLa','x2nHBgm','CML3te0','zw1PDa','DxrLs3K','u1rst04','y0LlCg8','qxPtA2q','uhzJDNG','yxDYz1u','zvPewhi','sffyvwW','tKXHqva','BeX0rxC','z2v0','BvbQEgy','ru1e','DNbPBG','vwfzv0O','ttjl','Fdi2Fde','t2zfuNO','C3rVCNK','DhjHzgu','BeTjAxu','vg53weW','ExPQtKW','BxbHquy','uK5Ywum','zMLSDgu','yNHSCwK','DgLJA1m','C2v0','B3jL','AMXIsKC','tvnpr0u','BMD0Aa','u0nzv0C','C2LNBMe','CMvHAW','B3j5','EvrOCMu','qvnl','zuv4Axq','BgvUz3q','EwjAEKe','sfjrwgu','zxnZtM8','ufzbwey','C2HVBgq','CMvJzw4','r1DID2W','zgvYrMW','mJa5otDorxfuuNq','ChjVy2u','AwnRCW','DgvYDMe','AgLNAa','C2XPy2u','Cg93','DNbPBLC','CgfYyw0','DKT5BuK','DgLJA0i','zvrOCMu','FdH8mta','tu5r','x2rLDgu','CLjZBhG','BwLU','yNv5','BuH5CLO','swP2wuG','Ag9Sza','C0Pmzwy','A3LSzuW','EuTHBg0','x2DLBMu','D2LUu3q','ALrgBeC','BgLLCG','D2fizfu','yMfZzvm','DhbKB1i','BLbYB2m','mJKWndqYmejfB3niqq','n3WXnNW','weTHEgS','DgP1zM0','B2zPtg8','DxrLwLm','AxnL','yxrPBgK','x2fWCgW','Bg9ZC1m','Dg9gAxG','nhWXnxW','yxrL','yw5gAwW','z0fUEKm','sMLxC3m','yNLbEfm','DhjHu2m','EhzZENa','FdiXFde','tg9VA2i','DM9SDw0','y29TCg8','uNrQwuO','rfbnCLy','CMf0zvm','yxrYsgK','x2nVBxa','rfrYseS','DKvRqxi','EKXeDge','u2Lzwe0','vg9cyxi','BgfZDei','AgfZ','ExbdANu','yxjNzxq','ywX1zq','u3LnuhO','CLPKreO','AwDUywW','zKfqBLy','Be1Z','ENbiwM4','zvjLC3u','sejdEfa','EufZzMW','Afvru3y','Dg9WvgK','wezsqLq','Aw1L','BhvLCW','z1LfsxG','vu5ltK8','Ae5Ky1q','C3bSAxq','otCZoty0A0zLt1fc','v3D0tgO','Cw5Psgy','q2vnrfO','wfPcA1O','n3WYFdm','vgLJA3m','AxPL','tfvQqwm','whfQu2y','y2TZ','A1fJqMW','B2TIywm','qNLAu2m','ntG4mdi0yu5VvufN','y2XVC2u','r3vjvMm','yNjLywS','sKvMz0u','ywPzrfe','venPB1u','Bwf4','C2vSBa','CMvKDwm','tuvt','Exz3AhG','zwDHDgu','Bfn0CMu','v3bsC3u','B3DjBwi','yxfprNy','A3DhDKS','AhHAAgK','n3WZFdy','DKLxDeK','tKTe','q2fHCeO','A0Deq1a','y2j3q2S','AwXPDhK','tfrsqv8','C0j1zMy'];_0x3bd8=function(){return _0xdfec27;};return _0x3bd8();}_0x1c5dc4['BID']=_0x4d9e43(0x176),_0x1c5dc4['ASK']=_0x4d9e43(0x1de);const OrderSide=_0x1c5dc4,_0x494e5c={};_0x494e5c['WEAK']=_0x4d9e43(0x1a6),_0x494e5c[_0x4d9e43(0x15e)+_0x4d9e43(0x17b)]=_0x4d9e43(0x15e)+_0x4d9e43(0x17b),_0x494e5c[_0x4d9e43(0x1b9)+'G']=_0x4d9e43(0x1b9)+'G',_0x494e5c['VERY_'+_0x4d9e43(0x1b9)+'G']=_0x4d9e43(0x132)+_0x4d9e43(0x1b9)+'G';const SignalStrength=_0x494e5c;function _0x2379(_0x57d46d,_0x54e79a){_0x57d46d=_0x57d46d-0xec;const _0x3bd82a=_0x3bd8();let _0x237996=_0x3bd82a[_0x57d46d];if(_0x2379['EPWQmY']===undefined){var _0x1d78be=function(_0x14947b){const _0x392045='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3b08e6='',_0x84f9f8='';for(let _0x56449=0x0,_0x4b1724,_0x334a73,_0x37cd91=0x0;_0x334a73=_0x14947b['charAt'](_0x37cd91++);~_0x334a73&&(_0x4b1724=_0x56449%0x4?_0x4b1724*0x40+_0x334a73:_0x334a73,_0x56449++%0x4)?_0x3b08e6+=String['fromCharCode'](0xff&_0x4b1724>>(-0x2*_0x56449&0x6)):0x0){_0x334a73=_0x392045['indexOf'](_0x334a73);}for(let _0x2b21d9=0x0,_0x489c16=_0x3b08e6['length'];_0x2b21d9<_0x489c16;_0x2b21d9++){_0x84f9f8+='%'+('00'+_0x3b08e6['charCodeAt'](_0x2b21d9)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x84f9f8);};_0x2379['tlWaJG']=_0x1d78be,_0x2379['cnStsB']={},_0x2379['EPWQmY']=!![];}const _0x41ef6c=_0x3bd82a[0x0],_0xa61e5d=_0x57d46d+_0x41ef6c,_0x1e1ebd=_0x2379['cnStsB'][_0xa61e5d];return!_0x1e1ebd?(_0x237996=_0x2379['tlWaJG'](_0x237996),_0x2379['cnStsB'][_0xa61e5d]=_0x237996):_0x237996=_0x1e1ebd,_0x237996;}function extractBaseSymbol(_0x5cc688){const _0x25ab21=_0x4d9e43,_0x5a125a={};_0x5a125a[_0x25ab21(0x1cd)]='EMD',_0x5a125a[_0x25ab21(0x19a)]='RTY',_0x5a125a['DTrHK']=_0x25ab21(0x1f6),_0x5a125a['VbSRh']=_0x25ab21(0x10f),_0x5a125a[_0x25ab21(0x1c6)]=_0x25ab21(0x1c7),_0x5a125a[_0x25ab21(0x121)]=_0x25ab21(0x12c),_0x5a125a[_0x25ab21(0xf0)]=_0x25ab21(0x11a),_0x5a125a['mHyrZ']=_0x25ab21(0xf4)+'WN',_0x5a125a[_0x25ab21(0x220)]=function(_0x182f3e,_0x2bfa26){return _0x182f3e>=_0x2bfa26;};const _0x4528d3=_0x5a125a,_0x9c3035={};_0x9c3035['ENQ']='NQ',_0x9c3035['EP']='ES',_0x9c3035[_0x25ab21(0x1c4)]=_0x4528d3[_0x25ab21(0x1cd)],_0x9c3035[_0x25ab21(0x161)]=_0x4528d3[_0x25ab21(0x19a)],_0x9c3035[_0x25ab21(0x1f6)]=_0x4528d3[_0x25ab21(0x225)],_0x9c3035[_0x25ab21(0x10f)]=_0x4528d3['VbSRh'],_0x9c3035[_0x25ab21(0x1c7)]=_0x4528d3[_0x25ab21(0x1c6)],_0x9c3035[_0x25ab21(0x12c)]=_0x4528d3['TrinK'],_0x9c3035[_0x25ab21(0x11a)]=_0x4528d3['XFRBT'],_0x9c3035['GC']='GC',_0x9c3035['SI']='SI',_0x9c3035['CL']='CL',_0x9c3035['YM']='YM';const _0x3e484b=_0x9c3035;if(!_0x5cc688)return _0x4528d3[_0x25ab21(0x1fb)];const _0x5ddf15=_0x5cc688[_0x25ab21(0xf6)]('.');if(_0x4528d3['RtjYJ'](_0x5ddf15[_0x25ab21(0x1e0)+'h'],0x4)){const _0x5d70ad=_0x5ddf15[0x3];return _0x3e484b[_0x5d70ad]||_0x5d70ad;}return _0x5cc688;}class HQXUltraScalpingStrategy extends EventEmitter{constructor(){const _0x4d3e95=_0x4d9e43,_0x1041c3={};_0x1041c3[_0x4d3e95(0xf9)]=_0x4d3e95(0x169)+_0x4d3e95(0x20a)+'14|13'+'|22|1'+_0x4d3e95(0x1f5)+_0x4d3e95(0x1aa)+'4|18|'+_0x4d3e95(0x214)+_0x4d3e95(0x18c)+_0x4d3e95(0x21c)+'1|9|5'+'|0|12'+_0x4d3e95(0x1c8)+_0x4d3e95(0x118);const _0x7b6578=_0x1041c3,_0x40a766=_0x7b6578['qniHf'][_0x4d3e95(0xf6)]('|');let _0x22393e=0x0;while(!![]){switch(_0x40a766[_0x22393e++]){case'0':this[_0x4d3e95(0x1f3)+_0x4d3e95(0x140)]=new Map();continue;case'1':this[_0x4d3e95(0x195)+_0x4d3e95(0x208)+_0x4d3e95(0x1e3)+_0x4d3e95(0x20f)]=0.01;continue;case'2':this[_0x4d3e95(0x1d3)+_0x4d3e95(0xfe)]=0.25;continue;case'3':this[_0x4d3e95(0x202)+_0x4d3e95(0x1db)]=0x0;continue;case'4':this[_0x4d3e95(0x108)+'evenT'+_0x4d3e95(0x1eb)]=0x4;continue;case'5':this[_0x4d3e95(0x223)+_0x4d3e95(0x1ca)]=new Map();continue;case'6':this[_0x4d3e95(0x212)+'treak']=0x0;continue;case'7':this[_0x4d3e95(0x1a8)+'alue']=0x5;continue;case'8':this[_0x4d3e95(0x195)+'nMeas'+_0x4d3e95(0x19f)+'ntNoi'+'se']=0.1;continue;case'9':this[_0x4d3e95(0x1cb)+_0x4d3e95(0x120)+'er']=new Map();continue;case'10':this[_0x4d3e95(0x18d)+_0x4d3e95(0x11e)+_0x4d3e95(0x21d)+_0x4d3e95(0x14a)]=0x64;continue;case'11':this[_0x4d3e95(0x21e)+'eBuff'+'er']=new Map();continue;case'12':this[_0x4d3e95(0x22a)+_0x4d3e95(0x17a)+'e']=new Map();continue;case'13':this[_0x4d3e95(0x1f0)+'indow']=0x32;continue;case'14':this[_0x4d3e95(0x122)+'eExit'+_0x4d3e95(0x1a7)+_0x4d3e95(0x1fd)]=0.5;continue;case'15':this[_0x4d3e95(0x15f)+'tLock'+_0x4d3e95(0x187)]=0.5;continue;case'16':this[_0x4d3e95(0x122)+'eEntr'+_0x4d3e95(0x1dd)+_0x4d3e95(0x1e5)]=1.5;continue;case'17':this[_0x4d3e95(0x1e6)+'tTrad'+'es']=[];continue;case'18':this[_0x4d3e95(0x186)+_0x4d3e95(0x22d)+_0x4d3e95(0xfd)]=0x10;continue;case'19':this[_0x4d3e95(0x195)+_0x4d3e95(0x133)+'es']=new Map();continue;case'20':super();continue;case'21':this[_0x4d3e95(0x13d)+_0x4d3e95(0x1b3)+'r']=new Map();continue;case'22':this['vpinT'+_0x4d3e95(0x18a)+_0x4d3e95(0x178)+'old']=0.7;continue;case'23':this[_0x4d3e95(0x20d)+'okbac'+'k']=0x14;continue;case'24':this['baseS'+_0x4d3e95(0xef)+_0x4d3e95(0x101)]=0x8;continue;case'25':this[_0x4d3e95(0x171)+'story']=new Map();continue;case'26':this[_0x4d3e95(0x151)+_0x4d3e95(0x1ec)+_0x4d3e95(0x233)]=0x1388;continue;}break;}}[_0x4d9e43(0x142)+_0x4d9e43(0x148)](_0x477d9a,_0x447242=0.25,_0x16dc4e=0x5){const _0x3226ee=_0x4d9e43,_0x23a080={};_0x23a080[_0x3226ee(0x1cf)]=_0x3226ee(0xfc)+_0x3226ee(0x182)+_0x3226ee(0x14f)+_0x3226ee(0x194);const _0xa45819=_0x23a080,_0x1d126e=_0xa45819[_0x3226ee(0x1cf)][_0x3226ee(0xf6)]('|');let _0x3c225d=0x0;while(!![]){switch(_0x1d126e[_0x3c225d++]){case'0':this[_0x3226ee(0x223)+_0x3226ee(0x1ca)][_0x3226ee(0x1d4)](_0x477d9a,[]);continue;case'1':const _0x36541c={};_0x36541c[_0x3226ee(0x135)+_0x3226ee(0x215)]=0x0,_0x36541c[_0x3226ee(0x183)+_0x3226ee(0x125)+_0x3226ee(0x124)]=0x1,this[_0x3226ee(0x195)+_0x3226ee(0x133)+'es'][_0x3226ee(0x1d4)](_0x477d9a,_0x36541c);continue;case'2':this[_0x3226ee(0x1a8)+_0x3226ee(0x22e)]=_0x16dc4e;continue;case'3':this[_0x3226ee(0x171)+_0x3226ee(0x1ca)][_0x3226ee(0x1d4)](_0x477d9a,[]);continue;case'4':this[_0x3226ee(0x22a)+_0x3226ee(0x17a)+'e']['set'](_0x477d9a,0x0);continue;case'5':this[_0x3226ee(0x1f3)+'uffer'][_0x3226ee(0x1d4)](_0x477d9a,[]);continue;case'6':this[_0x3226ee(0x21e)+_0x3226ee(0x185)+'er'][_0x3226ee(0x1d4)](_0x477d9a,[]);continue;case'7':this[_0x3226ee(0x1d3)+_0x3226ee(0xfe)]=_0x447242;continue;case'8':this[_0x3226ee(0x1cb)+'sBuff'+'er'][_0x3226ee(0x1d4)](_0x477d9a,[]);continue;case'9':this[_0x3226ee(0x13d)+_0x3226ee(0x1b3)+'r'][_0x3226ee(0x1d4)](_0x477d9a,[]);continue;}break;}}[_0x4d9e43(0x1ea)+_0x4d9e43(0x1a1)+'k'](_0x6c3016){const _0x1469c1=_0x4d9e43,_0x384886={};_0x384886[_0x1469c1(0x219)]=function(_0x2c9274,_0x4028f0){return _0x2c9274<_0x4028f0;},_0x384886[_0x1469c1(0x230)]=function(_0x182c68,_0x4b5b1b){return _0x182c68-_0x4b5b1b;},_0x384886['yAsfl']=function(_0x1dd47d,_0x5b7b7a){return _0x1dd47d-_0x5b7b7a;},_0x384886['IjvYH']=function(_0x311ad2,_0x1ac74e){return _0x311ad2/_0x1ac74e;},_0x384886[_0x1469c1(0x116)]=function(_0x4c0052,_0x4c4feb){return _0x4c0052-_0x4c4feb;},_0x384886['cIKpo']=function(_0x3e6389,_0x5f383b){return _0x3e6389-_0x5f383b;},_0x384886[_0x1469c1(0x134)]=function(_0x4e98d7,_0xa71422){return _0x4e98d7/_0xa71422;},_0x384886['GWbwl']=_0x1469c1(0xec),_0x384886[_0x1469c1(0x173)]=function(_0x37176a,_0x70c530){return _0x37176a>_0x70c530;},_0x384886['ybZzA']=_0x1469c1(0x1da)+'l';const _0x4f2d01=_0x384886,_0x186e00=_0x6c3016['contr'+'actId'];if(!this[_0x1469c1(0x171)+'story'][_0x1469c1(0x22b)](_0x186e00)){if(_0x1469c1(0x107)===_0x4f2d01[_0x1469c1(0x1e7)]){if(_0x4f2d01[_0x1469c1(0x219)](_0x399922['lengt'+'h'],0x14))return 0x0;const _0x55455d=_0x45cafb[_0x1469c1(0x1ee)](-0x14),_0x19c971=[],_0x50b194=[];for(let _0x2c5806=0x1;_0x4f2d01[_0x1469c1(0x219)](_0x2c5806,_0x55455d[_0x1469c1(0x1e0)+'h']);_0x2c5806++){_0x19c971[_0x1469c1(0x139)](_0x4f2d01['rZdDJ'](_0x55455d[_0x2c5806][_0x1469c1(0x106)],_0x55455d[_0x4f2d01[_0x1469c1(0xed)](_0x2c5806,0x1)][_0x1469c1(0x106)])),_0x50b194[_0x1469c1(0x139)](_0x55455d[_0x2c5806]['volum'+'e']);}const _0x461382=_0x19c971[_0x1469c1(0x10e)+'e']((_0x543435,_0x161caf)=>_0x543435+_0x161caf,0x0)/_0x19c971['lengt'+'h'],_0x1e8e6a=_0x4f2d01[_0x1469c1(0x1fc)](_0x50b194[_0x1469c1(0x10e)+'e']((_0x2ed085,_0x426f82)=>_0x2ed085+_0x426f82,0x0),_0x50b194[_0x1469c1(0x1e0)+'h']);let _0x3e666b=0x0,_0x5849be=0x0;for(let _0x3a6504=0x0;_0x4f2d01[_0x1469c1(0x219)](_0x3a6504,_0x19c971[_0x1469c1(0x1e0)+'h']);_0x3a6504++){_0x3e666b+=_0x4f2d01[_0x1469c1(0x116)](_0x19c971[_0x3a6504],_0x461382)*_0x4f2d01[_0x1469c1(0x1ba)](_0x50b194[_0x3a6504],_0x1e8e6a),_0x5849be+=_0x237207[_0x1469c1(0x1ef)](_0x50b194[_0x3a6504]-_0x1e8e6a,0x2);}_0x3e666b/=_0x19c971['lengt'+'h'],_0x5849be/=_0x19c971[_0x1469c1(0x1e0)+'h'];if(_0x4f2d01[_0x1469c1(0x219)](_0x5849be,0.0001))return 0x0;return _0x275057[_0x1469c1(0x198)](_0x4f2d01['MxcHl'](_0x3e666b,_0x5849be));}else this[_0x1469c1(0x142)+_0x1469c1(0x148)](_0x186e00);}let _0x8e96bb=this[_0x1469c1(0x1f3)+'uffer'][_0x1469c1(0x1c2)](_0x186e00);_0x8e96bb[_0x1469c1(0x139)](_0x6c3016);const _0x2cc03e=Date[_0x1469c1(0x17c)](),_0x2e1290=this[_0x1469c1(0x22a)+_0x1469c1(0x17a)+'e']['get'](_0x186e00);if(_0x2cc03e-_0x2e1290>=this['barIn'+_0x1469c1(0x1ec)+_0x1469c1(0x233)]&&_0x4f2d01['jwtHP'](_0x8e96bb[_0x1469c1(0x1e0)+'h'],0x0)){const _0x256929=this['_aggr'+_0x1469c1(0x111)+'Ticks'+_0x1469c1(0x229)](_0x8e96bb,_0x2cc03e);this[_0x1469c1(0x1f3)+_0x1469c1(0x140)][_0x1469c1(0x1d4)](_0x186e00,[]),this['lastB'+'arTim'+'e'][_0x1469c1(0x1d4)](_0x186e00,_0x2cc03e);if(_0x256929){const _0x4ade44=this[_0x1469c1(0x1ea)+_0x1469c1(0x145)](_0x186e00,_0x256929);if(_0x4ade44)return this[_0x1469c1(0x1b7)](_0x4f2d01[_0x1469c1(0x1e1)],_0x4ade44),_0x4ade44;}}return null;}['_aggr'+_0x4d9e43(0x111)+_0x4d9e43(0xfd)+'ToBar'](_0x5b9144,_0x2918fa){const _0x2900c4=_0x4d9e43,_0x13415c={};_0x13415c[_0x2900c4(0x12a)]=function(_0x30ac88,_0x44ca1e){return _0x30ac88===_0x44ca1e;},_0x13415c[_0x2900c4(0x1d0)]=function(_0xc52b2f,_0x22d118){return _0xc52b2f<_0x22d118;},_0x13415c['hvaQt']=function(_0x44083b,_0x3d5ffb){return _0x44083b>_0x3d5ffb;},_0x13415c[_0x2900c4(0x155)]=function(_0x3d5614,_0x33ce72){return _0x3d5614-_0x33ce72;},_0x13415c['bxlqi']=function(_0x44ba15,_0x4f3bb1){return _0x44ba15<_0x4f3bb1;},_0x13415c[_0x2900c4(0x1cc)]=function(_0x270e87,_0x4eacf7){return _0x270e87===_0x4eacf7;},_0x13415c[_0x2900c4(0x154)]=_0x2900c4(0x16b),_0x13415c[_0x2900c4(0x115)]=_0x2900c4(0x234),_0x13415c[_0x2900c4(0xfa)]=function(_0x4019b0,_0x39cd86){return _0x4019b0/_0x39cd86;},_0x13415c[_0x2900c4(0x1fe)]=function(_0x88f0f1,_0x53d86f){return _0x88f0f1-_0x53d86f;};const _0x52c85c=_0x13415c;if(_0x5b9144[_0x2900c4(0x1e0)+'h']===0x0)return null;const _0x2d872d=_0x5b9144['map'](_0x48e30d=>_0x48e30d['price'])[_0x2900c4(0x1d1)+'r'](_0x3769d1=>_0x3769d1!=null);if(_0x52c85c[_0x2900c4(0x12a)](_0x2d872d[_0x2900c4(0x1e0)+'h'],0x0))return null;let _0x2b3bfa=0x0,_0x39a0cd=0x0;for(let _0xcb0128=0x1;_0x52c85c[_0x2900c4(0x1d0)](_0xcb0128,_0x5b9144['lengt'+'h']);_0xcb0128++){const _0x2f9050=_0x5b9144[_0xcb0128][_0x2900c4(0x21e)+'e']||0x1;if(_0x52c85c[_0x2900c4(0x166)](_0x5b9144[_0xcb0128][_0x2900c4(0x13d)],_0x5b9144[_0x52c85c[_0x2900c4(0x155)](_0xcb0128,0x1)][_0x2900c4(0x13d)]))_0x2b3bfa+=_0x2f9050;else{if(_0x52c85c[_0x2900c4(0x1d2)](_0x5b9144[_0xcb0128]['price'],_0x5b9144[_0xcb0128-0x1]['price']))_0x39a0cd+=_0x2f9050;else{if(_0x52c85c[_0x2900c4(0x1cc)](_0x52c85c[_0x2900c4(0x154)],_0x52c85c[_0x2900c4(0x115)])){const _0x4a9232=_0x229140[0x3];return _0x56df08[_0x4a9232]||_0x4a9232;}else _0x2b3bfa+=_0x2f9050/0x2,_0x39a0cd+=_0x52c85c['CeMDZ'](_0x2f9050,0x2);}}}return{'timestamp':_0x2918fa,'open':_0x2d872d[0x0],'high':Math['max'](..._0x2d872d),'low':Math[_0x2900c4(0x1f9)](..._0x2d872d),'close':_0x2d872d[_0x52c85c[_0x2900c4(0x155)](_0x2d872d[_0x2900c4(0x1e0)+'h'],0x1)],'volume':_0x5b9144[_0x2900c4(0x10e)+'e']((_0x350798,_0x29731d)=>_0x350798+(_0x29731d['volum'+'e']||0x1),0x0),'delta':_0x52c85c[_0x2900c4(0x1fe)](_0x2b3bfa,_0x39a0cd),'tickCount':_0x5b9144['lengt'+'h']};}[_0x4d9e43(0x1ea)+_0x4d9e43(0x145)](_0x3e5efb,_0x12d73b){const _0x44fa25=_0x4d9e43,_0x4c7b98={};_0x4c7b98[_0x44fa25(0x1bb)]=function(_0x530a1b,_0x2092bc){return _0x530a1b>_0x2092bc;},_0x4c7b98[_0x44fa25(0x168)]=function(_0x3662f2,_0x54671b){return _0x3662f2>_0x54671b;},_0x4c7b98[_0x44fa25(0x130)]=function(_0x16a1ed,_0x50be18){return _0x16a1ed*_0x50be18;},_0x4c7b98[_0x44fa25(0x217)]=function(_0x1f4db2,_0x320b0d){return _0x1f4db2>_0x320b0d;},_0x4c7b98[_0x44fa25(0x164)]=function(_0x2b8556,_0x49d3e0){return _0x2b8556-_0x49d3e0;},_0x4c7b98[_0x44fa25(0x1c9)]=function(_0x288fb0,_0x5c23ea){return _0x288fb0*_0x5c23ea;};const _0x58853a=_0x4c7b98;let _0x4f5262=this[_0x44fa25(0x171)+_0x44fa25(0x1ca)]['get'](_0x3e5efb);!_0x4f5262&&(this[_0x44fa25(0x142)+'alize'](_0x3e5efb),_0x4f5262=this[_0x44fa25(0x171)+_0x44fa25(0x1ca)][_0x44fa25(0x1c2)](_0x3e5efb));_0x4f5262[_0x44fa25(0x139)](_0x12d73b);if(_0x58853a['AzSkd'](_0x4f5262[_0x44fa25(0x1e0)+'h'],0x1f4))_0x4f5262[_0x44fa25(0x15d)]();const _0x1c2bbc=this[_0x44fa25(0x13d)+_0x44fa25(0x1b3)+'r'][_0x44fa25(0x1c2)](_0x3e5efb);_0x1c2bbc['push'](_0x12d73b[_0x44fa25(0x106)]);if(_0x58853a[_0x44fa25(0x168)](_0x1c2bbc[_0x44fa25(0x1e0)+'h'],0xc8))_0x1c2bbc[_0x44fa25(0x15d)]();const _0x41b6eb=this[_0x44fa25(0x21e)+_0x44fa25(0x185)+'er'][_0x44fa25(0x1c2)](_0x3e5efb),_0x5523c4=_0x12d73b[_0x44fa25(0x1ed)]-_0x12d73b['low'];let _0x1b058b=_0x12d73b['volum'+'e']*0.5,_0x1a6747=_0x58853a['zmwfG'](_0x12d73b[_0x44fa25(0x21e)+'e'],0.5);if(_0x58853a[_0x44fa25(0x217)](_0x5523c4,0x0)){const _0x38da36=_0x58853a[_0x44fa25(0x164)](_0x12d73b['close'],_0x12d73b['low'])/_0x5523c4;_0x1b058b=_0x12d73b['volum'+'e']*_0x38da36,_0x1a6747=_0x58853a[_0x44fa25(0x1c9)](_0x12d73b[_0x44fa25(0x21e)+'e'],_0x58853a[_0x44fa25(0x164)](0x1,_0x38da36));}const _0x4e136e={};_0x4e136e['buy']=_0x1b058b,_0x4e136e[_0x44fa25(0x10d)]=_0x1a6747,_0x41b6eb[_0x44fa25(0x139)](_0x4e136e);if(_0x41b6eb[_0x44fa25(0x1e0)+'h']>0x64)_0x41b6eb['shift']();if(_0x4f5262[_0x44fa25(0x1e0)+'h']<0x32)return null;const _0x3c5c4d=this[_0x44fa25(0x224)+_0x44fa25(0x20e)+'core'](_0x1c2bbc),_0x21656f=this[_0x44fa25(0x224)+'uteVP'+'IN'](_0x41b6eb),_0x54605c=this[_0x44fa25(0x224)+_0x44fa25(0x1b8)+_0x44fa25(0x1b0)+_0x44fa25(0x180)](_0x4f5262),_0xd7a07c=this[_0x44fa25(0x211)+'yKalm'+_0x44fa25(0x216)+_0x44fa25(0x16e)](_0x3e5efb,_0x12d73b[_0x44fa25(0x106)]),{regime:_0x217c77,params:_0x2e3969}=this[_0x44fa25(0x1f7)+_0x44fa25(0x18f)+_0x44fa25(0x210)+'tyReg'+_0x44fa25(0xf1)](_0x3e5efb,_0x4f5262),_0x3da0f8=this[_0x44fa25(0x224)+_0x44fa25(0x13b)+'derFl'+_0x44fa25(0x114)+_0x44fa25(0x19d)+'e'](_0x4f5262);return this[_0x44fa25(0x201)+'rateS'+'ignal'](_0x3e5efb,_0x12d73b[_0x44fa25(0x106)],_0x3c5c4d,_0x21656f,_0x54605c,_0xd7a07c,_0x217c77,_0x2e3969,_0x3da0f8,_0x4f5262);}[_0x4d9e43(0x224)+_0x4d9e43(0x20e)+_0x4d9e43(0x17f)](_0x1580e9,_0x130508=0x32){const _0x318c48=_0x4d9e43,_0x20be13={};_0x20be13[_0x318c48(0x102)]=function(_0x279df8,_0x2f6e62){return _0x279df8<_0x2f6e62;},_0x20be13[_0x318c48(0x13f)]=function(_0x2bb703,_0x14c5c8){return _0x2bb703<_0x14c5c8;},_0x20be13[_0x318c48(0x20c)]=function(_0x324f9c,_0x273a16){return _0x324f9c/_0x273a16;},_0x20be13[_0x318c48(0xfb)]=function(_0x51906c,_0x2b3c07){return _0x51906c-_0x2b3c07;};const _0x1830bc=_0x20be13;if(_0x1830bc[_0x318c48(0x102)](_0x1580e9[_0x318c48(0x1e0)+'h'],_0x130508))return 0x0;const _0x5f32b4=_0x1580e9[_0x318c48(0x1ee)](-_0x130508),_0x554f8c=_0x5f32b4[_0x318c48(0x10e)+'e']((_0xcd4cca,_0x198602)=>_0xcd4cca+_0x198602,0x0)/_0x130508,_0x3ca3ab=_0x5f32b4[_0x318c48(0x10e)+'e']((_0x3ba43e,_0x232352)=>_0x3ba43e+Math[_0x318c48(0x1ef)](_0x232352-_0x554f8c,0x2),0x0)/_0x130508,_0x5a420c=Math[_0x318c48(0x17d)](_0x3ca3ab);if(_0x1830bc[_0x318c48(0x13f)](_0x5a420c,0.0001))return 0x0;return _0x1830bc[_0x318c48(0x20c)](_0x1830bc['XZBkZ'](_0x1580e9[_0x1580e9['lengt'+'h']-0x1],_0x554f8c),_0x5a420c);}[_0x4d9e43(0x224)+_0x4d9e43(0x1b4)+'IN'](_0x2cfcc4){const _0x3abde3=_0x4d9e43,_0x5718b4={};_0x5718b4[_0x3abde3(0x12e)]=function(_0x59a4c8,_0x322b72){return _0x59a4c8<_0x322b72;},_0x5718b4[_0x3abde3(0x146)]=function(_0x3e8544,_0x39d27d){return _0x3e8544/_0x39d27d;},_0x5718b4[_0x3abde3(0x172)]=function(_0x1f3e3f,_0xe330bb){return _0x1f3e3f-_0xe330bb;};const _0x1a4bbe=_0x5718b4;if(_0x2cfcc4['lengt'+'h']<this[_0x3abde3(0x1f0)+_0x3abde3(0x14e)])return 0.5;const _0x5e2483=_0x2cfcc4[_0x3abde3(0x1ee)](-this['vpinW'+_0x3abde3(0x14e)]);let _0x21bb9f=0x0,_0x1aa8a6=0x0;for(const _0x8c17a9 of _0x5e2483){_0x21bb9f+=_0x8c17a9[_0x3abde3(0x1fa)],_0x1aa8a6+=_0x8c17a9[_0x3abde3(0x10d)];}const _0x4d3242=_0x21bb9f+_0x1aa8a6;if(_0x1a4bbe[_0x3abde3(0x12e)](_0x4d3242,0x1))return 0.5;return _0x1a4bbe['sgAdB'](Math[_0x3abde3(0x198)](_0x1a4bbe[_0x3abde3(0x172)](_0x21bb9f,_0x1aa8a6)),_0x4d3242);}['_comp'+_0x4d9e43(0x1b8)+_0x4d9e43(0x1b0)+_0x4d9e43(0x180)](_0x5b7626){const _0x184f05=_0x4d9e43,_0x5c3588={};_0x5c3588[_0x184f05(0x119)]=function(_0x3b8320,_0x3face0){return _0x3b8320<_0x3face0;},_0x5c3588[_0x184f05(0x19b)]=function(_0x2af201,_0x1160fd){return _0x2af201<_0x1160fd;},_0x5c3588[_0x184f05(0x197)]=function(_0x2fe217,_0x2c4498){return _0x2fe217-_0x2c4498;},_0x5c3588[_0x184f05(0x160)]=function(_0x3c253c,_0x32cdcd){return _0x3c253c/_0x32cdcd;},_0x5c3588['SCYWG']=function(_0x34e44a,_0x17595b){return _0x34e44a/_0x17595b;},_0x5c3588[_0x184f05(0x189)]=function(_0x2baa66,_0x13dc09){return _0x2baa66<_0x13dc09;},_0x5c3588[_0x184f05(0x1c3)]=function(_0x297987,_0x4e6a7c){return _0x297987*_0x4e6a7c;},_0x5c3588[_0x184f05(0x1bc)]=function(_0x2299ab,_0x4033b5){return _0x2299ab-_0x4033b5;},_0x5c3588['yvwhx']=function(_0x1105ae,_0xb2b35b){return _0x1105ae-_0xb2b35b;};const _0x5a4fea=_0x5c3588;if(_0x5a4fea[_0x184f05(0x119)](_0x5b7626[_0x184f05(0x1e0)+'h'],0x14))return 0x0;const _0x20507f=_0x5b7626[_0x184f05(0x1ee)](-0x14),_0x3c4d16=[],_0x3fc4f3=[];for(let _0x864801=0x1;_0x5a4fea[_0x184f05(0x19b)](_0x864801,_0x20507f[_0x184f05(0x1e0)+'h']);_0x864801++){_0x3c4d16[_0x184f05(0x139)](_0x5a4fea[_0x184f05(0x197)](_0x20507f[_0x864801][_0x184f05(0x106)],_0x20507f[_0x5a4fea[_0x184f05(0x197)](_0x864801,0x1)][_0x184f05(0x106)])),_0x3fc4f3[_0x184f05(0x139)](_0x20507f[_0x864801][_0x184f05(0x21e)+'e']);}const _0x18adb4=_0x5a4fea[_0x184f05(0x160)](_0x3c4d16['reduc'+'e']((_0x517b84,_0x5bd8b1)=>_0x517b84+_0x5bd8b1,0x0),_0x3c4d16[_0x184f05(0x1e0)+'h']),_0x55f773=_0x5a4fea[_0x184f05(0x1d9)](_0x3fc4f3[_0x184f05(0x10e)+'e']((_0x532bc4,_0xf2b39f)=>_0x532bc4+_0xf2b39f,0x0),_0x3fc4f3[_0x184f05(0x1e0)+'h']);let _0x331372=0x0,_0x145b29=0x0;for(let _0x1587fd=0x0;_0x5a4fea[_0x184f05(0x189)](_0x1587fd,_0x3c4d16[_0x184f05(0x1e0)+'h']);_0x1587fd++){_0x331372+=_0x5a4fea[_0x184f05(0x1c3)](_0x3c4d16[_0x1587fd]-_0x18adb4,_0x5a4fea[_0x184f05(0x1bc)](_0x3fc4f3[_0x1587fd],_0x55f773)),_0x145b29+=Math[_0x184f05(0x1ef)](_0x5a4fea[_0x184f05(0x110)](_0x3fc4f3[_0x1587fd],_0x55f773),0x2);}_0x331372/=_0x3c4d16[_0x184f05(0x1e0)+'h'],_0x145b29/=_0x3c4d16['lengt'+'h'];if(_0x145b29<0.0001)return 0x0;return Math['abs'](_0x5a4fea[_0x184f05(0x1d9)](_0x331372,_0x145b29));}[_0x4d9e43(0x211)+_0x4d9e43(0x200)+_0x4d9e43(0x216)+'ter'](_0x248118,_0x36c817){const _0x4068f4=_0x4d9e43,_0x4c678a={};_0x4c678a['edqBV']=function(_0x2b9b7b,_0x37de39){return _0x2b9b7b/_0x37de39;},_0x4c678a[_0x4068f4(0x137)]=function(_0x354d9e,_0x30fee7){return _0x354d9e*_0x30fee7;},_0x4c678a[_0x4068f4(0x192)]=function(_0x3bba80,_0x88dba9){return _0x3bba80-_0x88dba9;},_0x4c678a[_0x4068f4(0x20b)]=function(_0x1b9e40,_0x4e02bd){return _0x1b9e40*_0x4e02bd;};const _0x3c64ce=_0x4c678a;let _0x5bec67=this[_0x4068f4(0x195)+_0x4068f4(0x133)+'es'][_0x4068f4(0x1c2)](_0x248118);if(!_0x5bec67){const _0x599203={};return _0x599203[_0x4068f4(0x135)+_0x4068f4(0x215)]=_0x36c817,_0x599203[_0x4068f4(0x183)+_0x4068f4(0x125)+'iance']=0x1,_0x5bec67=_0x599203,this[_0x4068f4(0x195)+_0x4068f4(0x133)+'es'][_0x4068f4(0x1d4)](_0x248118,_0x5bec67),_0x36c817;}const _0x18c8bb=_0x5bec67[_0x4068f4(0x135)+_0x4068f4(0x215)],_0x53c37a=_0x5bec67[_0x4068f4(0x183)+_0x4068f4(0x125)+_0x4068f4(0x124)]+this[_0x4068f4(0x195)+_0x4068f4(0x208)+'essNo'+'ise'],_0xe37a2f=_0x3c64ce[_0x4068f4(0x12b)](_0x53c37a,_0x53c37a+this[_0x4068f4(0x195)+_0x4068f4(0x174)+'ureme'+_0x4068f4(0x193)+'se']);return _0x5bec67['estim'+'ate']=_0x18c8bb+_0x3c64ce['dzguF'](_0xe37a2f,_0x3c64ce[_0x4068f4(0x192)](_0x36c817,_0x18c8bb)),_0x5bec67[_0x4068f4(0x183)+'Covar'+_0x4068f4(0x124)]=_0x3c64ce[_0x4068f4(0x20b)](0x1-_0xe37a2f,_0x53c37a),_0x5bec67['estim'+_0x4068f4(0x215)];}[_0x4d9e43(0x1f7)+_0x4d9e43(0x18f)+_0x4d9e43(0x210)+_0x4d9e43(0x131)+_0x4d9e43(0xf1)](_0x5a1c72,_0x236d77){const _0x586b51=_0x4d9e43,_0x5de5c2={};_0x5de5c2[_0x586b51(0x226)]=function(_0x34b058,_0x289aef){return _0x34b058>_0x289aef;},_0x5de5c2[_0x586b51(0x150)]=function(_0x30f8c0,_0x1a75ac){return _0x30f8c0<_0x1a75ac;},_0x5de5c2[_0x586b51(0x128)]=_0x586b51(0x179),_0x5de5c2['zweDE']=function(_0x43f537,_0x59a592){return _0x43f537<_0x59a592;},_0x5de5c2[_0x586b51(0x117)]='norma'+'l';const _0x19b6a8=_0x5de5c2,_0x3ab24a=this['_calc'+_0x586b51(0x16a)+_0x586b51(0x1ad)](_0x236d77);let _0x1c20e5=this[_0x586b51(0x223)+_0x586b51(0x1ca)][_0x586b51(0x1c2)](_0x5a1c72);!_0x1c20e5&&(_0x1c20e5=[],this[_0x586b51(0x223)+_0x586b51(0x1ca)][_0x586b51(0x1d4)](_0x5a1c72,_0x1c20e5));_0x1c20e5['push'](_0x3ab24a);if(_0x19b6a8[_0x586b51(0x226)](_0x1c20e5[_0x586b51(0x1e0)+'h'],0x1f4))_0x1c20e5[_0x586b51(0x15d)]();let _0x1f24cc=0.5;_0x1c20e5['lengt'+'h']>=0x14&&(_0x1f24cc=_0x1c20e5[_0x586b51(0x1d1)+'r'](_0x25a68f=>_0x25a68f<=_0x3ab24a)[_0x586b51(0x1e0)+'h']/_0x1c20e5['lengt'+'h']);let _0x219a69,_0x3d49dc;if(_0x19b6a8[_0x586b51(0x150)](_0x1f24cc,0.25)){_0x219a69=_0x19b6a8['rlepk'];const _0x255bec={};_0x255bec['stopM'+_0x586b51(0x17e)+'lier']=0.8,_0x255bec[_0x586b51(0x18b)+_0x586b51(0x1a9)+_0x586b51(0x188)+'r']=0.9,_0x255bec[_0x586b51(0x122)+_0x586b51(0x1f4)+'shold']=1.2,_0x255bec[_0x586b51(0x1a5)+'dence'+_0x586b51(0x12f)]=0.05,_0x3d49dc=_0x255bec;}else{if(_0x19b6a8[_0x586b51(0x144)](_0x1f24cc,0.75)){_0x219a69=_0x19b6a8[_0x586b51(0x117)];const _0x2d3d80={};_0x2d3d80[_0x586b51(0x1af)+'ultip'+_0x586b51(0x204)]=0x1,_0x2d3d80[_0x586b51(0x18b)+'tMult'+_0x586b51(0x188)+'r']=0x1,_0x2d3d80['zscor'+_0x586b51(0x1f4)+_0x586b51(0x1e5)]=1.5,_0x2d3d80[_0x586b51(0x1a5)+_0x586b51(0x196)+_0x586b51(0x12f)]=0x0,_0x3d49dc=_0x2d3d80;}else{_0x219a69=_0x586b51(0x1ed);const _0x4120c4={};_0x4120c4[_0x586b51(0x1af)+'ultip'+_0x586b51(0x204)]=1.3,_0x4120c4[_0x586b51(0x18b)+_0x586b51(0x1a9)+_0x586b51(0x188)+'r']=1.2,_0x4120c4[_0x586b51(0x122)+_0x586b51(0x1f4)+_0x586b51(0x1e5)]=0x2,_0x4120c4[_0x586b51(0x1a5)+_0x586b51(0x196)+_0x586b51(0x12f)]=-0.05,_0x3d49dc=_0x4120c4;}}const _0x3425b6={};return _0x3425b6[_0x586b51(0x158)+'e']=_0x219a69,_0x3425b6[_0x586b51(0x1f1)+'s']=_0x3d49dc,_0x3425b6;}[_0x4d9e43(0x1b5)+'ulate'+_0x4d9e43(0x1ad)](_0x1fb31f,_0x39d6c2=0xe){const _0x4a7cc0=_0x4d9e43,_0x497eee={};_0x497eee['xvszp']=function(_0x4bdc93,_0x351d9e){return _0x4bdc93<_0x351d9e;},_0x497eee['vKymI']=function(_0x2c4c1f,_0x4a598c){return _0x2c4c1f-_0x4a598c;},_0x497eee['SiYXM']=function(_0x5b7a08,_0x36220f){return _0x5b7a08-_0x36220f;},_0x497eee[_0x4a7cc0(0x113)]=function(_0x5bfac5,_0x45c904){return _0x5bfac5-_0x45c904;},_0x497eee[_0x4a7cc0(0x1ae)]=function(_0x1f9efc,_0x179793){return _0x1f9efc/_0x179793;};const _0x11ac3b=_0x497eee;if(_0x11ac3b[_0x4a7cc0(0x21b)](_0x1fb31f[_0x4a7cc0(0x1e0)+'h'],_0x39d6c2+0x1))return 2.5;const _0x20e3d5=[];for(let _0x443f08=_0x11ac3b[_0x4a7cc0(0x1f2)](_0x1fb31f[_0x4a7cc0(0x1e0)+'h'],_0x39d6c2);_0x11ac3b[_0x4a7cc0(0x21b)](_0x443f08,_0x1fb31f[_0x4a7cc0(0x1e0)+'h']);_0x443f08++){const _0x1a623e=_0x1fb31f[_0x443f08],_0x146cfa=_0x1fb31f[_0x11ac3b[_0x4a7cc0(0x1f2)](_0x443f08,0x1)][_0x4a7cc0(0x106)],_0x59fcc7=Math[_0x4a7cc0(0x10c)](_0x11ac3b['SiYXM'](_0x1a623e[_0x4a7cc0(0x1ed)],_0x1a623e[_0x4a7cc0(0x179)]),Math['abs'](_0x11ac3b[_0x4a7cc0(0x113)](_0x1a623e['high'],_0x146cfa)),Math[_0x4a7cc0(0x198)](_0x11ac3b[_0x4a7cc0(0x228)](_0x1a623e[_0x4a7cc0(0x179)],_0x146cfa)));_0x20e3d5[_0x4a7cc0(0x139)](_0x59fcc7);}return _0x11ac3b[_0x4a7cc0(0x1ae)](_0x20e3d5[_0x4a7cc0(0x10e)+'e']((_0x7e347f,_0x3e5b02)=>_0x7e347f+_0x3e5b02,0x0),_0x20e3d5[_0x4a7cc0(0x1e0)+'h']);}[_0x4d9e43(0x224)+_0x4d9e43(0x13b)+_0x4d9e43(0x1e8)+'owImb'+_0x4d9e43(0x19d)+'e'](_0x1691ba){const _0xda3bc4=_0x4d9e43,_0x4c5d8c={};_0x4c5d8c[_0xda3bc4(0x170)]=function(_0x244d03,_0x805bcd){return _0x244d03<_0x805bcd;},_0x4c5d8c['IyIMN']=function(_0x3eb097,_0x5d3dae){return _0x3eb097<_0x5d3dae;},_0x4c5d8c[_0xda3bc4(0x177)]=function(_0x547821,_0x99fe73){return _0x547821+_0x99fe73;},_0x4c5d8c[_0xda3bc4(0x127)]=function(_0x2bc364,_0x598c95){return _0x2bc364*_0x598c95;},_0x4c5d8c[_0xda3bc4(0xee)]=function(_0x2a4a90,_0x51a5a1){return _0x2a4a90-_0x51a5a1;},_0x4c5d8c['MFrYo']=function(_0x5aa8e6,_0x5179b7){return _0x5aa8e6*_0x5179b7;},_0x4c5d8c['Lkacw']=function(_0x1ca544,_0x3b29e6){return _0x1ca544-_0x3b29e6;},_0x4c5d8c[_0xda3bc4(0x227)]=function(_0x545fca,_0x1acbea){return _0x545fca<_0x1acbea;},_0x4c5d8c[_0xda3bc4(0x10b)]=_0xda3bc4(0xff),_0x4c5d8c[_0xda3bc4(0x109)]=function(_0x222805,_0x8e980){return _0x222805>_0x8e980;},_0x4c5d8c[_0xda3bc4(0x1f8)]=_0xda3bc4(0x1e4),_0x4c5d8c[_0xda3bc4(0x1a0)]=function(_0x4a6305,_0x11d267){return _0x4a6305-_0x11d267;},_0x4c5d8c[_0xda3bc4(0x19e)]=function(_0x332b16,_0xf48b9b){return _0x332b16<_0xf48b9b;};const _0x1a7a38=_0x4c5d8c;if(_0x1a7a38[_0xda3bc4(0x227)](_0x1691ba[_0xda3bc4(0x1e0)+'h'],this[_0xda3bc4(0x20d)+_0xda3bc4(0x103)+'k']))return 0x0;const _0x53f2df=_0x1691ba[_0xda3bc4(0x1ee)](-this[_0xda3bc4(0x20d)+'okbac'+'k']);let _0x3b9e95=0x0,_0x3da620=0x0;for(const _0x59844f of _0x53f2df){if('WmbuA'===_0x1a7a38[_0xda3bc4(0x10b)]){const _0x1cf926=this[_0xda3bc4(0x13d)+'Buffe'+'r']['get'](_0x13977d);if(!_0x1cf926||_0x1a7a38[_0xda3bc4(0x170)](_0x1cf926[_0xda3bc4(0x1e0)+'h'],0x32))return![];const _0x125123=this['_comp'+_0xda3bc4(0x20e)+_0xda3bc4(0x17f)](_0x1cf926);return _0x1a7a38['IyIMN'](_0x177c55[_0xda3bc4(0x198)](_0x125123),this[_0xda3bc4(0x122)+'eExit'+_0xda3bc4(0x1a7)+_0xda3bc4(0x1fd)]);}else{const _0x44912d=_0x59844f[_0xda3bc4(0x1ed)]-_0x59844f['low'];if(_0x1a7a38[_0xda3bc4(0x109)](_0x44912d,0x0)){if(_0xda3bc4(0x14d)!==_0x1a7a38[_0xda3bc4(0x1f8)]){const _0x3d5e9b=_0x1a7a38[_0xda3bc4(0x1a0)](_0x59844f[_0xda3bc4(0x106)],_0x59844f[_0xda3bc4(0x179)])/_0x44912d;_0x3b9e95+=_0x3d5e9b*_0x59844f[_0xda3bc4(0x21e)+'e'],_0x3da620+=(0x1-_0x3d5e9b)*_0x59844f[_0xda3bc4(0x21e)+'e'];}else{let _0x3fe2=this[_0xda3bc4(0x195)+_0xda3bc4(0x133)+'es'][_0xda3bc4(0x1c2)](_0x248130);if(!_0x3fe2){const _0x18ed4e={};return _0x18ed4e[_0xda3bc4(0x135)+_0xda3bc4(0x215)]=_0x436ab2,_0x18ed4e[_0xda3bc4(0x183)+_0xda3bc4(0x125)+'iance']=0x1,_0x3fe2=_0x18ed4e,this[_0xda3bc4(0x195)+'nStat'+'es'][_0xda3bc4(0x1d4)](_0x35b332,_0x3fe2),_0x46a01e;}const _0x5ded6a=_0x3fe2['estim'+_0xda3bc4(0x215)],_0x4755b8=_0x3fe2[_0xda3bc4(0x183)+_0xda3bc4(0x125)+_0xda3bc4(0x124)]+this[_0xda3bc4(0x195)+_0xda3bc4(0x208)+_0xda3bc4(0x1e3)+'ise'],_0x26312f=_0x4755b8/(_0x4755b8+this[_0xda3bc4(0x195)+_0xda3bc4(0x174)+_0xda3bc4(0x19f)+_0xda3bc4(0x193)+'se']);return _0x3fe2[_0xda3bc4(0x135)+_0xda3bc4(0x215)]=_0x1a7a38[_0xda3bc4(0x177)](_0x5ded6a,_0x1a7a38[_0xda3bc4(0x127)](_0x26312f,_0x1a7a38[_0xda3bc4(0xee)](_0x3b2122,_0x5ded6a))),_0x3fe2[_0xda3bc4(0x183)+'Covar'+'iance']=_0x1a7a38[_0xda3bc4(0x13a)](_0x1a7a38[_0xda3bc4(0x1a2)](0x1,_0x26312f),_0x4755b8),_0x3fe2[_0xda3bc4(0x135)+'ate'];}}}}const _0x45fa28=_0x3b9e95+_0x3da620;if(_0x1a7a38[_0xda3bc4(0x19e)](_0x45fa28,0x1))return 0x0;return _0x1a7a38['Lkacw'](_0x3b9e95,_0x3da620)/_0x45fa28;}[_0x4d9e43(0x201)+_0x4d9e43(0x222)+_0x4d9e43(0x231)](_0x437f43,_0x1d1fd3,_0x5e5204,_0xc6a39d,_0x3fc74f,_0x2c21b6,_0x25fff4,_0x4d0d05,_0x2fdc87,_0xde2cf9){const _0x2ecea7=_0x4d9e43,_0xf108f6={'HRQXe':function(_0x1e5252,_0x5ce18a){return _0x1e5252<_0x5ce18a;},'vpgsw':function(_0x3bffff,_0x3337cd){return _0x3bffff>_0x3337cd;},'JiWss':_0x2ecea7(0x163),'lPXzs':function(_0x36e1d8,_0x4b8b57){return _0x36e1d8===_0x4b8b57;},'Dkmls':function(_0x15d80d,_0x5157a2){return _0x15d80d>_0x5157a2;},'SyMPz':function(_0x3c5db7,_0xec98b2){return _0x3c5db7===_0xec98b2;},'Wahgf':function(_0x5253c4,_0x536177){return _0x5253c4<_0x536177;},'XqKuW':function(_0x3737b3,_0x7a565a){return _0x3737b3-_0x7a565a;},'fAPnV':'short','KZnwP':function(_0x29301c,_0x55c240){return _0x29301c>_0x55c240;},'QJHzM':function(_0x982b2c,_0x5482e2){return _0x982b2c-_0x5482e2;},'emLmo':function(_0x1415c6,_0x1b3a37){return _0x1415c6===_0x1b3a37;},'riwLM':'norma'+'l','jlbJG':function(_0x2bf8aa,_0xc2f224){return _0x2bf8aa+_0xc2f224;},'hrvZs':function(_0x5bbf34,_0x371813){return _0x5bbf34+_0x371813;},'gYEIx':function(_0x565313,_0x4250b6){return _0x565313*_0x4250b6;},'NLaAP':function(_0x4c1f03,_0x2ad481){return _0x4c1f03*_0x2ad481;},'eapaN':function(_0x274ed4,_0x1f511b){return _0x274ed4+_0x1f511b;},'tGcyl':function(_0x1eafe8,_0xe0d6a8){return _0x1eafe8*_0xe0d6a8;},'TOdMz':function(_0x5b1b7b,_0x5caa96){return _0x5b1b7b===_0x5caa96;},'jTFlG':function(_0x28a472,_0x500761){return _0x28a472-_0x500761;},'UeqpV':function(_0x51df75,_0x1c5adc){return _0x51df75*_0x1c5adc;},'YlRkP':function(_0x54bef3,_0x781304){return _0x54bef3-_0x781304;},'iSsiV':function(_0x145bb0,_0x32aa5a){return _0x145bb0-_0x32aa5a;},'lLtEw':function(_0x346000,_0x5a53ed){return _0x346000-_0x5a53ed;},'IPUiA':function(_0x545806,_0x5f41c8){return _0x545806/_0x5f41c8;},'zEnFF':function(_0xe31113,_0x5a1aa2){return _0xe31113>=_0x5a1aa2;},'SKHaC':function(_0x433bb9,_0x1bf6a3){return _0x433bb9<_0x1bf6a3;},'XqjSf':function(_0x2eed4a,_0x5dcf8a){return _0x2eed4a+_0x5dcf8a;},'kGDCP':function(_0x578ebc,_0x3e61cb){return _0x578ebc-_0x3e61cb;},'waHdU':function(_0x3760b5,_0x3b5437){return _0x3760b5*_0x3b5437;},'hNdcT':function(_0x320624,_0x5b70ed){return _0x320624(_0x5b70ed);},'WwtLj':function(_0x46d51b,_0x586982){return _0x46d51b===_0x586982;},'KIGuG':_0x2ecea7(0x147)+_0x2ecea7(0x11f)+_0x2ecea7(0x156)+'ING'},_0x494d85=Math[_0x2ecea7(0x198)](_0x5e5204);if(_0xf108f6[_0x2ecea7(0x1e2)](_0x494d85,_0x4d0d05['zscor'+'eThre'+'shold']))return null;if(_0xf108f6['vpgsw'](_0xc6a39d,this[_0x2ecea7(0x16d)+_0x2ecea7(0x18a)+_0x2ecea7(0x178)+_0x2ecea7(0x1b2)]))return null;let _0x399bc2;if(_0xf108f6[_0x2ecea7(0x1e2)](_0x5e5204,-_0x4d0d05[_0x2ecea7(0x122)+'eThre'+_0x2ecea7(0x1e5)]))_0x399bc2=_0xf108f6[_0x2ecea7(0x218)];else{if(_0x5e5204>_0x4d0d05[_0x2ecea7(0x122)+_0x2ecea7(0x1f4)+_0x2ecea7(0x1e5)])_0x399bc2='short';else return null;}const _0x3d4bd9=_0xf108f6[_0x2ecea7(0x16c)](_0x399bc2,_0xf108f6[_0x2ecea7(0x218)])&&_0xf108f6[_0x2ecea7(0x181)](_0x2fdc87,0.1)||_0xf108f6[_0x2ecea7(0x22f)](_0x399bc2,'short')&&_0xf108f6['Wahgf'](_0x2fdc87,-0.1),_0x1ce3df=_0xf108f6['XqKuW'](_0x1d1fd3,_0x2c21b6),_0x3d79a4=_0xf108f6[_0x2ecea7(0x22f)](_0x399bc2,_0xf108f6['JiWss'])&&_0x1ce3df<0x0||_0x399bc2===_0xf108f6[_0x2ecea7(0x232)]&&_0xf108f6[_0x2ecea7(0x1ab)](_0x1ce3df,0x0),_0x5351b4={'zscore':Math['min'](0x1,_0x494d85/0x4),'vpin':_0xf108f6[_0x2ecea7(0x162)](0x1,_0xc6a39d),'kyleLambda':_0x3fc74f>0.001?0.5:0.8,'kalman':_0x3d79a4?0.8:0.4,'volatility':_0xf108f6['emLmo'](_0x25fff4,_0xf108f6[_0x2ecea7(0x1b6)])?0.8:_0x25fff4==='low'?0.7:0.6,'ofi':_0x3d4bd9?0.9:0.5,'composite':0x0};_0x5351b4[_0x2ecea7(0x21f)+_0x2ecea7(0x1a3)]=_0xf108f6[_0x2ecea7(0x1d6)](_0xf108f6[_0x2ecea7(0x15b)](_0xf108f6[_0x2ecea7(0xf3)](_0x5351b4[_0x2ecea7(0x122)+'e'],0.3)+_0x5351b4[_0x2ecea7(0x1c5)]*0.15+_0xf108f6['NLaAP'](_0x5351b4[_0x2ecea7(0x1ff)+_0x2ecea7(0x191)],0.1)+_0x5351b4['kalma'+'n']*0.15,_0x5351b4[_0x2ecea7(0x18d)+'ility']*0.1),_0x5351b4['ofi']*0.2);const _0x35627b=Math[_0x2ecea7(0x1f9)](0x1,_0xf108f6[_0x2ecea7(0x184)](_0x5351b4[_0x2ecea7(0x21f)+'site'],_0x4d0d05['confi'+'dence'+_0x2ecea7(0x12f)]));if(_0xf108f6[_0x2ecea7(0x1e2)](_0x35627b,0.55))return null;const _0x186b95=Math[_0x2ecea7(0x190)](_0xf108f6[_0x2ecea7(0x1c0)](this[_0x2ecea7(0x206)+_0x2ecea7(0xef)+_0x2ecea7(0x101)],_0x4d0d05['stopM'+_0x2ecea7(0x17e)+_0x2ecea7(0x204)])),_0x5229a8=Math['round'](_0xf108f6['tGcyl'](this[_0x2ecea7(0x186)+'arget'+_0x2ecea7(0xfd)],_0x4d0d05[_0x2ecea7(0x18b)+'tMult'+_0x2ecea7(0x188)+'r'])),_0x40d7ac=Math[_0x2ecea7(0x10c)](0x6,Math[_0x2ecea7(0x1f9)](0xc,_0x186b95)),_0x52064a=Math[_0x2ecea7(0x10c)](_0x40d7ac*1.5,Math[_0x2ecea7(0x1f9)](0x18,_0x5229a8));let _0x3ab992,_0x4f7424,_0x39c161,_0x1e3ce3;_0xf108f6[_0x2ecea7(0x199)](_0x399bc2,_0xf108f6[_0x2ecea7(0x218)])?(_0x3ab992=_0xf108f6[_0x2ecea7(0x203)](_0x1d1fd3,_0xf108f6['UeqpV'](_0x40d7ac,this[_0x2ecea7(0x1d3)+_0x2ecea7(0xfe)])),_0x4f7424=_0xf108f6[_0x2ecea7(0x1d6)](_0x1d1fd3,_0x52064a*this[_0x2ecea7(0x1d3)+'ize']),_0x39c161=_0x1d1fd3+_0xf108f6['UeqpV'](this['break'+'evenT'+_0x2ecea7(0x1eb)],this[_0x2ecea7(0x1d3)+_0x2ecea7(0xfe)]),_0x1e3ce3=_0x1d1fd3+_0x52064a*this['profi'+_0x2ecea7(0x1ac)+'Pct']*this['tickS'+_0x2ecea7(0xfe)]):(_0x3ab992=_0xf108f6[_0x2ecea7(0x15b)](_0x1d1fd3,_0xf108f6[_0x2ecea7(0x1c0)](_0x40d7ac,this[_0x2ecea7(0x1d3)+'ize'])),_0x4f7424=_0xf108f6['YlRkP'](_0x1d1fd3,_0x52064a*this[_0x2ecea7(0x1d3)+'ize']),_0x39c161=_0xf108f6[_0x2ecea7(0x141)](_0x1d1fd3,_0xf108f6[_0x2ecea7(0x1c0)](this['break'+'evenT'+_0x2ecea7(0x1eb)],this[_0x2ecea7(0x1d3)+_0x2ecea7(0xfe)])),_0x1e3ce3=_0xf108f6['lLtEw'](_0x1d1fd3,_0xf108f6['gYEIx'](_0xf108f6['NLaAP'](_0x52064a,this[_0x2ecea7(0x15f)+_0x2ecea7(0x1ac)+_0x2ecea7(0x187)]),this[_0x2ecea7(0x1d3)+_0x2ecea7(0xfe)])));const _0x55826a=_0xf108f6[_0x2ecea7(0x1a4)](_0x52064a,_0x40d7ac),_0x545d99=Math['round'](_0x52064a*0.5),_0x3b7825=Math['round'](_0x40d7ac*0.4);let _0x42ccda=SignalStrength[_0x2ecea7(0x15e)+_0x2ecea7(0x17b)];if(_0xf108f6[_0x2ecea7(0x159)](_0x35627b,0.85))_0x42ccda=SignalStrength[_0x2ecea7(0x132)+_0x2ecea7(0x1b9)+'G'];else{if(_0xf108f6[_0x2ecea7(0x159)](_0x35627b,0.75))_0x42ccda=SignalStrength[_0x2ecea7(0x1b9)+'G'];else{if(_0xf108f6['SKHaC'](_0x35627b,0.6))_0x42ccda=SignalStrength['WEAK'];}}const _0x6ff75d=_0xf108f6[_0x2ecea7(0x100)](0.5,_0xf108f6[_0x2ecea7(0x11c)](_0x35627b,0.5)*0.4),_0x53191b=_0xf108f6[_0x2ecea7(0x1c1)](_0xf108f6[_0x2ecea7(0x205)](_0x6ff75d,Math[_0x2ecea7(0x198)](_0x4f7424-_0x1d1fd3)),_0xf108f6[_0x2ecea7(0x157)](0x1-_0x6ff75d,Math['abs'](_0xf108f6[_0x2ecea7(0x11c)](_0x1d1fd3,_0x3ab992))));return{'id':uuidv4(),'timestamp':Date[_0x2ecea7(0x17c)](),'symbol':_0xf108f6[_0x2ecea7(0xf5)](extractBaseSymbol,_0x437f43),'contractId':_0x437f43,'side':_0xf108f6[_0x2ecea7(0xf8)](_0x399bc2,_0x2ecea7(0x163))?OrderSide[_0x2ecea7(0x176)]:OrderSide[_0x2ecea7(0x1de)],'direction':_0x399bc2,'strategy':_0xf108f6[_0x2ecea7(0x167)],'strength':_0x42ccda,'edge':_0x53191b,'confidence':_0x35627b,'entry':_0x1d1fd3,'entryPrice':_0x1d1fd3,'stopLoss':_0x3ab992,'takeProfit':_0x4f7424,'riskReward':_0x55826a,'stopTicks':_0x40d7ac,'targetTicks':_0x52064a,'trailTriggerTicks':_0x545d99,'trailDistanceTicks':_0x3b7825,'beBreakeven':_0x39c161,'profitLockLevel':_0x1e3ce3,'zScore':_0x5e5204,'zScoreExit':this[_0x2ecea7(0x122)+_0x2ecea7(0x1df)+_0x2ecea7(0x1a7)+_0x2ecea7(0x1fd)],'vpinValue':_0xc6a39d,'kyleLambda':_0x3fc74f,'kalmanEstimate':_0x2c21b6,'volatilityRegime':_0x25fff4,'ofiValue':_0x2fdc87,'models':_0x5351b4};}[_0x4d9e43(0x153)+_0x4d9e43(0x15a)+_0x4d9e43(0x104)+_0x4d9e43(0x1d5)](_0x3cf109){const _0x28d01f=_0x4d9e43,_0x46cda8={};_0x46cda8[_0x28d01f(0x1be)]=function(_0x3defad,_0x54cf0c){return _0x3defad<_0x54cf0c;};const _0x55731d=_0x46cda8,_0x3da714=this[_0x28d01f(0x13d)+_0x28d01f(0x1b3)+'r'][_0x28d01f(0x1c2)](_0x3cf109);if(!_0x3da714||_0x3da714[_0x28d01f(0x1e0)+'h']<0x32)return![];const _0xab23d5=this[_0x28d01f(0x224)+_0x28d01f(0x20e)+'core'](_0x3da714);return _0x55731d[_0x28d01f(0x1be)](Math[_0x28d01f(0x198)](_0xab23d5),this[_0x28d01f(0x122)+_0x28d01f(0x1df)+_0x28d01f(0x1a7)+_0x28d01f(0x1fd)]);}['getMo'+_0x4d9e43(0x143)+_0x4d9e43(0xf2)](_0x2ce134){const _0x5c0ebc=_0x4d9e43,_0x3fbdfe={};_0x3fbdfe[_0x5c0ebc(0x207)]=function(_0x2dc8c6,_0x46014a){return _0x2dc8c6||_0x46014a;},_0x3fbdfe[_0x5c0ebc(0x11b)]=function(_0x3a8573,_0x4655ea){return _0x3a8573<_0x4655ea;},_0x3fbdfe[_0x5c0ebc(0x22c)]=function(_0x2772a2,_0x3a4bc2){return _0x2772a2+_0x3a4bc2;},_0x3fbdfe['jIkZL']=function(_0x17d460,_0x430014){return _0x17d460*_0x430014;};const _0x5a64f1=_0x3fbdfe,_0x318323=this[_0x5c0ebc(0x13d)+_0x5c0ebc(0x1b3)+'r'][_0x5c0ebc(0x1c2)](_0x2ce134),_0x17c0b2=this['volum'+_0x5c0ebc(0x185)+'er']['get'](_0x2ce134),_0x417ec6=this[_0x5c0ebc(0x171)+_0x5c0ebc(0x1ca)]['get'](_0x2ce134);if(_0x5a64f1[_0x5c0ebc(0x207)](!_0x318323,!_0x17c0b2)||!_0x417ec6||_0x5a64f1[_0x5c0ebc(0x11b)](_0x417ec6[_0x5c0ebc(0x1e0)+'h'],0x32))return null;return{'zscore':this[_0x5c0ebc(0x224)+_0x5c0ebc(0x20e)+_0x5c0ebc(0x17f)](_0x318323)[_0x5c0ebc(0x213)+'ed'](0x2),'vpin':_0x5a64f1[_0x5c0ebc(0x22c)]((this['_comp'+_0x5c0ebc(0x1b4)+'IN'](_0x17c0b2)*0x64)[_0x5c0ebc(0x213)+'ed'](0x1),'%'),'ofi':_0x5a64f1[_0x5c0ebc(0x22c)](_0x5a64f1[_0x5c0ebc(0x18e)](this['_comp'+_0x5c0ebc(0x13b)+_0x5c0ebc(0x1e8)+_0x5c0ebc(0x114)+_0x5c0ebc(0x19d)+'e'](_0x417ec6),0x64)[_0x5c0ebc(0x213)+'ed'](0x1),'%'),'bars':_0x417ec6[_0x5c0ebc(0x1e0)+'h']};}['recor'+_0x4d9e43(0x19c)+_0x4d9e43(0x235)+'lt'](_0x37578e){const _0x1f4dad=_0x4d9e43,_0x38a40b={};_0x38a40b[_0x1f4dad(0x10a)]=function(_0x116f0f,_0x11548a){return _0x116f0f>_0x11548a;},_0x38a40b[_0x1f4dad(0x221)]=function(_0x1b4b14,_0x553663){return _0x1b4b14>_0x553663;},_0x38a40b[_0x1f4dad(0x11d)]=function(_0x5daa2f,_0x2755c1){return _0x5daa2f===_0x2755c1;},_0x38a40b[_0x1f4dad(0x1bd)]=_0x1f4dad(0x1d7);const _0x2af6f4=_0x38a40b;this[_0x1f4dad(0x1e6)+'tTrad'+'es'][_0x1f4dad(0x139)]({'pnl':_0x37578e,'timestamp':Date[_0x1f4dad(0x17c)]()});if(_0x2af6f4[_0x1f4dad(0x10a)](this[_0x1f4dad(0x1e6)+'tTrad'+'es'][_0x1f4dad(0x1e0)+'h'],0x64))this[_0x1f4dad(0x1e6)+'tTrad'+'es'][_0x1f4dad(0x15d)]();_0x2af6f4['DPMrV'](_0x37578e,0x0)?_0x2af6f4[_0x1f4dad(0x11d)]('AnZgs',_0x2af6f4[_0x1f4dad(0x1bd)])?(this['winSt'+_0x1f4dad(0x1db)]++,this[_0x1f4dad(0x212)+_0x1f4dad(0x175)]=0x0):(this['winSt'+_0x1f4dad(0x1db)]++,this[_0x1f4dad(0x212)+_0x1f4dad(0x175)]=0x0):(this[_0x1f4dad(0x212)+_0x1f4dad(0x175)]++,this[_0x1f4dad(0x202)+_0x1f4dad(0x1db)]=0x0);}['getBa'+_0x4d9e43(0x138)+_0x4d9e43(0x1dc)](_0x1b43b7){const _0x421652=_0x4d9e43;return this[_0x421652(0x171)+_0x421652(0x1ca)][_0x421652(0x1c2)](_0x1b43b7)||[];}['reset'](_0x345829){const _0x12538a=_0x4d9e43,_0xbfcedc={};_0xbfcedc[_0x12538a(0x1ce)]=_0x12538a(0x12d)+'|0|6|'+_0x12538a(0x129);const _0x1e7281=_0xbfcedc,_0x58110a=_0x1e7281[_0x12538a(0x1ce)]['split']('|');let _0x17a614=0x0;while(!![]){switch(_0x58110a[_0x17a614++]){case'0':this['trade'+_0x12538a(0x120)+'er']['set'](_0x345829,[]);continue;case'1':const _0x3b59fa={};_0x3b59fa[_0x12538a(0x135)+_0x12538a(0x215)]=0x0,_0x3b59fa[_0x12538a(0x183)+_0x12538a(0x125)+_0x12538a(0x124)]=0x1,this[_0x12538a(0x195)+_0x12538a(0x133)+'es']['set'](_0x345829,_0x3b59fa);continue;case'2':this['price'+_0x12538a(0x1b3)+'r']['set'](_0x345829,[]);continue;case'3':this[_0x12538a(0x22a)+_0x12538a(0x17a)+'e'][_0x12538a(0x1d4)](_0x345829,0x0);continue;case'4':this['volum'+'eBuff'+'er'][_0x12538a(0x1d4)](_0x345829,[]);continue;case'5':this[_0x12538a(0x171)+_0x12538a(0x1ca)][_0x12538a(0x1d4)](_0x345829,[]);continue;case'6':this[_0x12538a(0x223)+_0x12538a(0x1ca)][_0x12538a(0x1d4)](_0x345829,[]);continue;case'7':this[_0x12538a(0x1f3)+_0x12538a(0x140)][_0x12538a(0x1d4)](_0x345829,[]);continue;}break;}}}const M1=new HQXUltraScalpingStrategy(),_0x44628f={};_0x44628f['M1']=M1,_0x44628f[_0x4d9e43(0x1bf)+_0x4d9e43(0x21a)+_0x4d9e43(0x152)+_0x4d9e43(0x165)+_0x4d9e43(0x126)]=HQXUltraScalpingStrategy,_0x44628f[_0x4d9e43(0x16f)+_0x4d9e43(0x14c)]=OrderSide,_0x44628f[_0x4d9e43(0x13c)+_0x4d9e43(0x112)+_0x4d9e43(0x1d8)]=SignalStrength,module[_0x4d9e43(0x1b1)+'ts']=_0x44628f;
@@ -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.10",
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
 
@@ -173,6 +173,7 @@ const launchAlgo = async (service, account, contract, config) => {
173
173
  const contractId = contract.id;
174
174
  const connectionType = account.platform || 'ProjectX';
175
175
  const tickSize = contract.tickSize || 0.25;
176
+ const tickValue = contract.tickValue || 5.0;
176
177
 
177
178
  const ui = new AlgoUI({ subtitle: 'HQX Ultra Scalping', mode: 'one-account' });
178
179
 
@@ -200,9 +201,9 @@ const launchAlgo = async (service, account, contract, config) => {
200
201
  let pendingOrder = false; // Prevent duplicate orders
201
202
  let tickCount = 0;
202
203
 
203
- // Initialize Strategy
204
- const strategy = new M1({ tickSize });
205
- strategy.initialize(contractId, tickSize);
204
+ // Initialize Strategy (M1 is singleton instance)
205
+ const strategy = M1;
206
+ strategy.initialize(contractId, tickSize, tickValue);
206
207
 
207
208
  // Initialize Market Data Feed
208
209
  const marketFeed = new MarketDataFeed({ propfirm: account.propfirm });
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 };