Блог им. analizator
//@version=4 study("Dayli Gaps Percentange") resolution = timeframe.isdwm and timeframe.isdaily == false ? "M" : "D" close_prev = security(syminfo.tickerid, resolution, close[1], barmerge.gaps_off, barmerge.lookahead_on) open_today = security(syminfo.tickerid, resolution, open, barmerge.gaps_off, barmerge.lookahead_on) pr = open_today >= close_prev ? ((open_today - close_prev) / close_prev) * 100.00 : ((close_prev - open_today) / open_today) * 100.00 plot(pr, color=(open_today >= close_prev ? color.green : color.red), style=plot.style_columns)V2
//@version=4 study("Dayli Gaps Percentange", precision=2) resolution = timeframe.isdwm and timeframe.isdaily == false ? "M" : "D" close_prev = security(syminfo.tickerid, resolution, close[1], barmerge.gaps_off, barmerge.lookahead_on) close_today = security(syminfo.tickerid, resolution, close, barmerge.gaps_off, barmerge.lookahead_on) open_today = security(syminfo.tickerid, resolution, open, barmerge.gaps_off, barmerge.lookahead_on) pr = open_today >= close_prev ? ((open_today - close_prev) / close_prev) * 100.00 : ((close_prev - open_today) / open_today) * 100.00 plot(close_today >= close_prev ? pr : -pr, color=(close_today >= close_prev ? color.green : color.red), style=plot.style_columns)Добавил отрицательную гистограмму, определяется по close сегодня минус close вчера.
Можно использовать как индикатор концентрации эмоций.
На истории чем-то похож на объёмы.
Для примера SP500