SuperTrend CCI ATR Combo Watchlist Bar Count


Category:
0
0

Hi Pete, how’re you? Hope you and your family are all well and sound. I was hopping you can help me out or give me some feedback. I found your bar count function from: https://www.hahn-tech.com/ans/display-bars-since-cross-above-hma/

Tried to adapt to one of watchlist I’m using wich is kind of cambo signal between supertrend, cci and atr. I try modified by integrating your count function, however I’m not getting what I expected… right now just it show me 1 and -1. Script attached and Image of what I was trying accomplish. Hope you can give me some pointers what I’m missing or I’m doing wrong.

Original Signal:
#plot ST_ATR_COMBO = if C> ST and C>CCI_ATR_TREND then 4 else if c< ST and c<CCI_ATR_TREND then -4 else 0;

Marked as spam
Posted by (Questions: 1, Answers: 1)
Asked on April 12, 2021 11:16 pm
247 views
1
Private answer

Works perfectly when I try it.

A word of caution for those learning how to code. The code provided by the author of this post breaks virtually every rule of properly formatted code. (This is not criticism, this is an advisory to those learning how to code that they should avoid using this code for learning how to write code properly)

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on April 13, 2021 10:44 am
0
Hi Pete, Thanks for note of caution in regards to code, although I agree I have seen other a much more eloquently written codes. Today, tried watch list during market hours and it does appear to be working, although I must admit I think its a bit clunky. On some stock count appear to be working while on other for some reason its off, maybe is due to clunky script or I might not signal firing/identify properly. Not sure... will try play with and try identify issue. Once again, thank you for you prompt feedback and responses. Izet
( at April 13, 2021 2:50 pm)