[]
NEXT STOP 23800..?? for NSE:NIFTY by Wealthcam — TradingView {“use strict”;const t=/(?:^|;)s*theme=(dark|light)(?:;|$)|$/.exec(document.cookie)[1];t&&(document.documentElement.classList.toggle(“theme-dark”,”dark”===t),document.documentElement.classList.toggle(“theme-light”,”light”===t),window.initData=window.initData||{},window.initData.theme=t)})(); ]]> {“use strict”;”undefined”!=typeof window&&”undefined”!=typeof navigator&&/mac/i.test(navigator.platform)&&document.documentElement.classList.add(“mac_os_system”)})(); ]]> {“use strict”;function e(e,t=!1){const{searchParams:s}=new URL(String(location));let n=”true”===s.get(“mobileapp_new”),o=”true”===s.get(“mobileapp”);if(!t){const e=function(e){const t=e+”=”,s=document.cookie.split(“;”);for(let e=0;e{},s=”~m~”;class n{constructor(e,t={}){this.sessionid=null,this.connected=!1,this._timeout=null,this._base=e,this._options={timeout:t.timeout||2e4,connectionType:t.connectionType}}connect(){this._socket=new WebSocket(this._prepareUrl()),this._socket.onmessage=e=>{if(“string”!=typeof e.data)throw new TypeError(`The WebSocket message should be a string. Recieved ${Object.prototype.toString.call(e.data)}`);this._onData(e.data)},this._socket.onclose=this._onClose.bind(this),this._socket.onerror=this._onError.bind(this)}send(e){this._socket&&this._socket.send(this._encode(e))}disconnect(){this._clearIdleTimeout(),this._socket&&(this._socket.onmessage=t,this._socket.onclose=t,this._socket.onerror=t,this._socket.close())}_clearIdleTimeout(){null!==this._timeout&&(clearTimeout(this._timeout),this._timeout=null)}_encode(e){let t,o=””;const i=Array.isArray(e)?e:[e],c=i.length;for(let e=0;e=20}isMaxReconnects(){return this._reconnectCount>=20}getPingInfo(){return this._pingInfo||null}_tryGetProHost(){return window.TradingView&&window.TradingView.onChartPage&&”battle”===window.environment&&!this._redirectCount&&-1===window.location.href.indexOf(“ws_host”)?this._initialHost?this._initialHost:void 0!==window.user&&window.user.pro_plan?this._proHost||this._suggestedHost:null:null}_queueMessage(e){0===this._queueStack.length&&this._logMessage(0,”Socket is not connected. Queued a message”),this._queueStack.push(e)}_processMessageQueue(){0!==this._queueStack.length&&(this._logMessage(0,”Processing queued messages”),this._queueStack.forEach(this.send.bind(this)),this._logMessage(0,”Processed “+this._queueStack.length+” messages”),this._queueStack=[])}_onDisconnect(e){this._noReconnectAfterTimeout||null!==this._reconnectTimeout||(this._reconnectTimeout=setTimeout(this._tryReconnect.bind(this),5e3)),this._clearOnlineCancellationToken();let t=”disconnect session:”+this.getSessionId();e&&(t+=”, code:”+e.code+”, reason:”+e.reason,1005===e.code&&this._sendTelemetry(“websocket_code_1005″)),this._logMessage(0,t),this._propagateDisconnect(e),this._closeSocket(),this._queueStack=[]}_closeSocket(){null!==this._socket&&(this._socket.offAll(),this._socket.disconnect(),this._socket=null)}_logMessage(e,t){const s={method:e,message:t};this._logger?this._flushLogMessage(s):(s.message=`[${(new Date).toISOString()}] ${s.message}`,this._logsQueue.push(s))}_flushLogMessage(e){switch(e.method){case 2:this._logger.logDebug(e.message);break;case 3:this._logger.logError(e.message);break;case 0:this._logger.logInfo(e.message);break;case 1:this._logger.logNormal(e.message)}}_flushLogs(){this._flushLogMessage({method:1,message:”messages from queue. Start.”}),this._logsQueue.forEach((e=>{this._flushLogMessage(e)})),this._flushLogMessage({method:1,message:”messages from queue. End.”}),this._logsQueue=[]}_sendTelemetry(e,t){const s={event:e,params:t};this._telemetry?this._flushTelemetryObject(s):this._telemetryObjectsQueue.push(s)}_flushTelemetryObject(e){this._telemetry.sendChartReport(e.event,e.params,!1)}_flushTelemetry(){this._telemetryObjectsQueue.forEach((e=>{this._flushTelemetryObject(e)})),this._telemetryObjectsQueue=[]}_doConnect(){ this._socket&&(this._socket.isConnected()||this._socket.isConnecting())||(this._clearOnlineCancellationToken(),this._host=this.getHost(),this._socket=new o(this._host,{timeout:this._dataRequestTimeout,connectionType:this._connectionType}),this._logMessage(0,”Connecting to “+this._host),this._bindEvents(),this._disconnectCallbacks=[],this._connectionStart=performance.now(),this._connectionEstablished=null,this._socket.connect(),performance.mark(“SWSC”,{detail:”Start WebSocket connection”}),this._socket.on(“connect”,(()=>{performance.mark(“EWSC”,{detail:”End WebSocket connection”}),performance.measure(“WebSocket connection delay”,”SWSC”,”EWSC”)})))}_propagateDisconnect(e){const t=this._disconnectCallbacks.length;for(let s=0;s{const e=this.getSessionId();if(“string”==typeof e){const t=JSON.parse(e);if(t.redirect)return this._redirectCount+=1,this._suggestedHost=t.redirect,this.isMaxRedirects()&&this._sendTelemetry(“redirect_bailout”),void this._redirect()}this._connectionEstablished=performance.now(),this._processMessageQueue(),this._logMessage(0,”connect session:”+e)})),this._socket.on(“disconnect”,this._onDisconnect.bind(this)),this._socket.on(“close”,this._onDisconnect.bind(this)),this._socket.on(“error”,(e=>{this._logMessage(0,new Date+” session:”+this.getSessionId()+” websocket error:”+JSON.stringify(e)),this._sendTelemetry(“websocket_error”),this._errorsCount++,!this._errorsInfoSent&&this._errorsCount>=c&&(void 0!==this._lastConnectCallStack&&(this._sendTelemetry(“websocket_error_connect_stack”,{text:this._lastConnectCallStack}),delete this._lastConnectCallStack),void 0!==this._getLogHistory&&this._sendTelemetry(“websocket_error_log”,{text:this._getLogHistory(50).join(“n”)}),this._errorsInfoSent=!0)})))}_redirect(){this.disconnect(),this._reconnectWhenOnline()}_tryReconnect(){this._tryConnect()&&(this._reconnectCount+=1)}_tryConnect(){return!this._isConnectionForbidden&&(this._clearReconnectTimeout(),this._lastConnectCallStack=new Error(`WebSocket connect stack. Is connected: ${this.isConnected()}.`).stack||””,!this.isConnected()&&(this.disconnect(),this._reconnectWhenOnline(),!0))}_clearOnlineCancellationToken(){this._onlineCancellationToken&&(this._onlineCancellationToken(),this._onlineCancellationToken=null)}_clearReconnectTimeout(){null!==this._reconnectTimeout&&(clearTimeout(this._reconnectTimeout),this._reconnectTimeout=null)}_reconnectWhenOnline(){if(navigator.onLine)return this._logMessage(0,”Network status: online – trying to connect”),this._doConnect(),void(this._onReconnect&&this._onReconnect());this._logMessage(0,”Network status: offline – wait until online”),this._onlineCancellationToken=function(e){let t=e;const s=()=>{window.removeEventListener(“online”,s),t&&t()};return window.addEventListener(“online”,s),()=>{t=null}}((()=>{this._logMessage(0,”Network status changed to online – trying to connect”),this._doConnect(),this._onReconnect&&this._onReconnect()}))}_onTelemetrySent(e){ “websocket_error”in e&&(this._errorsCount=0,this._errorsInfoSent=!1)}_startPing(){if(this._pingIntervalId)return;const e=i(this.getHost());e.pathname+=”ping”,e.protocol=”https:”;let t=0,s=0;const n=e=>{this._pingInfo=this._pingInfo||{max:0,min:1/0,avg:0};const n=(new Date).getTime()-e;n>this._pingInfo.max&&(this._pingInfo.max=n),n=10&&this._pingIntervalId&&(clearInterval(this._pingIntervalId),delete this._pingIntervalId)};this._pingIntervalId=setInterval((()=>{const t=(new Date).getTime(),s=new XMLHttpRequest;s.open(“GET”,e,!0),s.send(),s.onreadystatechange=()=>{s.readyState===XMLHttpRequest.DONE&&200===s.status&&n(t)}}),1e4)}}window.WSBackendConnection=new r(window.WEBSOCKET_HOST,{pingRequired:window.WS_HOST_PING_REQUIRED,proHost:window.WEBSOCKET_PRO_HOST,reconnectHost:window.WEBSOCKET_HOST_FOR_RECONNECT,initialHost:window.WEBSOCKET_INITIAL_HOST,connectionType:window.WEBSOCKET_CONNECTION_TYPE}),window.WSBackendConnectionCtor=r})(); ]]> {“use strict”;window.initData=window.initData||{},window.initData.block_widgetbar=function(i,t,n,a){function w(n){const w={resizerBridge:new t(window).allocate({areaName:”right”}),affectsLayout:()=>!0,adaptive:!0,settingsPrefix:”widgetbar”,instantLoad:n,configuration:a};window.widgetbar=new i(w)}window.is_authenticated?w():window.loginStateChange.subscribe(this,(i=>{!i&&!window.widgetbar&&window.user&&window.is_authenticated&&w(!0)}))}})();]]>{“use strict”;function n(){const n=parseFloat(document.body.style.paddingRight||”0″);document.body.classList.toggle(“is-widgetbar-expanded”,n>45)}n(),function(n){let t=null;function e(){null===t&&(t=window.requestAnimationFrame(i))}function i(){n(),t=null}window.addEventListener(“resize”,e,!1)}(n)})();]]>

Shares: