text: Title: Trend Regularity Adaptive Moving Average [LUX]
  Body: Would be awesome to see this indicator on pandas_ta! It's a moving average that adapts to the current trend by taking into account the average of high/lows during a selected period. Link: https://www.tradingview.com/v/p8wGCPi6/
  
  Pinescript code:
  ```
  // This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/
  // © LuxAlgo
  
  //@version=4
  study("Trend Regularity Adaptive Moving Average","TRAMA",overlay=true)
  length=input(99),src = input(close)
  //----
  ama = 0.
  hh = max(sign(change(highest(length))),0)
  ll = max(sign(change(lowest(length))*-1),0)
  tc = pow(sma(hh or ll ? 1 : 0,length),2)
  ama := nz(ama[1]+tc*(src-ama[1]),src)
  plot(ama,"Plot",#ff1100,2)
  ```
  
  My attempt: i'm not so good at pinescript, and i'm having a lot of troubles understanding how to translate the lines `tc = pow(sma(hh or ll ? 1 : 0,length),2)` and `ama := nz(ama[1]+tc*(src-ama[1]),src)` to Python. 
  
  Until now i managed to convert the first lines to Python, but i'm not sure if i'm doing it right:
  ```python
  #for each row's close, get the highest value in the last n rows
  ohlcv['hh'] = ohlcv['close'].rolling(window=99).max().shift(1).fillna(0)
  ohlcv['ll'] = ohlcv['close'].rolling(window=99).min().shift(1).fillna(0)
  ohlcv['ll'] = ohlcv['ll']*-1
  
  #diff between current hh row and previous row
  ohlcv['hh'] = ohlcv['hh'].diff()
  ohlcv['ll'] = ohlcv['hh'].diff()
  
  #set ohlcv['hh'] to 1 if it's greater than 0, 0 if equal to zero else -1
  ohlcv['hh'] = np.where(ohlcv['hh'] > 0, 1, np.where(ohlcv['hh'] == 0, 0, -1))
  ohlcv['ll'] = np.where(ohlcv['ll'] > 0, 1, np.where(ohlcv['ll'] == 0, 0, -1))
  
  #set ohlcv['hh'] to ohlcv['hh'] if higher than 0, else 0
  ohlcv['hh'] = np.where(ohlcv['hh'] > 0, ohlcv['hh'], 0)
  ohlcv['ll'] = np.where(ohlcv['ll'] > 0, ohlcv['ll'], 0)
  ```
  
  
  
  