Is it possible to separately add alert code to any indicator? Does it work?

1 View
Marta Greene
Answered 3 months, 4 weeks ago
<p id="isPasted">I think this is what your looking for, remember following an indicator blindly probably wont work look for other factors in your trades.</p><p><br></p><p>indicator(title='Heiken Ashi Pivot Blue Candle over Regular Candles', overlay=true)</p><p>ha_handle = ticker.heikinashi(syminfo.tickerid)</p><p>ha_open = request.security(ha_handle, timeframe.period, open)</p><p>ha_close = request.security(ha_handle, timeframe.period, close)</p><p>o = request.security(syminfo.tickerid, timeframe.period, open)</p><p>c = request.security(syminfo.tickerid, timeframe.period, close)</p><p>col_blue = #32a7ff</p><p>col_green = #669b66</p><p>col_black = #550000</p><p>col_red = #e54444</p><p>ha1 = ha_close &gt; ha_open ? col_blue : col_black</p><p>ha2 = ha_close[1] &gt; ha_open[1] ? col_blue : col_black</p><p>ha3 = ha1 == ha2 ? color.white : ha1</p><p>ha11 = ha_close &gt; ha_open ? …</p>