0

When reading source code of ruleSignal, argument timestamp at line 66 is a very important input, but I could not figure out where timestamp data come from.

It seems that functions add.indicator, add.signal, add.rule, applyIndicators, applySignals, which run before ruleSignal don't use or generate timestamps values.

I wonder which function generates values of timestamp for ruleSignal to use, or where data of timestamp come from.

Thanks a lot!

Daniel
  • 1,428
  • 3
  • 16
  • 35

1 Answers1

0

Thanks to Brian Peterson's reply which answers my question:

indicators and signals are always presumed to be vectorized, per the documentation, so no timestamp is required.

rules, by default, are path dependent, and thus need a timestamp to operate from.

The path-dependent loop is outside of the individual rule function. see line 555 of rules.R

Daniel
  • 1,428
  • 3
  • 16
  • 35