Node com.nodelab.equity.VolumeShares

com.nodelab.0.10386
Instance of TypeScriptInfo

Node dataValue
org.edgescript.TypeScriptInfo.prerequisiteParcelsList{}
org.edgescript.TypeScriptInfo.prerequisiteMethodsList{}
org.edgescript.TypeScriptInfo.script/* aBaliPluginTable tableAspect value = #volumeShares ifTrue: [ from := aBaliPluginTable display dimHistory from. focus := aBaliPluginTable display dimHistory focus. daySet := Set new. env := aBaliPluginTable display envDimensions. env localAt: 'cond_history_resolution' put: #day. env localAt: 'cond_history_to' put: focus. self collectStepsDim: #dimHistory environment: env into: daySet. dayList := daySet asList. dayList sortWith: [:a :b | a < b]. i := 1. [i < dayList size] whileTrue: [ ((dayList at: i) equalTo: (dayList at: i + 1) type: #day) ifTrue: [dayList removeAtIndex: i] ifFalse: [i := i + 1]]. volumeTable := TwoDList columns: 8 rows: (rows := dayList size + 1). 1 to: 8 do: [:k | volumeTable at: k@rows put: 0]. 1 to: dayList size do: [:j | env localAt: 'cond_history_resolution' put: #hour. 11 to: 17 do: [:hr | env localAt: 'cond_history' put: (BaliTime fromSeconds: ((dayList at: j) daysStart asSeconds + (3600 * hr))). volumeTable at: (hr - 10)@j put: (self valueAspect: #volume environment: env)]. volumeTable at: 8@j put: (volumeTable at: 7@j). 17 to: 12 by: -1 do: [:hr | (val1 := volumeTable at: (hr-10)@j) isNil ifFalse: [ (val2 := volumeTable at: (hr-11)@j) isNil ifFalse: [ volumeTable at: (hr - 10)@j put: val1 - val2. j < dayList size ifTrue: [ volumeTable at: (hr - 10)@rows put: (volumeTable at: (hr - 10)@rows) + val1 - val2]]]]. j < dayList size ifTrue: [ (volumeTable at: 8@j) isNil ifFalse: [ volumeTable at: 8@rows put: (volumeTable at: 8@rows) + (volumeTable at: 8@j)]. (volumeTable at: 1@j) isNil ifFalse: [ volumeTable at: 1@rows put: (volumeTable at: 1@rows) + (volumeTable at: 1@j)]]]. dayList removeLast. list := List new. 11 to: 17 do: [:hr | list add: ((BaliTime fromSeconds: (focus daysStart asSeconds + (hr * 3600))) printType: #hour). list add: (GotheTools formatFloat: 100 * (volumeTable at: (hr - 10)@rows) / (volumeTable at: 8@rows) digits: 2) , '%'. list add: (GotheTools formatInteger: ((volumeTable at: (hr - 10)@rows) / dayList size) rounded). list add: (GotheTools formatInteger: (volumeTable at: (hr - 10)@(rows - 1))). ]. list add: 'Total'; add: ''; add: (GotheTools formatInteger: ((volumeTable at: 8@rows) / dayList size) rounded); add: (GotheTools formatInteger: (volumeTable at: 8@(rows - 1))). list add: ' day count'; add: dayList size printString; add: ''; add: ''. aBaliPluginTable tableList: (TwoDList on: list columns: 4). aBaliPluginTable table columnLabelsFormats: #right. aBaliPluginTable table elementFormats: #right. aBaliPluginTable table columnLabelsArray: #('time' 'prognosis' 'prognosis volume' 'actual volumes'). ^nil]. super setTableFor: aBaliPluginTable! */
org.edgescript.TypeScriptInfo.defineTypecom.nodelab.equity.VolumeShares
org.edgescript.TypeScriptInfo.prerequisiteScriptsList{}