Node com.nodelab.equity.TraderVolumes

com.nodelab.0.10384
Instance of TypeScriptInfo

Node dataValue
org.edgescript.TypeScriptInfo.prerequisiteParcelsList{}
org.edgescript.TypeScriptInfo.prerequisiteMethodsList{}
org.edgescript.TypeScriptInfo.script/* (aBaliPluginTable tableAspect value = #traderVolumes or: [aBaliPluginTable tableAspect value = #traderVolumesSpan]) ifTrue: [ aBaliPluginTable tableAspect value = #traderVolumes ifTrue: [ from := BaliTime fromSeconds: (aBaliPluginTable display dimHistory focus daysStart asSeconds + (3600 * 10)). to := aBaliPluginTable display dimHistory focus daysEnd] ifFalse: [ from := BaliTime fromSeconds: (aBaliPluginTable display dimHistory from daysStart asSeconds + (3600 * 10)). to := aBaliPluginTable display dimHistory to daysEnd. (Dialog confirm: 'You want to scan the period ' , (from printType: #day) , ' to ' , (to printType: #day) , '?') ifFalse: [^nil]]. list := List new. buyVol := 0. buyValue := 0. env := aBaliPluginTable display envDimensions. last := self valueAspect: #value environment: env. self musician tradersFrom: from to: to block: [:an | list add: (an at: 1) , ' '. list add: (GotheTools formatInteger: (an at: 2)) , ' '. buyVol := buyVol + (an at: 2). buyValue := buyValue + (an at: 3). (an at: 2) > 0 ifTrue: [aveBuy := (an at: 3) / (an at: 2)] ifFalse: [aveBuy := 0]. list add: (GotheTools formatFloat: aveBuy digits: 2) , ' '. list add: (GotheTools formatInteger: (an at: 4)) , ' '. (an at: 4) > 0 ifTrue: [aveSell := (an at: 5) / (an at: 4)] ifFalse: [aveSell := 0]. list add: (GotheTools formatFloat: aveSell digits: 2) , ' '. list add: (GotheTools formatInteger: ((an at: 2) - (an at: 4))) , ' '. (an at: 2) > (an at: 4) ifTrue: [list add: (GotheTools formatFloat: aveBuy digits: 2) , ' '.] ifFalse: [list add: (GotheTools formatFloat: aveSell digits: 2) , ' '.]. (an at: 2) > (an at: 4) ifTrue: [ profit := (an at: 4) * (aveSell - aveBuy). value := ((an at: 2) - (an at: 4)) * (last - aveBuy)] ifFalse: [ profit := (an at: 2) * (aveSell - aveBuy). value := ((an at: 4) - (an at: 2)) * (aveSell - last)]. list add: (GotheTools formatFloat: profit digits: 2) , ' '. list add: (GotheTools formatFloat: value digits: 2) , ' '. list add: (an at: 1) , ' '.]. list add: ''; add: (GotheTools formatInteger: buyVol) , ' '; add: (GotheTools formatFloat: buyValue digits: 2). list add: ''; add: 'ave ' , (GotheTools formatFloat: buyValue / buyVol digits: 2) , ' '; add: ''; add: ''; add: ''. list add: 'last ' , (GotheTools formatFloat: last digits: 2) , ' '; add: ''. list add: aBaliPluginTable firstSource name , ' '. list add: (from printType: #hour) , ' -' , ' '. list add: (to printType: #hour) , ' '. list addAll: #('' '' '' 'timestamp '). list add: (self server now printType: #hour) , ' '. list add: ''; add: ''. aBaliPluginTable tableList: (TwoDList on: list columns: 10). aBaliPluginTable table columnLabelsFormats: #right. aBaliPluginTable table elementFormats: #right. aBaliPluginTable table columnLabelsArray: #('trader ' 'buy volume ' 'buy price ' 'sell volume ' 'sell price ' 'net volume ' 'net price ' 'cash profit ' 'poss. profit' ''). ^nil]. */
org.edgescript.TypeScriptInfo.defineTypecom.nodelab.equity.TraderVolumes
org.edgescript.TypeScriptInfo.prerequisiteScriptsList{}