TradingView
Botnet101
4 Th01 2024 14:55

Period Separator 

EUR/USDOANDA

Mô tả

A useful indicator designed to display vertical line separators at specified periods, for example every hour or every 4 hours.

To use this indicator, you must be in a timeframe lower than the specified timeframe on the indicator.

I haven't found any other scripts that allow for custom time frames so I created my own :)

Let me know if you have any suggestions.
Bình luận
zero54
Ah the fix is very simple. Just change Line 18 to as below. Thanks for your good work.
bool isNewPeriod = ta.change(time(timeframe))
darshankumardave
@zero54, Thanks. This made it work for me
zero54
This is flawed because it does not consider the market open time but the clock time. Say for example, my market starts at 9:15 AM and I chose 30mins for separator on a 3 min chart. However, the first separator is drawn at 9:30AM itself instead of drawing at 9:45AM
Thêm nữa