(JS) Tip-and-Dip Oscillator 2.0

I am going to start taking requests to open source my indicators and this is the first one I decided to do. They will also be updated to Version 4 of Pinescript.

I went through and added notes on what each area of the code is, and in this particular case I added color schemes as a way to improve upon the original code.

Link to original:
Original Description:

"Let me start by saying I know that the name is goofy lol

This is an oscillator that that looks at price action vs. standard deviation in order to illustrate the trend. This thing looks like an Awesome Oscillator but the math behind this and the Awesome Oscillator are totally different (which is pretty interesting, given they look a lot alike). I included the Awesome Oscillator on the chart here so you can look at them and see where they are different.

So the Tip-and Dip Oscillator is meant to help you pinpoint tops and bottoms. I even added arrows where the top and bottom signals are given.

The oscillator itself has 3 colors, an up, down, and neutral color that come as green, red, and yellow. Since the readings given by the oscillator can greatly vary depending on the chart resolution, I included an option to edit the range to fit your chart.

Also - I have 4 different smoothing options that you can use depending on what your preference is. The default setting is the most sensitive so it will identify tops and bottoms more frequently, but it is the most accurate when pinpointing the correct reversal candle. As you smooth it out, the arrows will appear less, but my be slightly delayed and give a later reading. I personally prefer the default, but going up to the second setting in smoothing works nicely as well.

Phát hành các Ghi chú: Per request: added alerts and now allowing custom colorization.
Mã nguồn mở

Với tinh thần của TradingView, tác giả đã xuất bản tập lệnh theo mã nguồn mở, vì thế trader có thể dễ dàng hiểu và tùy chỉnh được. Bạn có thể sử dụng miễn phí, hoặc tùy chỉnh lại mã đã được cấp phép bởi Quy tắc Chung. Bạn có thể sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?

Bình luận

Nice indicator, but feel it could do with some more tweaking?

As with the plotchar having "offset=s1 ? -1 : s4 ? -3 : -2" means the indicators onscreen when you look backwards over several hours to see how it would have performed, seem like they're quite accurately calling the top & bottom of open and close of trade, but as they are painting the entry and exit a few candles back based on the known action of last few candles, means they never show on the current candle close, so are basically showing with hindsight where you could have entered.
Which if on say 15 min or 1 hour timeframe as an example, isn't so great knowing where you "should" have entered over half an hour or an hour or 2 before:-)
When as a test, you delete that offset condition out so the signals are painted in the current closing candle when people would be looking for an entry, the success doesn't look as good and could cause losses if solely relying on these, so definitely needs to be used with other indicators for confirmation.
Phản hồi
Thanks for sharing your script. However, I will like to submit that the signal generated by this script does repaint. For example, I observed that when the uptrend top arrow appeared, price traded downward but as soon as the price of the asset began to trade upward the arrow disappeared.
Phản hồi
J-Streak ilesanmipepsi
@ilesanmipepsi, as crazy as this may sound, if the candle has not yet been closed then what happens during that candle will vary until it does.
Phản hồi
@J-Streak, Alright, I understand your point. Now, the candle you're referring to should be the 3rd candle when counted from the candle that intersects the signal arrow? It seems the signal arrow usually appear during or at formation of the 3rd candle, right?
Phản hồi
J-Streak ilesanmipepsi
@ilesanmipepsi, the arrows appear based on the period you set for the smoothing value, the longer the smoothing value, the longer it takes the indicator to confirm an arrow, the shorter the smoothing value the quicker it appears (though it will be more arrows)
Phản hồi
Amazing work as always, thanks
Phản hồi
Does this repaint ? Thanks
Phản hồi
RameshAkula RameshAkula
@RameshAkula, sorry my question is the alerts show as soon as the current bar closes or appear after next 1-2 bars close ? Thanks again
+2 Phản hồi
After some testing I have noticed that the signals for this indicator are repainting?
Otherwise this indicator would be absolutely amazing. If you can somehow make this non-repainting it would be incredible! :D
Phản hồi
J-Streak JJosuke
@JJosuke, repainting? care to elaborate because I don't understand what you're saying.
Phản hồi