Hi, I just started to get into Roassal (with Pharo 4.0) with the goal to visualize financial data like forex charts. The common visualization is by using japanese candlesticks [1] Because there is not predefined TRShape/ RTShape, I would need to create those shapes on my own. I suspect that this task can't be too complicated but because I'm that very new to Roassal, I'm asking for some hints and maybe code examples. The data needed to visualize one candlestick consists of a few numbers, e.g. 20150501 001300;1.120890;1.120910;1.120890;1.120900;0 (-> downloaded from [2]) First two numbers are Date and Time, the next four Numbers are: open, high, low, close, that last one is the volume and can be omitted. There is a bar to describe the price movement (open/ close) and wicks that describe the highest course and the lowest course during that time frame. The above data describes a One-Minute-Candle. So I'd really appreciate if anyone could give me hints or send me to the right direciction. regards Stefan
[1] http://en.wikipedia.org/wiki/Candlestick_chart [2] http://www.histdata.com/
Hi Stefan in Roassal2 there is Boxplot, similar as you want.
| b createList r d today | r := Random new. createList := [ :size :d1 :d2 | (1 to: size) collect: [ :i | d1 + (r next * (d2-d1))] ].
b := RTGrapher new. today := d := Date today. (1 to: 10) do: [ :i | | ds | ds := RTBoxPlotDataSet new. ds points: (createList value: 20 value: 0 value: 20). ds model: d. ds x: [ :date| date julianDayNumber - today julianDayNumber + 1 ]. b add: ds. d := d next.]. b build. ^ b view.
Try to create a subclass of RTAbstractDataSet, such as RTCandlestickDataset
Cheers, Milton
2015-05-23 6:54 GMT-04:00 Stefan Krecher stefan.krecher@gmail.com:
Hi, I just started to get into Roassal (with Pharo 4.0) with the goal to visualize financial data like forex charts. The common visualization is by using japanese candlesticks [1] Because there is not predefined TRShape/ RTShape, I would need to create those shapes on my own. I suspect that this task can't be too complicated but because I'm that very new to Roassal, I'm asking for some hints and maybe code examples. The data needed to visualize one candlestick consists of a few numbers, e.g. 20150501 001300;1.120890;1.120910;1.120890;1.120900;0 (-> downloaded from [2]) First two numbers are Date and Time, the next four Numbers are: open, high, low, close, that last one is the volume and can be omitted. There is a bar to describe the price movement (open/ close) and wicks that describe the highest course and the lowest course during that time frame. The above data describes a One-Minute-Candle. So I'd really appreciate if anyone could give me hints or send me to the right direciction. regards Stefan
[1] http://en.wikipedia.org/wiki/Candlestick_chart [2] http://www.histdata.com/
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Milton, thank you so much - I wasn't aware of that RTBoxPlotDataSet but managed to load it after a quick google research. It looks almost perfect - adding color shouldn't be that complicated. And I would need to ged rid of these horizontal lines on top of the wicks. Thank you for sending me to the right direction! Regards Stefan
2015-05-23 18:19 GMT+02:00 milton mamani akevalion@gmail.com:
Hi Stefan in Roassal2 there is Boxplot, similar as you want.
| b createList r d today | r := Random new. createList := [ :size :d1 :d2 | (1 to: size) collect: [ :i | d1 + (r next
- (d2-d1))] ].
b := RTGrapher new. today := d := Date today. (1 to: 10) do: [ :i | | ds | ds := RTBoxPlotDataSet new. ds points: (createList value: 20 value: 0 value: 20). ds model: d. ds x: [ :date| date julianDayNumber - today julianDayNumber + 1 ]. b add: ds. d := d next.]. b build. ^ b view.
Try to create a subclass of RTAbstractDataSet, such as RTC andlestickDataset
Cheers, Milton
2015-05-23 6:54 GMT-04:00 Stefan Krecher stefan.krecher@gmail.com:
Hi, I just started to get into Roassal (with Pharo 4.0) with the goal to visualize financial data like forex charts. The common visualization is by using japanese candlesticks [1] Because there is not predefined TRShape/ RTShape, I would need to create those shapes on my own. I suspect that this task can't be too complicated but because I'm that very new to Roassal, I'm asking for some hints and maybe code examples. The data needed to visualize one candlestick consists of a few numbers, e.g. 20150501 001300;1.120890;1.120910;1.120890;1.120900;0 (-> downloaded from [2]) First two numbers are Date and Time, the next four Numbers are: open, high, low, close, that last one is the volume and can be omitted. There is a bar to describe the price movement (open/ close) and wicks that describe the highest course and the lowest course during that time frame. The above data describes a One-Minute-Candle. So I'd really appreciate if anyone could give me hints or send me to the right direciction. regards Stefan
[1] http://en.wikipedia.org/wiki/Candlestick_chart [2] http://www.histdata.com/
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Hi Stefan,
Let us know how it goes…
Cheers, Alexandre
On May 23, 2015, at 9:57 PM, Stefan Krecher stefan.krecher@gmail.com wrote:
Milton, thank you so much - I wasn't aware of that RTBoxPlotDataSet but managed to load it after a quick google research. It looks almost perfect - adding color shouldn't be that complicated. And I would need to ged rid of these horizontal lines on top of the wicks. Thank you for sending me to the right direction! Regards Stefan
2015-05-23 18:19 GMT+02:00 milton mamani akevalion@gmail.com: Hi Stefan in Roassal2 there is Boxplot, similar as you want.
| b createList r d today | r := Random new. createList := [ :size :d1 :d2 | (1 to: size) collect: [ :i | d1 + (r next * (d2-d1))] ].
b := RTGrapher new. today := d := Date today. (1 to: 10) do: [ :i | | ds | ds := RTBoxPlotDataSet new. ds points: (createList value: 20 value: 0 value: 20). ds model: d. ds x: [ :date| date julianDayNumber - today julianDayNumber + 1 ]. b add: ds. d := d next.]. b build. ^ b view.
Try to create a subclass of RTAbstractDataSet, such as RTCandlestickDataset
Cheers, Milton
2015-05-23 6:54 GMT-04:00 Stefan Krecher stefan.krecher@gmail.com: Hi, I just started to get into Roassal (with Pharo 4.0) with the goal to visualize financial data like forex charts. The common visualization is by using japanese candlesticks [1] Because there is not predefined TRShape/ RTShape, I would need to create those shapes on my own. I suspect that this task can't be too complicated but because I'm that very new to Roassal, I'm asking for some hints and maybe code examples. The data needed to visualize one candlestick consists of a few numbers, e.g. 20150501 001300;1.120890;1.120910;1.120890;1.120900;0 (-> downloaded from [2]) First two numbers are Date and Time, the next four Numbers are: open, high, low, close, that last one is the volume and can be omitted. There is a bar to describe the price movement (open/ close) and wicks that describe the highest course and the lowest course during that time frame. The above data describes a One-Minute-Candle. So I'd really appreciate if anyone could give me hints or send me to the right direciction. regards Stefan
[1] http://en.wikipedia.org/wiki/Candlestick_chart [2] http://www.histdata.com/ _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev