I found a better way:
just add a movav parameter when you use the ATR indicator like this:
bt.indicators.AverageTrueRange(self.data0, period=20, movav=MovAv.Simple)
For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
G
Latest posts made by gaojb
-
RE: ATR difference with Metatrader? + original welles wilder version
-
RE: ATR difference with Metatrader? + original welles wilder version
If you want to use simple moving average for ATR, you can simply use the MovAv.Simple instead of MovAv.Smoothed in the original indicator's params.