| com.nodelab.equity | ![]() |
com.nodelab.0.10181
Instance of Type
Inheriting from Calculator
| Type data | Value |
| org.uninode.Type.displayPattern | a {att:org.uninode.Node.type} |
| org.uninode.Resource.resourceType | |
| org.uninode.Resource.label | |
| org.uninode.Resource.resourceOf | List{} |
| org.uninode.Listable.resources | Reference[org.uninode.Listable.resources] of com.nodelab.equity.VolumeShares |
| Attribute summary | Defined in | Uninode® Id | Properties | Default | |
| Reference[org.uninode.Listable.resources] | resources | Listable | org.uninode.0.2001 | type | |
| String | toString This is the display string. | Node | org.uninode.0.102 | ||
| Type | type The type of an object determines the behaviour and attributes of the object. | Node | org.uninode.0.101 | ||
| String | uri | Node | org.uninode.0.103 | ||
| String | label | Resource | org.uninode.0.2041 | type | |
| List[Type] | resourceOf | Resource | org.uninode.0.2042 | type | |
| Signature | resourceType This defines the type of resource. It can be 'view', 'adapter' or 'action' | Resource | org.uninode.0.2043 | type | |
| Script summary |
com.nodelab.0.10386/*
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!
*/ |