[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [GT] recursive object aliases
As a reminder, aliases can also be set via the --options command line switch. This way the options files do not need to be changed to experiment with aliases:
582 % ./display_signal.pl --tight --change --option="Aliases::Signals::Sig={S:Generic:CrossOverUp #1 #2}" @S:Sig SPY {I:EMA 10} {I:EMA 30}
Testing signal CrossOverUp[{I:EMA 10 {I:Prices CLOSE}}, {I:EMA 30 {I:Prices CLOSE}}] ...
[Date] = CrossOverUp[{I:EMA 10 {I:Prices CLOSE}}, {I:EMA 30 {I:Prices CLOSE}}]
[2006-06-21] = no
[2006-07-06] = yes
[2006-07-07] = no
[2006-07-27] = yes
[2006-07-28] = no
[2007-03-23] = yes
[2007-03-26] = no
[2007-07-02] = yes
[2007-07-03] = no
[2007-09-13] = yes
[2007-09-14] = no
[2007-12-07] = yes
[2007-12-10] = no
[2007-12-26] = yes
[2007-12-27] = no
[2008-04-02] = yes
[2008-04-03] = no
Obviously, in this trivial example that won't make much of a difference to expanding the alias, but in complex situations with multiple recursive aliases this might come in handy...