I am a new trader and I want to have an indicator that I think is simple, but I can't find it on their list of indicators. The indicator would be the value of the greatest distance between a bar's OHLC and another indicator. Of course, really you can ignore Open/Close, because Hi or Low will always be the point to measure to.
Example 1: my base indicator is a 50-period simple moving average. The "new indicator" would show me the furthest distance between the SMA and the bar's range: (High price - SMA price) if the candle is above SMA, (SMA price - Low price) if the candle is below SMA, and if the SMA is within the range of the candle, it would pick whichever is further away.
Simple, right? Is there already an indicator for this?
Example 2: my base indicator is the Ichimoku indicator's "Tenkan Sen" or "Conversion Line." The "new indicator" that I would like you to program will tell me the distance between the Tenkan Sen and the furthest distance within the bar's range (just as above).
The indicator can be expressed in terms of dollars or percent; and can be an oscillator or the absolute value.
If you think this project is more difficult than a micro project, let me know. I figure this can be banged out in 10 minutes by an experienced Pine Editor, it seems so simple. But of course, I'm not a programmer. So we can discuss price if this is more difficult than I think it is.