[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [system-traders] Re: [GT] EMA.pm



* Flatman <flatman
AT
swing.be> wrote:
|
| I got this drawback with EMA and SMA however ....
| 
| When using these indicators on another data-serie as in :
| graphic.pl SOLB.BR --add="Curve(Indicators::SMA 5 {Indicators::Prices CLOSE ^DJI},[255,0,0])"
| 
| an error occurs if there's no data for ^DJI on a day where there's a
| data for the main stock.
| 
| (This happens for holidays in US that are not holidays in the rest of
| the world) .
| 
| In that case EMA and SMA should use the quote of the last known day
| before the specific day ... This is ok for MACD for example !
| 


I wrote a script to populate my database with the 'missing' (well, not
really missing) quotes for the indexes.
As this is a workaround for the above problem, I don't think it is the
way it should work ...
I'm thinking about hacking EMA and SMA for this ... is this the place
where it should be modified ? I can think also about changing
Indicators::Prices or even DB.pm ... ? What's the best place ?

Erik