For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

Calculate EMA on the median ((high+low/2)) ?



  • Where can I change the data point from the close to the median price? Also, how can I increase the decimal's displayed for an indicator? For example, a TRIX indicator that shows x.xx values default and be able to display x.xxxx. Thanks!!



  • To get a line for ema as you ask...

    self.myema = bt.ind.EMA((self.datas[0].high / self.datas[0].low) /2 )
    

    When printing use the format

    :.4f
    

Log in to reply
 

});